#[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(())
}
}
mod add_members_to_group;
mod applicable_variants;
mod bulk_operation;
mod conclude_experiment;
mod create_context;
mod create_default_config;
mod create_dimension;
mod create_experiment;
mod create_experiment_group;
mod create_function;
mod create_organisation;
mod create_secret;
mod create_type_templates;
mod create_variable;
mod create_webhook;
mod create_workspace;
pub mod customize;
mod delete_context;
mod delete_default_config;
mod delete_dimension;
mod delete_experiment_group;
mod delete_function;
mod delete_secret;
mod delete_type_templates;
mod delete_variable;
mod delete_webhook;
mod discard_experiment;
mod get_config;
mod get_config_fast;
mod get_config_json;
mod get_config_toml;
mod get_context;
mod get_context_from_condition;
mod get_default_config;
mod get_dimension;
mod get_experiment;
mod get_experiment_group;
mod get_function;
mod get_organisation;
mod get_resolved_config;
mod get_resolved_config_with_identifier;
mod get_secret;
mod get_type_template;
mod get_type_templates_list;
mod get_variable;
mod get_version;
mod get_webhook;
mod get_webhook_by_event;
mod get_workspace;
mod list_audit_logs;
mod list_contexts;
mod list_default_configs;
mod list_dimensions;
mod list_experiment;
mod list_experiment_groups;
mod list_function;
mod list_organisation;
mod list_secrets;
mod list_variables;
mod list_versions;
mod list_webhook;
mod list_workspace;
mod migrate_workspace_schema;
mod move_context;
mod pause_experiment;
mod publish;
mod ramp_experiment;
mod remove_members_from_group;
mod resume_experiment;
mod rotate_master_encryption_key;
mod rotate_workspace_encryption_key;
mod test;
mod update_default_config;
mod update_dimension;
mod update_experiment_group;
mod update_function;
mod update_organisation;
mod update_override;
mod update_overrides_experiment;
mod update_secret;
mod update_type_templates;
mod update_variable;
mod update_webhook;
mod update_workspace;
mod validate_context;
mod weight_recompute;