#[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_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 forecast_geofence_events;
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;
mod verify_device_position;