#[derive(Debug)]
pub(crate) struct Handle {
pub(crate) conf: crate::Config,
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 {
pub fn from_conf(conf: crate::Config) -> Self {
let retry_config = conf
.retry_config()
.cloned()
.unwrap_or_else(::aws_smithy_types::retry::RetryConfig::disabled);
let timeout_config = conf
.timeout_config()
.cloned()
.unwrap_or_else(::aws_smithy_types::timeout::TimeoutConfig::disabled);
let sleep_impl = conf.sleep_impl();
if (retry_config.has_retry() || timeout_config.has_timeouts()) && sleep_impl.is_none() {
panic!(
"An async sleep implementation is required for retries or timeouts to work. \
Set the `sleep_impl` on the Config passed into this function to fix this panic."
);
}
Self {
handle: ::std::sync::Arc::new(Handle {
conf: conf.clone(),
runtime_plugins: crate::config::base_client_runtime_plugins(conf),
}),
}
}
pub fn config(&self) -> &crate::Config {
&self.handle.conf
}
#[doc(hidden)]
pub fn with_config<C, M, R>(_client: ::aws_smithy_client::Client<C, M, R>, conf: crate::Config) -> Self {
Self::from_conf(conf)
}
#[doc(hidden)]
pub fn conf(&self) -> &crate::Config {
&self.handle.conf
}
}
impl Client {
pub fn new(sdk_config: &::aws_types::sdk_config::SdkConfig) -> Self {
Self::from_conf(sdk_config.into())
}
}
mod associate_tracker_consumer;
mod batch_delete_device_position_history;
mod batch_delete_geofence;
mod batch_evaluate_geofences;
mod batch_get_device_position;
mod batch_put_geofence;
mod batch_update_device_position;
mod calculate_route;
mod calculate_route_matrix;
mod create_geofence_collection;
mod create_key;
mod create_map;
mod create_place_index;
mod create_route_calculator;
mod create_tracker;
pub mod customize;
mod delete_geofence_collection;
mod delete_key;
mod delete_map;
mod delete_place_index;
mod delete_route_calculator;
mod delete_tracker;
mod describe_geofence_collection;
mod describe_key;
mod describe_map;
mod describe_place_index;
mod describe_route_calculator;
mod describe_tracker;
mod disassociate_tracker_consumer;
mod get_device_position;
mod get_device_position_history;
mod get_geofence;
mod get_map_glyphs;
mod get_map_sprites;
mod get_map_style_descriptor;
mod get_map_tile;
mod get_place;
mod list_device_positions;
mod list_geofence_collections;
mod list_geofences;
mod list_keys;
mod list_maps;
mod list_place_indexes;
mod list_route_calculators;
mod list_tags_for_resource;
mod list_tracker_consumers;
mod list_trackers;
mod put_geofence;
mod search_place_index_for_position;
mod search_place_index_for_suggestions;
mod search_place_index_for_text;
mod tag_resource;
mod untag_resource;
mod update_geofence_collection;
mod update_key;
mod update_map;
mod update_place_index;
mod update_route_calculator;
mod update_tracker;