#[derive(Debug)]
pub(crate) struct Handle {
pub(crate) conf: crate::Config,
#[allow(dead_code)] pub(crate) runtime_plugins: ::aws_smithy_runtime_api::client::runtime_plugin::RuntimePlugins,
}
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct Client {
handle: ::std::sync::Arc<Handle>,
}
impl Client {
#[track_caller]
pub fn from_conf(conf: crate::Config) -> Self {
let handle = Handle {
conf: conf.clone(),
runtime_plugins: crate::config::base_client_runtime_plugins(conf),
};
if let Err(err) = Self::validate_config(&handle) {
panic!("Invalid client configuration: {err}");
}
Self {
handle: ::std::sync::Arc::new(handle),
}
}
pub fn config(&self) -> &crate::Config {
&self.handle.conf
}
fn validate_config(handle: &Handle) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
handle
.runtime_plugins
.apply_client_configuration(&mut cfg)?
.validate_base_client_config(&cfg)?;
Ok(())
}
}
impl Client {
#[track_caller]
pub fn new(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self {
Self::from_conf(sdk_config.into())
}
}
mod associate_source_network_stack;
mod create_extended_source_server;
mod create_launch_configuration_template;
mod create_replication_configuration_template;
mod create_source_network;
pub mod customize;
mod delete_job;
mod delete_launch_action;
mod delete_launch_configuration_template;
mod delete_recovery_instance;
mod delete_replication_configuration_template;
mod delete_source_network;
mod delete_source_server;
mod describe_job_log_items;
mod describe_jobs;
mod describe_launch_configuration_templates;
mod describe_recovery_instances;
mod describe_recovery_snapshots;
mod describe_replication_configuration_templates;
mod describe_source_networks;
mod describe_source_servers;
mod disconnect_recovery_instance;
mod disconnect_source_server;
mod export_source_network_cfn_template;
mod get_failback_replication_configuration;
mod get_launch_configuration;
mod get_replication_configuration;
mod initialize_service;
mod list_extensible_source_servers;
mod list_launch_actions;
mod list_staging_accounts;
mod list_tags_for_resource;
mod put_launch_action;
mod retry_data_replication;
mod reverse_replication;
mod start_failback_launch;
mod start_recovery;
mod start_replication;
mod start_source_network_recovery;
mod start_source_network_replication;
mod stop_failback;
mod stop_replication;
mod stop_source_network_replication;
mod tag_resource;
mod terminate_recovery_instances;
mod untag_resource;
mod update_failback_replication_configuration;
mod update_launch_configuration;
mod update_launch_configuration_template;
mod update_replication_configuration;
mod update_replication_configuration_template;