#[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_api;
mod associate_merged_graphql_api;
mod associate_source_graphql_api;
mod create_api;
mod create_api_cache;
mod create_api_key;
mod create_channel_namespace;
mod create_data_source;
mod create_domain_name;
mod create_function;
mod create_graphql_api;
mod create_resolver;
mod create_type;
pub mod customize;
mod delete_api;
mod delete_api_cache;
mod delete_api_key;
mod delete_channel_namespace;
mod delete_data_source;
mod delete_domain_name;
mod delete_function;
mod delete_graphql_api;
mod delete_resolver;
mod delete_type;
mod disassociate_api;
mod disassociate_merged_graphql_api;
mod disassociate_source_graphql_api;
mod evaluate_code;
mod evaluate_mapping_template;
mod flush_api_cache;
mod get_api;
mod get_api_association;
mod get_api_cache;
mod get_channel_namespace;
mod get_data_source;
mod get_data_source_introspection;
mod get_domain_name;
mod get_function;
mod get_graphql_api;
mod get_graphql_api_environment_variables;
mod get_introspection_schema;
mod get_resolver;
mod get_schema_creation_status;
mod get_source_api_association;
mod get_type;
mod list_api_keys;
mod list_apis;
mod list_channel_namespaces;
mod list_data_sources;
mod list_domain_names;
mod list_functions;
mod list_graphql_apis;
mod list_resolvers;
mod list_resolvers_by_function;
mod list_source_api_associations;
mod list_tags_for_resource;
mod list_types;
mod list_types_by_association;
mod put_graphql_api_environment_variables;
mod start_data_source_introspection;
mod start_schema_creation;
mod start_schema_merge;
mod tag_resource;
mod untag_resource;
mod update_api;
mod update_api_cache;
mod update_api_key;
mod update_channel_namespace;
mod update_data_source;
mod update_domain_name;
mod update_function;
mod update_graphql_api;
mod update_resolver;
mod update_source_api_association;
mod update_type;