#![doc = "generated by AutoRust 0.1.0"]
#[cfg(feature = "package-2021-10")]
pub mod package_2021_10;
#[cfg(all(feature = "package-2021-10", not(feature = "no-default-version")))]
pub use package_2021_10::{models, operations};
#[cfg(feature = "package-2019-10")]
pub mod package_2019_10;
#[cfg(all(feature = "package-2019-10", not(feature = "no-default-version")))]
pub use package_2019_10::{models, operations};
#[cfg(feature = "package-2019-06")]
pub mod package_2019_06;
#[cfg(all(feature = "package-2019-06", not(feature = "no-default-version")))]
pub use package_2019_06::{models, operations};
#[cfg(feature = "package-2019-05")]
pub mod package_2019_05;
#[cfg(all(feature = "package-2019-05", not(feature = "no-default-version")))]
pub use package_2019_05::{models, operations};
#[cfg(feature = "package-preview-2019-05")]
pub mod package_preview_2019_05;
#[cfg(all(feature = "package-preview-2019-05", not(feature = "no-default-version")))]
pub use package_preview_2019_05::{models, operations};
#[cfg(feature = "package-preview-2019-04")]
pub mod package_preview_2019_04;
#[cfg(all(feature = "package-preview-2019-04", not(feature = "no-default-version")))]
pub use package_preview_2019_04::{models, operations};
#[cfg(feature = "package-preview-2018-11")]
pub mod package_preview_2018_11;
#[cfg(all(feature = "package-preview-2018-11", not(feature = "no-default-version")))]
pub use package_preview_2018_11::{models, operations};
#[cfg(feature = "package-2019-01")]
pub mod package_2019_01;
#[cfg(all(feature = "package-2019-01", not(feature = "no-default-version")))]
pub use package_2019_01::{models, operations};
#[cfg(feature = "package-2017-11")]
pub mod package_2017_11;
#[cfg(all(feature = "package-2017-11", not(feature = "no-default-version")))]
pub use package_2017_11::{models, operations};
#[cfg(feature = "package-2018-01")]
pub mod package_2018_01;
#[cfg(all(feature = "package-2018-01", not(feature = "no-default-version")))]
pub use package_2018_01::{models, operations};
#[cfg(feature = "package-2018-05")]
pub mod package_2018_05;
#[cfg(all(feature = "package-2018-05", not(feature = "no-default-version")))]
pub use package_2018_05::{models, operations};
#[cfg(feature = "package-2018-06")]
pub mod package_2018_06;
#[cfg(all(feature = "package-2018-06", not(feature = "no-default-version")))]
pub use package_2018_06::{models, operations};
#[cfg(feature = "package-2018-08")]
pub mod package_2018_08;
#[cfg(all(feature = "package-2018-08", not(feature = "no-default-version")))]
pub use package_2018_08::{models, operations};
#[cfg(feature = "package-2018-10")]
pub mod package_2018_10;
use azure_core::setters;
#[cfg(all(feature = "package-2018-10", not(feature = "no-default-version")))]
pub use package_2018_10::{models, operations};
pub fn config(
    http_client: std::sync::Arc<dyn azure_core::HttpClient>,
    token_credential: Box<dyn azure_core::TokenCredential>,
) -> OperationConfigBuilder {
    OperationConfigBuilder {
        http_client,
        base_path: None,
        token_credential,
        token_credential_resource: None,
    }
}
pub struct OperationConfigBuilder {
    http_client: std::sync::Arc<dyn azure_core::HttpClient>,
    base_path: Option<String>,
    token_credential: Box<dyn azure_core::TokenCredential>,
    token_credential_resource: Option<String>,
}
impl OperationConfigBuilder {
    setters! { base_path : String => Some (base_path) , token_credential_resource : String => Some (token_credential_resource) , }
    pub fn build(self) -> OperationConfig {
        OperationConfig {
            http_client: self.http_client,
            base_path: self.base_path.unwrap_or("https://management.azure.com".to_owned()),
            token_credential: Some(self.token_credential),
            token_credential_resource: self.token_credential_resource.unwrap_or("https://management.azure.com/".to_owned()),
        }
    }
}
pub struct OperationConfig {
    http_client: std::sync::Arc<dyn azure_core::HttpClient>,
    base_path: String,
    token_credential: Option<Box<dyn azure_core::TokenCredential>>,
    token_credential_resource: String,
}
impl OperationConfig {
    pub fn http_client(&self) -> &dyn azure_core::HttpClient {
        self.http_client.as_ref()
    }
    pub fn base_path(&self) -> &str {
        self.base_path.as_str()
    }
    pub fn token_credential(&self) -> Option<&dyn azure_core::TokenCredential> {
        self.token_credential.as_deref()
    }
    pub fn token_credential_resource(&self) -> &str {
        self.token_credential_resource.as_str()
    }
}
