#[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_detect_dominant_language;
mod batch_detect_entities;
mod batch_detect_key_phrases;
mod batch_detect_sentiment;
mod batch_detect_syntax;
mod batch_detect_targeted_sentiment;
mod classify_document;
mod contains_pii_entities;
mod create_dataset;
mod create_document_classifier;
mod create_endpoint;
mod create_entity_recognizer;
mod create_flywheel;
pub mod customize;
mod delete_document_classifier;
mod delete_endpoint;
mod delete_entity_recognizer;
mod delete_flywheel;
mod delete_resource_policy;
mod describe_dataset;
mod describe_document_classification_job;
mod describe_document_classifier;
mod describe_dominant_language_detection_job;
mod describe_endpoint;
mod describe_entities_detection_job;
mod describe_entity_recognizer;
mod describe_events_detection_job;
mod describe_flywheel;
mod describe_flywheel_iteration;
mod describe_key_phrases_detection_job;
mod describe_pii_entities_detection_job;
mod describe_resource_policy;
mod describe_sentiment_detection_job;
mod describe_targeted_sentiment_detection_job;
mod describe_topics_detection_job;
mod detect_dominant_language;
mod detect_entities;
mod detect_key_phrases;
mod detect_pii_entities;
mod detect_sentiment;
mod detect_syntax;
mod detect_targeted_sentiment;
mod detect_toxic_content;
mod import_model;
mod list_datasets;
mod list_document_classification_jobs;
mod list_document_classifier_summaries;
mod list_document_classifiers;
mod list_dominant_language_detection_jobs;
mod list_endpoints;
mod list_entities_detection_jobs;
mod list_entity_recognizer_summaries;
mod list_entity_recognizers;
mod list_events_detection_jobs;
mod list_flywheel_iteration_history;
mod list_flywheels;
mod list_key_phrases_detection_jobs;
mod list_pii_entities_detection_jobs;
mod list_sentiment_detection_jobs;
mod list_tags_for_resource;
mod list_targeted_sentiment_detection_jobs;
mod list_topics_detection_jobs;
mod put_resource_policy;
mod start_document_classification_job;
mod start_dominant_language_detection_job;
mod start_entities_detection_job;
mod start_events_detection_job;
mod start_flywheel_iteration;
mod start_key_phrases_detection_job;
mod start_pii_entities_detection_job;
mod start_sentiment_detection_job;
mod start_targeted_sentiment_detection_job;
mod start_topics_detection_job;
mod stop_dominant_language_detection_job;
mod stop_entities_detection_job;
mod stop_events_detection_job;
mod stop_key_phrases_detection_job;
mod stop_pii_entities_detection_job;
mod stop_sentiment_detection_job;
mod stop_targeted_sentiment_detection_job;
mod stop_training_document_classifier;
mod stop_training_entity_recognizer;
mod tag_resource;
mod untag_resource;
mod update_endpoint;
mod update_flywheel;