#[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) -> 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_agent_collaborator;
mod associate_agent_knowledge_base;
mod create_agent;
mod create_agent_action_group;
mod create_agent_alias;
mod create_data_source;
mod create_flow;
mod create_flow_alias;
mod create_flow_version;
mod create_knowledge_base;
mod create_prompt;
mod create_prompt_version;
pub mod customize;
mod delete_agent;
mod delete_agent_action_group;
mod delete_agent_alias;
mod delete_agent_version;
mod delete_data_source;
mod delete_flow;
mod delete_flow_alias;
mod delete_flow_version;
mod delete_knowledge_base;
mod delete_knowledge_base_documents;
mod delete_prompt;
mod disassociate_agent_collaborator;
mod disassociate_agent_knowledge_base;
mod get_agent;
mod get_agent_action_group;
mod get_agent_alias;
mod get_agent_collaborator;
mod get_agent_knowledge_base;
mod get_agent_version;
mod get_data_source;
mod get_flow;
mod get_flow_alias;
mod get_flow_version;
mod get_ingestion_job;
mod get_knowledge_base;
mod get_knowledge_base_documents;
mod get_prompt;
mod ingest_knowledge_base_documents;
mod list_agent_action_groups;
mod list_agent_aliases;
mod list_agent_collaborators;
mod list_agent_knowledge_bases;
mod list_agent_versions;
mod list_agents;
mod list_data_sources;
mod list_flow_aliases;
mod list_flow_versions;
mod list_flows;
mod list_ingestion_jobs;
mod list_knowledge_base_documents;
mod list_knowledge_bases;
mod list_prompts;
mod list_tags_for_resource;
mod prepare_agent;
mod prepare_flow;
mod start_ingestion_job;
mod stop_ingestion_job;
mod tag_resource;
mod untag_resource;
mod update_agent;
mod update_agent_action_group;
mod update_agent_alias;
mod update_agent_collaborator;
mod update_agent_knowledge_base;
mod update_data_source;
mod update_flow;
mod update_flow_alias;
mod update_knowledge_base;
mod update_prompt;
mod validate_flow_definition;