#[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 batch_delete_evaluation_job;
mod cancel_automated_reasoning_policy_build_workflow;
mod create_automated_reasoning_policy;
mod create_automated_reasoning_policy_test_case;
mod create_automated_reasoning_policy_version;
mod create_custom_model;
mod create_custom_model_deployment;
mod create_evaluation_job;
mod create_foundation_model_agreement;
mod create_guardrail;
mod create_guardrail_version;
mod create_inference_profile;
mod create_marketplace_model_endpoint;
mod create_model_copy_job;
mod create_model_customization_job;
mod create_model_import_job;
mod create_model_invocation_job;
mod create_prompt_router;
mod create_provisioned_model_throughput;
pub mod customize;
mod delete_automated_reasoning_policy;
mod delete_automated_reasoning_policy_build_workflow;
mod delete_automated_reasoning_policy_test_case;
mod delete_custom_model;
mod delete_custom_model_deployment;
mod delete_enforced_guardrail_configuration;
mod delete_foundation_model_agreement;
mod delete_guardrail;
mod delete_imported_model;
mod delete_inference_profile;
mod delete_marketplace_model_endpoint;
mod delete_model_invocation_logging_configuration;
mod delete_prompt_router;
mod delete_provisioned_model_throughput;
mod deregister_marketplace_model_endpoint;
mod export_automated_reasoning_policy_version;
mod get_automated_reasoning_policy;
mod get_automated_reasoning_policy_annotations;
mod get_automated_reasoning_policy_build_workflow;
mod get_automated_reasoning_policy_build_workflow_result_assets;
mod get_automated_reasoning_policy_next_scenario;
mod get_automated_reasoning_policy_test_case;
mod get_automated_reasoning_policy_test_result;
mod get_custom_model;
mod get_custom_model_deployment;
mod get_evaluation_job;
mod get_foundation_model;
mod get_foundation_model_availability;
mod get_guardrail;
mod get_imported_model;
mod get_inference_profile;
mod get_marketplace_model_endpoint;
mod get_model_copy_job;
mod get_model_customization_job;
mod get_model_import_job;
mod get_model_invocation_job;
mod get_model_invocation_logging_configuration;
mod get_prompt_router;
mod get_provisioned_model_throughput;
mod get_use_case_for_model_access;
mod list_automated_reasoning_policies;
mod list_automated_reasoning_policy_build_workflows;
mod list_automated_reasoning_policy_test_cases;
mod list_automated_reasoning_policy_test_results;
mod list_custom_model_deployments;
mod list_custom_models;
mod list_enforced_guardrails_configuration;
mod list_evaluation_jobs;
mod list_foundation_model_agreement_offers;
mod list_foundation_models;
mod list_guardrails;
mod list_imported_models;
mod list_inference_profiles;
mod list_marketplace_model_endpoints;
mod list_model_copy_jobs;
mod list_model_customization_jobs;
mod list_model_import_jobs;
mod list_model_invocation_jobs;
mod list_prompt_routers;
mod list_provisioned_model_throughputs;
mod list_tags_for_resource;
mod put_enforced_guardrail_configuration;
mod put_model_invocation_logging_configuration;
mod put_use_case_for_model_access;
mod register_marketplace_model_endpoint;
mod start_automated_reasoning_policy_build_workflow;
mod start_automated_reasoning_policy_test_workflow;
mod stop_evaluation_job;
mod stop_model_customization_job;
mod stop_model_invocation_job;
mod tag_resource;
mod untag_resource;
mod update_automated_reasoning_policy;
mod update_automated_reasoning_policy_annotations;
mod update_automated_reasoning_policy_test_case;
mod update_custom_model_deployment;
mod update_guardrail;
mod update_marketplace_model_endpoint;
mod update_provisioned_model_throughput;