#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTrackerConsumersError {
pub kind: ListTrackerConsumersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTrackerConsumersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTrackerConsumersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTrackerConsumersErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTrackerConsumersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTrackerConsumersErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListTrackerConsumersErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTrackerConsumersErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTrackerConsumersErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTrackerConsumersErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTrackerConsumersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTrackerConsumersError {
fn code(&self) -> Option<&str> {
ListTrackerConsumersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListTrackerConsumersErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListTrackerConsumersErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListTrackerConsumersError {
pub fn new(kind: ListTrackerConsumersErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTrackerConsumersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTrackerConsumersErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListTrackerConsumersErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTrackerConsumersErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTrackerConsumersErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTrackerConsumersErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTrackerConsumersErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTrackerConsumersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTrackerConsumersErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTrackerConsumersErrorKind::InternalServerException(_inner) => Some(_inner),
ListTrackerConsumersErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTrackerConsumersErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTrackerConsumersErrorKind::ValidationException(_inner) => Some(_inner),
ListTrackerConsumersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ValidationExceptionReason>,
#[doc(hidden)]
pub field_list: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl ValidationException {
pub fn reason(&self) -> std::option::Option<&crate::model::ValidationExceptionReason> {
self.reason.as_ref()
}
pub fn field_list(&self) -> std::option::Option<&[crate::model::ValidationExceptionField]> {
self.field_list.as_deref()
}
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ValidationExceptionReason>,
pub(crate) field_list:
std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn reason(mut self, input: crate::model::ValidationExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ValidationExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn field_list(mut self, input: crate::model::ValidationExceptionField) -> Self {
let mut v = self.field_list.unwrap_or_default();
v.push(input);
self.field_list = Some(v);
self
}
pub fn set_field_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
) -> Self {
self.field_list = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
reason: self.reason,
field_list: self.field_list,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottlingException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ClientError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ServerError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDevicePositionsError {
pub kind: ListDevicePositionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDevicePositionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDevicePositionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDevicePositionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDevicePositionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDevicePositionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListDevicePositionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListDevicePositionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDevicePositionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListDevicePositionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDevicePositionsError {
fn code(&self) -> Option<&str> {
ListDevicePositionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListDevicePositionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListDevicePositionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListDevicePositionsError {
pub fn new(kind: ListDevicePositionsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListDevicePositionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDevicePositionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListDevicePositionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDevicePositionsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListDevicePositionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListDevicePositionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListDevicePositionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDevicePositionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListDevicePositionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListDevicePositionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDevicePositionsErrorKind::ValidationException(_inner) => Some(_inner),
ListDevicePositionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDevicePositionHistoryError {
pub kind: GetDevicePositionHistoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDevicePositionHistoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDevicePositionHistoryErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDevicePositionHistoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDevicePositionHistoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDevicePositionHistoryErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDevicePositionHistoryErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDevicePositionHistoryErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDevicePositionHistoryErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDevicePositionHistoryErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDevicePositionHistoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDevicePositionHistoryError {
fn code(&self) -> Option<&str> {
GetDevicePositionHistoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetDevicePositionHistoryErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetDevicePositionHistoryErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetDevicePositionHistoryError {
pub fn new(kind: GetDevicePositionHistoryErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetDevicePositionHistoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDevicePositionHistoryErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionHistoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionHistoryErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionHistoryErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionHistoryErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionHistoryErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetDevicePositionHistoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDevicePositionHistoryErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDevicePositionHistoryErrorKind::InternalServerException(_inner) => Some(_inner),
GetDevicePositionHistoryErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDevicePositionHistoryErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDevicePositionHistoryErrorKind::ValidationException(_inner) => Some(_inner),
GetDevicePositionHistoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDevicePositionError {
pub kind: GetDevicePositionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDevicePositionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDevicePositionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDevicePositionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDevicePositionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDevicePositionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDevicePositionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDevicePositionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDevicePositionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDevicePositionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDevicePositionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDevicePositionError {
fn code(&self) -> Option<&str> {
GetDevicePositionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetDevicePositionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetDevicePositionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetDevicePositionError {
pub fn new(kind: GetDevicePositionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetDevicePositionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDevicePositionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetDevicePositionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetDevicePositionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDevicePositionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDevicePositionErrorKind::InternalServerException(_inner) => Some(_inner),
GetDevicePositionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDevicePositionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDevicePositionErrorKind::ValidationException(_inner) => Some(_inner),
GetDevicePositionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateTrackerConsumerError {
pub kind: DisassociateTrackerConsumerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateTrackerConsumerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateTrackerConsumerErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateTrackerConsumerErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateTrackerConsumerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateTrackerConsumerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateTrackerConsumerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DisassociateTrackerConsumerErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DisassociateTrackerConsumerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DisassociateTrackerConsumerErrorKind::ValidationException(_inner) => _inner.fmt(f),
DisassociateTrackerConsumerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateTrackerConsumerError {
fn code(&self) -> Option<&str> {
DisassociateTrackerConsumerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DisassociateTrackerConsumerErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DisassociateTrackerConsumerErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DisassociateTrackerConsumerError {
pub fn new(kind: DisassociateTrackerConsumerErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DisassociateTrackerConsumerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateTrackerConsumerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTrackerConsumerErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTrackerConsumerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTrackerConsumerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTrackerConsumerErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateTrackerConsumerErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DisassociateTrackerConsumerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateTrackerConsumerErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateTrackerConsumerErrorKind::InternalServerException(_inner) => Some(_inner),
DisassociateTrackerConsumerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateTrackerConsumerErrorKind::ThrottlingException(_inner) => Some(_inner),
DisassociateTrackerConsumerErrorKind::ValidationException(_inner) => Some(_inner),
DisassociateTrackerConsumerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchUpdateDevicePositionError {
pub kind: BatchUpdateDevicePositionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchUpdateDevicePositionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchUpdateDevicePositionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchUpdateDevicePositionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchUpdateDevicePositionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchUpdateDevicePositionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
BatchUpdateDevicePositionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchUpdateDevicePositionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
BatchUpdateDevicePositionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchUpdateDevicePositionErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchUpdateDevicePositionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchUpdateDevicePositionError {
fn code(&self) -> Option<&str> {
BatchUpdateDevicePositionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
BatchUpdateDevicePositionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
BatchUpdateDevicePositionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl BatchUpdateDevicePositionError {
pub fn new(kind: BatchUpdateDevicePositionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchUpdateDevicePositionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchUpdateDevicePositionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
BatchUpdateDevicePositionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchUpdateDevicePositionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchUpdateDevicePositionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchUpdateDevicePositionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchUpdateDevicePositionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchUpdateDevicePositionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchUpdateDevicePositionErrorKind::AccessDeniedException(_inner) => Some(_inner),
BatchUpdateDevicePositionErrorKind::InternalServerException(_inner) => Some(_inner),
BatchUpdateDevicePositionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
BatchUpdateDevicePositionErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchUpdateDevicePositionErrorKind::ValidationException(_inner) => Some(_inner),
BatchUpdateDevicePositionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchGetDevicePositionError {
pub kind: BatchGetDevicePositionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchGetDevicePositionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchGetDevicePositionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchGetDevicePositionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchGetDevicePositionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchGetDevicePositionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
BatchGetDevicePositionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchGetDevicePositionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
BatchGetDevicePositionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchGetDevicePositionErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchGetDevicePositionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchGetDevicePositionError {
fn code(&self) -> Option<&str> {
BatchGetDevicePositionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
BatchGetDevicePositionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
BatchGetDevicePositionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl BatchGetDevicePositionError {
pub fn new(kind: BatchGetDevicePositionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchGetDevicePositionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchGetDevicePositionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetDevicePositionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetDevicePositionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetDevicePositionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetDevicePositionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetDevicePositionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchGetDevicePositionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchGetDevicePositionErrorKind::AccessDeniedException(_inner) => Some(_inner),
BatchGetDevicePositionErrorKind::InternalServerException(_inner) => Some(_inner),
BatchGetDevicePositionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
BatchGetDevicePositionErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchGetDevicePositionErrorKind::ValidationException(_inner) => Some(_inner),
BatchGetDevicePositionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchDeleteDevicePositionHistoryError {
pub kind: BatchDeleteDevicePositionHistoryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchDeleteDevicePositionHistoryError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchDeleteDevicePositionHistoryErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchDeleteDevicePositionHistoryErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchDeleteDevicePositionHistoryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchDeleteDevicePositionHistoryErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
BatchDeleteDevicePositionHistoryErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
BatchDeleteDevicePositionHistoryErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
BatchDeleteDevicePositionHistoryErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchDeleteDevicePositionHistoryErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchDeleteDevicePositionHistoryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchDeleteDevicePositionHistoryError {
fn code(&self) -> Option<&str> {
BatchDeleteDevicePositionHistoryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
BatchDeleteDevicePositionHistoryErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
BatchDeleteDevicePositionHistoryErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl BatchDeleteDevicePositionHistoryError {
pub fn new(
kind: BatchDeleteDevicePositionHistoryErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchDeleteDevicePositionHistoryErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchDeleteDevicePositionHistoryErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteDevicePositionHistoryErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteDevicePositionHistoryErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteDevicePositionHistoryErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteDevicePositionHistoryErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteDevicePositionHistoryErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchDeleteDevicePositionHistoryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchDeleteDevicePositionHistoryErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
BatchDeleteDevicePositionHistoryErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
BatchDeleteDevicePositionHistoryErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
BatchDeleteDevicePositionHistoryErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchDeleteDevicePositionHistoryErrorKind::ValidationException(_inner) => Some(_inner),
BatchDeleteDevicePositionHistoryErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateTrackerConsumerError {
pub kind: AssociateTrackerConsumerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateTrackerConsumerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateTrackerConsumerErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateTrackerConsumerErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateTrackerConsumerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateTrackerConsumerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateTrackerConsumerErrorKind::ConflictException(_inner) => _inner.fmt(f),
AssociateTrackerConsumerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
AssociateTrackerConsumerErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateTrackerConsumerErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
AssociateTrackerConsumerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateTrackerConsumerErrorKind::ValidationException(_inner) => _inner.fmt(f),
AssociateTrackerConsumerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateTrackerConsumerError {
fn code(&self) -> Option<&str> {
AssociateTrackerConsumerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
AssociateTrackerConsumerErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
AssociateTrackerConsumerErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl AssociateTrackerConsumerError {
pub fn new(kind: AssociateTrackerConsumerErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: AssociateTrackerConsumerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateTrackerConsumerErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTrackerConsumerErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTrackerConsumerErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTrackerConsumerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTrackerConsumerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTrackerConsumerErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTrackerConsumerErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateTrackerConsumerErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AssociateTrackerConsumerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateTrackerConsumerErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateTrackerConsumerErrorKind::ConflictException(_inner) => Some(_inner),
AssociateTrackerConsumerErrorKind::InternalServerException(_inner) => Some(_inner),
AssociateTrackerConsumerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateTrackerConsumerErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
AssociateTrackerConsumerErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateTrackerConsumerErrorKind::ValidationException(_inner) => Some(_inner),
AssociateTrackerConsumerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTrackersError {
pub kind: ListTrackersErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTrackersError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTrackersErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTrackersErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTrackersError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTrackersErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListTrackersErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTrackersErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTrackersErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTrackersErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTrackersError {
fn code(&self) -> Option<&str> {
ListTrackersError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListTrackersErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListTrackersErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl ListTrackersError {
pub fn new(kind: ListTrackersErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTrackersErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTrackersErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, ListTrackersErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTrackersErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListTrackersErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListTrackersErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListTrackersError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTrackersErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTrackersErrorKind::InternalServerException(_inner) => Some(_inner),
ListTrackersErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTrackersErrorKind::ValidationException(_inner) => Some(_inner),
ListTrackersErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateTrackerError {
pub kind: CreateTrackerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateTrackerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateTrackerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateTrackerErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateTrackerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateTrackerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateTrackerErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateTrackerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateTrackerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateTrackerErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateTrackerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateTrackerError {
fn code(&self) -> Option<&str> {
CreateTrackerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateTrackerErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateTrackerErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateTrackerError {
pub fn new(kind: CreateTrackerErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateTrackerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateTrackerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, CreateTrackerErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateTrackerErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateTrackerErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateTrackerErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateTrackerErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateTrackerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateTrackerErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateTrackerErrorKind::ConflictException(_inner) => Some(_inner),
CreateTrackerErrorKind::InternalServerException(_inner) => Some(_inner),
CreateTrackerErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateTrackerErrorKind::ValidationException(_inner) => Some(_inner),
CreateTrackerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteTrackerError {
pub kind: DeleteTrackerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteTrackerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteTrackerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteTrackerErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteTrackerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteTrackerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteTrackerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteTrackerErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteTrackerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteTrackerErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteTrackerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteTrackerError {
fn code(&self) -> Option<&str> {
DeleteTrackerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteTrackerErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteTrackerErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteTrackerError {
pub fn new(kind: DeleteTrackerErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteTrackerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteTrackerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeleteTrackerErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTrackerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteTrackerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteTrackerErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteTrackerErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteTrackerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteTrackerErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteTrackerErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteTrackerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteTrackerErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteTrackerErrorKind::ValidationException(_inner) => Some(_inner),
DeleteTrackerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateTrackerError {
pub kind: UpdateTrackerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateTrackerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateTrackerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateTrackerErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateTrackerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateTrackerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateTrackerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateTrackerErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateTrackerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateTrackerErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateTrackerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateTrackerError {
fn code(&self) -> Option<&str> {
UpdateTrackerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateTrackerErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateTrackerErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateTrackerError {
pub fn new(kind: UpdateTrackerErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateTrackerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateTrackerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UpdateTrackerErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTrackerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateTrackerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateTrackerErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateTrackerErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateTrackerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateTrackerErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateTrackerErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateTrackerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateTrackerErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateTrackerErrorKind::ValidationException(_inner) => Some(_inner),
UpdateTrackerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeTrackerError {
pub kind: DescribeTrackerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeTrackerError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeTrackerErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeTrackerErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeTrackerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeTrackerErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeTrackerErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeTrackerErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeTrackerErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeTrackerErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeTrackerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeTrackerError {
fn code(&self) -> Option<&str> {
DescribeTrackerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeTrackerErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeTrackerErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeTrackerError {
pub fn new(kind: DescribeTrackerErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeTrackerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeTrackerErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTrackerErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTrackerErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeTrackerErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DescribeTrackerErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DescribeTrackerErrorKind::ValidationException(_))
}
}
impl std::error::Error for DescribeTrackerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeTrackerErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeTrackerErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeTrackerErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeTrackerErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeTrackerErrorKind::ValidationException(_inner) => Some(_inner),
DescribeTrackerErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CalculateRouteMatrixError {
pub kind: CalculateRouteMatrixErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CalculateRouteMatrixError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CalculateRouteMatrixErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CalculateRouteMatrixErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CalculateRouteMatrixError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CalculateRouteMatrixErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CalculateRouteMatrixErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CalculateRouteMatrixErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CalculateRouteMatrixErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CalculateRouteMatrixErrorKind::ValidationException(_inner) => _inner.fmt(f),
CalculateRouteMatrixErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CalculateRouteMatrixError {
fn code(&self) -> Option<&str> {
CalculateRouteMatrixError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CalculateRouteMatrixErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CalculateRouteMatrixErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CalculateRouteMatrixError {
pub fn new(kind: CalculateRouteMatrixErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CalculateRouteMatrixErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CalculateRouteMatrixErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CalculateRouteMatrixErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CalculateRouteMatrixErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CalculateRouteMatrixErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CalculateRouteMatrixErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CalculateRouteMatrixErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CalculateRouteMatrixError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CalculateRouteMatrixErrorKind::AccessDeniedException(_inner) => Some(_inner),
CalculateRouteMatrixErrorKind::InternalServerException(_inner) => Some(_inner),
CalculateRouteMatrixErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CalculateRouteMatrixErrorKind::ThrottlingException(_inner) => Some(_inner),
CalculateRouteMatrixErrorKind::ValidationException(_inner) => Some(_inner),
CalculateRouteMatrixErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CalculateRouteError {
pub kind: CalculateRouteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CalculateRouteError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CalculateRouteErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CalculateRouteErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CalculateRouteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CalculateRouteErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CalculateRouteErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CalculateRouteErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CalculateRouteErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CalculateRouteErrorKind::ValidationException(_inner) => _inner.fmt(f),
CalculateRouteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CalculateRouteError {
fn code(&self) -> Option<&str> {
CalculateRouteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CalculateRouteErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CalculateRouteErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CalculateRouteError {
pub fn new(kind: CalculateRouteErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CalculateRouteErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CalculateRouteErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CalculateRouteErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CalculateRouteErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CalculateRouteErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CalculateRouteErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CalculateRouteErrorKind::ValidationException(_))
}
}
impl std::error::Error for CalculateRouteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CalculateRouteErrorKind::AccessDeniedException(_inner) => Some(_inner),
CalculateRouteErrorKind::InternalServerException(_inner) => Some(_inner),
CalculateRouteErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CalculateRouteErrorKind::ThrottlingException(_inner) => Some(_inner),
CalculateRouteErrorKind::ValidationException(_inner) => Some(_inner),
CalculateRouteErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListRouteCalculatorsError {
pub kind: ListRouteCalculatorsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListRouteCalculatorsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListRouteCalculatorsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListRouteCalculatorsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListRouteCalculatorsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListRouteCalculatorsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListRouteCalculatorsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListRouteCalculatorsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListRouteCalculatorsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListRouteCalculatorsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListRouteCalculatorsError {
fn code(&self) -> Option<&str> {
ListRouteCalculatorsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListRouteCalculatorsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListRouteCalculatorsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListRouteCalculatorsError {
pub fn new(kind: ListRouteCalculatorsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListRouteCalculatorsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListRouteCalculatorsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListRouteCalculatorsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListRouteCalculatorsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListRouteCalculatorsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListRouteCalculatorsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListRouteCalculatorsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListRouteCalculatorsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListRouteCalculatorsErrorKind::InternalServerException(_inner) => Some(_inner),
ListRouteCalculatorsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListRouteCalculatorsErrorKind::ValidationException(_inner) => Some(_inner),
ListRouteCalculatorsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateRouteCalculatorError {
pub kind: CreateRouteCalculatorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateRouteCalculatorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateRouteCalculatorErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateRouteCalculatorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateRouteCalculatorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateRouteCalculatorErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateRouteCalculatorErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateRouteCalculatorErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateRouteCalculatorErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateRouteCalculatorErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateRouteCalculatorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateRouteCalculatorError {
fn code(&self) -> Option<&str> {
CreateRouteCalculatorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateRouteCalculatorErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateRouteCalculatorErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateRouteCalculatorError {
pub fn new(kind: CreateRouteCalculatorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateRouteCalculatorErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateRouteCalculatorErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateRouteCalculatorErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateRouteCalculatorErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateRouteCalculatorErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateRouteCalculatorErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateRouteCalculatorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateRouteCalculatorErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateRouteCalculatorErrorKind::ConflictException(_inner) => Some(_inner),
CreateRouteCalculatorErrorKind::InternalServerException(_inner) => Some(_inner),
CreateRouteCalculatorErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateRouteCalculatorErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateRouteCalculatorErrorKind::ValidationException(_inner) => Some(_inner),
CreateRouteCalculatorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRouteCalculatorError {
pub kind: DeleteRouteCalculatorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRouteCalculatorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRouteCalculatorErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteRouteCalculatorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteRouteCalculatorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteRouteCalculatorErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteRouteCalculatorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteRouteCalculatorErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteRouteCalculatorErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteRouteCalculatorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRouteCalculatorError {
fn code(&self) -> Option<&str> {
DeleteRouteCalculatorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteRouteCalculatorErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteRouteCalculatorErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteRouteCalculatorError {
pub fn new(kind: DeleteRouteCalculatorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRouteCalculatorErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRouteCalculatorErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRouteCalculatorErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRouteCalculatorErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRouteCalculatorErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteRouteCalculatorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteRouteCalculatorErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteRouteCalculatorErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteRouteCalculatorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteRouteCalculatorErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteRouteCalculatorErrorKind::ValidationException(_inner) => Some(_inner),
DeleteRouteCalculatorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateRouteCalculatorError {
pub kind: UpdateRouteCalculatorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateRouteCalculatorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateRouteCalculatorErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateRouteCalculatorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateRouteCalculatorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateRouteCalculatorErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateRouteCalculatorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateRouteCalculatorErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateRouteCalculatorErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateRouteCalculatorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateRouteCalculatorError {
fn code(&self) -> Option<&str> {
UpdateRouteCalculatorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateRouteCalculatorErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateRouteCalculatorErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateRouteCalculatorError {
pub fn new(kind: UpdateRouteCalculatorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRouteCalculatorErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRouteCalculatorErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRouteCalculatorErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRouteCalculatorErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateRouteCalculatorErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateRouteCalculatorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateRouteCalculatorErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateRouteCalculatorErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateRouteCalculatorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateRouteCalculatorErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateRouteCalculatorErrorKind::ValidationException(_inner) => Some(_inner),
UpdateRouteCalculatorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeRouteCalculatorError {
pub kind: DescribeRouteCalculatorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeRouteCalculatorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeRouteCalculatorErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeRouteCalculatorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeRouteCalculatorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeRouteCalculatorErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeRouteCalculatorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeRouteCalculatorErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeRouteCalculatorErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeRouteCalculatorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeRouteCalculatorError {
fn code(&self) -> Option<&str> {
DescribeRouteCalculatorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeRouteCalculatorErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeRouteCalculatorErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeRouteCalculatorError {
pub fn new(kind: DescribeRouteCalculatorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeRouteCalculatorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRouteCalculatorErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRouteCalculatorErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRouteCalculatorErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRouteCalculatorErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRouteCalculatorErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeRouteCalculatorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeRouteCalculatorErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeRouteCalculatorErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeRouteCalculatorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeRouteCalculatorErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeRouteCalculatorErrorKind::ValidationException(_inner) => Some(_inner),
DescribeRouteCalculatorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SearchPlaceIndexForTextError {
pub kind: SearchPlaceIndexForTextErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SearchPlaceIndexForTextError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SearchPlaceIndexForTextErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SearchPlaceIndexForTextErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SearchPlaceIndexForTextError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SearchPlaceIndexForTextErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SearchPlaceIndexForTextErrorKind::InternalServerException(_inner) => _inner.fmt(f),
SearchPlaceIndexForTextErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
SearchPlaceIndexForTextErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
SearchPlaceIndexForTextErrorKind::ValidationException(_inner) => _inner.fmt(f),
SearchPlaceIndexForTextErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SearchPlaceIndexForTextError {
fn code(&self) -> Option<&str> {
SearchPlaceIndexForTextError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SearchPlaceIndexForTextErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
SearchPlaceIndexForTextErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SearchPlaceIndexForTextError {
pub fn new(kind: SearchPlaceIndexForTextErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: SearchPlaceIndexForTextErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SearchPlaceIndexForTextErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForTextErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForTextErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForTextErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForTextErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForTextErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for SearchPlaceIndexForTextError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SearchPlaceIndexForTextErrorKind::AccessDeniedException(_inner) => Some(_inner),
SearchPlaceIndexForTextErrorKind::InternalServerException(_inner) => Some(_inner),
SearchPlaceIndexForTextErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
SearchPlaceIndexForTextErrorKind::ThrottlingException(_inner) => Some(_inner),
SearchPlaceIndexForTextErrorKind::ValidationException(_inner) => Some(_inner),
SearchPlaceIndexForTextErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SearchPlaceIndexForSuggestionsError {
pub kind: SearchPlaceIndexForSuggestionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SearchPlaceIndexForSuggestionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SearchPlaceIndexForSuggestionsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SearchPlaceIndexForSuggestionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SearchPlaceIndexForSuggestionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SearchPlaceIndexForSuggestionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SearchPlaceIndexForSuggestionsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
SearchPlaceIndexForSuggestionsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
SearchPlaceIndexForSuggestionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
SearchPlaceIndexForSuggestionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
SearchPlaceIndexForSuggestionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SearchPlaceIndexForSuggestionsError {
fn code(&self) -> Option<&str> {
SearchPlaceIndexForSuggestionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SearchPlaceIndexForSuggestionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
SearchPlaceIndexForSuggestionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SearchPlaceIndexForSuggestionsError {
pub fn new(
kind: SearchPlaceIndexForSuggestionsErrorKind,
meta: aws_smithy_types::Error,
) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: SearchPlaceIndexForSuggestionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SearchPlaceIndexForSuggestionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForSuggestionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForSuggestionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForSuggestionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForSuggestionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForSuggestionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for SearchPlaceIndexForSuggestionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SearchPlaceIndexForSuggestionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
SearchPlaceIndexForSuggestionsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
SearchPlaceIndexForSuggestionsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
SearchPlaceIndexForSuggestionsErrorKind::ThrottlingException(_inner) => Some(_inner),
SearchPlaceIndexForSuggestionsErrorKind::ValidationException(_inner) => Some(_inner),
SearchPlaceIndexForSuggestionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SearchPlaceIndexForPositionError {
pub kind: SearchPlaceIndexForPositionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for SearchPlaceIndexForPositionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: SearchPlaceIndexForPositionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SearchPlaceIndexForPositionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for SearchPlaceIndexForPositionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SearchPlaceIndexForPositionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
SearchPlaceIndexForPositionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
SearchPlaceIndexForPositionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
SearchPlaceIndexForPositionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
SearchPlaceIndexForPositionErrorKind::ValidationException(_inner) => _inner.fmt(f),
SearchPlaceIndexForPositionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SearchPlaceIndexForPositionError {
fn code(&self) -> Option<&str> {
SearchPlaceIndexForPositionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SearchPlaceIndexForPositionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
SearchPlaceIndexForPositionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SearchPlaceIndexForPositionError {
pub fn new(kind: SearchPlaceIndexForPositionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: SearchPlaceIndexForPositionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SearchPlaceIndexForPositionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForPositionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForPositionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForPositionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForPositionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
SearchPlaceIndexForPositionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for SearchPlaceIndexForPositionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SearchPlaceIndexForPositionErrorKind::AccessDeniedException(_inner) => Some(_inner),
SearchPlaceIndexForPositionErrorKind::InternalServerException(_inner) => Some(_inner),
SearchPlaceIndexForPositionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
SearchPlaceIndexForPositionErrorKind::ThrottlingException(_inner) => Some(_inner),
SearchPlaceIndexForPositionErrorKind::ValidationException(_inner) => Some(_inner),
SearchPlaceIndexForPositionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetPlaceError {
pub kind: GetPlaceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetPlaceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetPlaceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetPlaceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetPlaceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetPlaceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetPlaceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetPlaceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetPlaceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetPlaceErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetPlaceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetPlaceError {
fn code(&self) -> Option<&str> {
GetPlaceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetPlaceErrorKind::InternalServerException(inner) => Some(inner.retryable_error_kind()),
GetPlaceErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetPlaceError {
pub fn new(kind: GetPlaceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetPlaceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetPlaceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetPlaceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetPlaceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetPlaceErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetPlaceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetPlaceErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetPlaceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetPlaceErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetPlaceErrorKind::InternalServerException(_inner) => Some(_inner),
GetPlaceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetPlaceErrorKind::ThrottlingException(_inner) => Some(_inner),
GetPlaceErrorKind::ValidationException(_inner) => Some(_inner),
GetPlaceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPlaceIndexesError {
pub kind: ListPlaceIndexesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPlaceIndexesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPlaceIndexesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPlaceIndexesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPlaceIndexesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPlaceIndexesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListPlaceIndexesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListPlaceIndexesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListPlaceIndexesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListPlaceIndexesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPlaceIndexesError {
fn code(&self) -> Option<&str> {
ListPlaceIndexesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListPlaceIndexesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListPlaceIndexesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListPlaceIndexesError {
pub fn new(kind: ListPlaceIndexesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListPlaceIndexesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPlaceIndexesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListPlaceIndexesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListPlaceIndexesErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListPlaceIndexesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListPlaceIndexesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListPlaceIndexesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPlaceIndexesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListPlaceIndexesErrorKind::InternalServerException(_inner) => Some(_inner),
ListPlaceIndexesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListPlaceIndexesErrorKind::ValidationException(_inner) => Some(_inner),
ListPlaceIndexesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePlaceIndexError {
pub kind: CreatePlaceIndexErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreatePlaceIndexError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreatePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePlaceIndexErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreatePlaceIndexError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePlaceIndexErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreatePlaceIndexErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreatePlaceIndexErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreatePlaceIndexErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreatePlaceIndexErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreatePlaceIndexErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreatePlaceIndexErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePlaceIndexError {
fn code(&self) -> Option<&str> {
CreatePlaceIndexError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreatePlaceIndexErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreatePlaceIndexErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreatePlaceIndexError {
pub fn new(kind: CreatePlaceIndexErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreatePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreatePlaceIndexErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreatePlaceIndexErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreatePlaceIndexErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreatePlaceIndexErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreatePlaceIndexErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreatePlaceIndexErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreatePlaceIndexError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePlaceIndexErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreatePlaceIndexErrorKind::ConflictException(_inner) => Some(_inner),
CreatePlaceIndexErrorKind::InternalServerException(_inner) => Some(_inner),
CreatePlaceIndexErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreatePlaceIndexErrorKind::ThrottlingException(_inner) => Some(_inner),
CreatePlaceIndexErrorKind::ValidationException(_inner) => Some(_inner),
CreatePlaceIndexErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePlaceIndexError {
pub kind: DeletePlaceIndexErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeletePlaceIndexError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePlaceIndexErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePlaceIndexError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePlaceIndexErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeletePlaceIndexErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeletePlaceIndexErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeletePlaceIndexErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeletePlaceIndexErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeletePlaceIndexErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePlaceIndexError {
fn code(&self) -> Option<&str> {
DeletePlaceIndexError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeletePlaceIndexErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeletePlaceIndexErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeletePlaceIndexError {
pub fn new(kind: DeletePlaceIndexErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeletePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeletePlaceIndexErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeletePlaceIndexErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeletePlaceIndexErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeletePlaceIndexErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeletePlaceIndexErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeletePlaceIndexError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePlaceIndexErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeletePlaceIndexErrorKind::InternalServerException(_inner) => Some(_inner),
DeletePlaceIndexErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeletePlaceIndexErrorKind::ThrottlingException(_inner) => Some(_inner),
DeletePlaceIndexErrorKind::ValidationException(_inner) => Some(_inner),
DeletePlaceIndexErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdatePlaceIndexError {
pub kind: UpdatePlaceIndexErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdatePlaceIndexError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdatePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdatePlaceIndexErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdatePlaceIndexError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdatePlaceIndexErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdatePlaceIndexErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdatePlaceIndexErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdatePlaceIndexErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdatePlaceIndexErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdatePlaceIndexErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdatePlaceIndexError {
fn code(&self) -> Option<&str> {
UpdatePlaceIndexError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdatePlaceIndexErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdatePlaceIndexErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdatePlaceIndexError {
pub fn new(kind: UpdatePlaceIndexErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdatePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdatePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePlaceIndexErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePlaceIndexErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePlaceIndexErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePlaceIndexErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePlaceIndexErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdatePlaceIndexError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdatePlaceIndexErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdatePlaceIndexErrorKind::InternalServerException(_inner) => Some(_inner),
UpdatePlaceIndexErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdatePlaceIndexErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdatePlaceIndexErrorKind::ValidationException(_inner) => Some(_inner),
UpdatePlaceIndexErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribePlaceIndexError {
pub kind: DescribePlaceIndexErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribePlaceIndexError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribePlaceIndexErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribePlaceIndexError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribePlaceIndexErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribePlaceIndexErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribePlaceIndexErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribePlaceIndexErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribePlaceIndexErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribePlaceIndexErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribePlaceIndexError {
fn code(&self) -> Option<&str> {
DescribePlaceIndexError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribePlaceIndexErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribePlaceIndexErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribePlaceIndexError {
pub fn new(kind: DescribePlaceIndexErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribePlaceIndexErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribePlaceIndexErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribePlaceIndexErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribePlaceIndexErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribePlaceIndexErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribePlaceIndexErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribePlaceIndexError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribePlaceIndexErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribePlaceIndexErrorKind::InternalServerException(_inner) => Some(_inner),
DescribePlaceIndexErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribePlaceIndexErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribePlaceIndexErrorKind::ValidationException(_inner) => Some(_inner),
DescribePlaceIndexErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetMapTileError {
pub kind: GetMapTileErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetMapTileError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetMapTileErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMapTileErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetMapTileError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMapTileErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetMapTileErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetMapTileErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetMapTileErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetMapTileErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetMapTileErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMapTileError {
fn code(&self) -> Option<&str> {
GetMapTileError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetMapTileErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetMapTileErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetMapTileError {
pub fn new(kind: GetMapTileErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetMapTileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMapTileErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetMapTileErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetMapTileErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetMapTileErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetMapTileErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetMapTileErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetMapTileError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMapTileErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetMapTileErrorKind::InternalServerException(_inner) => Some(_inner),
GetMapTileErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetMapTileErrorKind::ThrottlingException(_inner) => Some(_inner),
GetMapTileErrorKind::ValidationException(_inner) => Some(_inner),
GetMapTileErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetMapStyleDescriptorError {
pub kind: GetMapStyleDescriptorErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetMapStyleDescriptorError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetMapStyleDescriptorErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMapStyleDescriptorErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetMapStyleDescriptorError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMapStyleDescriptorErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetMapStyleDescriptorErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetMapStyleDescriptorErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetMapStyleDescriptorErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetMapStyleDescriptorErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetMapStyleDescriptorErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMapStyleDescriptorError {
fn code(&self) -> Option<&str> {
GetMapStyleDescriptorError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetMapStyleDescriptorErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetMapStyleDescriptorErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetMapStyleDescriptorError {
pub fn new(kind: GetMapStyleDescriptorErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetMapStyleDescriptorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMapStyleDescriptorErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetMapStyleDescriptorErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetMapStyleDescriptorErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetMapStyleDescriptorErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetMapStyleDescriptorErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetMapStyleDescriptorErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetMapStyleDescriptorError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMapStyleDescriptorErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetMapStyleDescriptorErrorKind::InternalServerException(_inner) => Some(_inner),
GetMapStyleDescriptorErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetMapStyleDescriptorErrorKind::ThrottlingException(_inner) => Some(_inner),
GetMapStyleDescriptorErrorKind::ValidationException(_inner) => Some(_inner),
GetMapStyleDescriptorErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetMapSpritesError {
pub kind: GetMapSpritesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetMapSpritesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetMapSpritesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMapSpritesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetMapSpritesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMapSpritesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetMapSpritesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetMapSpritesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetMapSpritesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetMapSpritesErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetMapSpritesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMapSpritesError {
fn code(&self) -> Option<&str> {
GetMapSpritesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetMapSpritesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetMapSpritesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetMapSpritesError {
pub fn new(kind: GetMapSpritesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetMapSpritesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMapSpritesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetMapSpritesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetMapSpritesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetMapSpritesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetMapSpritesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetMapSpritesErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetMapSpritesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMapSpritesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetMapSpritesErrorKind::InternalServerException(_inner) => Some(_inner),
GetMapSpritesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetMapSpritesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetMapSpritesErrorKind::ValidationException(_inner) => Some(_inner),
GetMapSpritesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetMapGlyphsError {
pub kind: GetMapGlyphsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetMapGlyphsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetMapGlyphsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetMapGlyphsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetMapGlyphsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetMapGlyphsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetMapGlyphsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetMapGlyphsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetMapGlyphsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetMapGlyphsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetMapGlyphsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetMapGlyphsError {
fn code(&self) -> Option<&str> {
GetMapGlyphsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetMapGlyphsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetMapGlyphsErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetMapGlyphsError {
pub fn new(kind: GetMapGlyphsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetMapGlyphsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetMapGlyphsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetMapGlyphsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetMapGlyphsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetMapGlyphsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetMapGlyphsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetMapGlyphsErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetMapGlyphsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetMapGlyphsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetMapGlyphsErrorKind::InternalServerException(_inner) => Some(_inner),
GetMapGlyphsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetMapGlyphsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetMapGlyphsErrorKind::ValidationException(_inner) => Some(_inner),
GetMapGlyphsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListMapsError {
pub kind: ListMapsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListMapsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListMapsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListMapsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListMapsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListMapsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListMapsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListMapsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListMapsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListMapsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListMapsError {
fn code(&self) -> Option<&str> {
ListMapsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListMapsErrorKind::InternalServerException(inner) => Some(inner.retryable_error_kind()),
ListMapsErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl ListMapsError {
pub fn new(kind: ListMapsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListMapsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListMapsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, ListMapsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, ListMapsErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListMapsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListMapsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListMapsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListMapsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListMapsErrorKind::InternalServerException(_inner) => Some(_inner),
ListMapsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListMapsErrorKind::ValidationException(_inner) => Some(_inner),
ListMapsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateMapError {
pub kind: CreateMapErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateMapError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateMapErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateMapErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateMapError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateMapErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateMapErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateMapErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateMapErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateMapErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateMapErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateMapErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateMapError {
fn code(&self) -> Option<&str> {
CreateMapError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateMapErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateMapErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl CreateMapError {
pub fn new(kind: CreateMapErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateMapErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateMapErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, CreateMapErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateMapErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, CreateMapErrorKind::InternalServerException(_))
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateMapErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateMapErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateMapErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateMapError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateMapErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateMapErrorKind::ConflictException(_inner) => Some(_inner),
CreateMapErrorKind::InternalServerException(_inner) => Some(_inner),
CreateMapErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateMapErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateMapErrorKind::ValidationException(_inner) => Some(_inner),
CreateMapErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteMapError {
pub kind: DeleteMapErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteMapError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteMapErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteMapErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteMapError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteMapErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteMapErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteMapErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteMapErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteMapErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteMapErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteMapError {
fn code(&self) -> Option<&str> {
DeleteMapError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteMapErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteMapErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl DeleteMapError {
pub fn new(kind: DeleteMapErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteMapErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteMapErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DeleteMapErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeleteMapErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, DeleteMapErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteMapErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteMapErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteMapError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteMapErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteMapErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteMapErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteMapErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteMapErrorKind::ValidationException(_inner) => Some(_inner),
DeleteMapErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateMapError {
pub kind: UpdateMapErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateMapError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateMapErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateMapErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateMapError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateMapErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateMapErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateMapErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateMapErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateMapErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateMapErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateMapError {
fn code(&self) -> Option<&str> {
UpdateMapError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateMapErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateMapErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl UpdateMapError {
pub fn new(kind: UpdateMapErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateMapErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateMapErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UpdateMapErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, UpdateMapErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, UpdateMapErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateMapErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateMapErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateMapError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateMapErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateMapErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateMapErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateMapErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateMapErrorKind::ValidationException(_inner) => Some(_inner),
UpdateMapErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeMapError {
pub kind: DescribeMapErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeMapError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeMapErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeMapErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeMapError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeMapErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeMapErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeMapErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeMapErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeMapErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeMapErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeMapError {
fn code(&self) -> Option<&str> {
DescribeMapError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeMapErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeMapErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl DescribeMapError {
pub fn new(kind: DescribeMapErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeMapErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeMapErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, DescribeMapErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DescribeMapErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeMapErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DescribeMapErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DescribeMapErrorKind::ValidationException(_))
}
}
impl std::error::Error for DescribeMapError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeMapErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeMapErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeMapErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeMapErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeMapErrorKind::ValidationException(_inner) => Some(_inner),
DescribeMapErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutGeofenceError {
pub kind: PutGeofenceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutGeofenceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutGeofenceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutGeofenceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutGeofenceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutGeofenceErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutGeofenceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutGeofenceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutGeofenceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutGeofenceErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutGeofenceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutGeofenceError {
fn code(&self) -> Option<&str> {
PutGeofenceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
PutGeofenceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
PutGeofenceErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl PutGeofenceError {
pub fn new(kind: PutGeofenceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: PutGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, PutGeofenceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutGeofenceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, PutGeofenceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutGeofenceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PutGeofenceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, PutGeofenceErrorKind::ValidationException(_))
}
}
impl std::error::Error for PutGeofenceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutGeofenceErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutGeofenceErrorKind::ConflictException(_inner) => Some(_inner),
PutGeofenceErrorKind::InternalServerException(_inner) => Some(_inner),
PutGeofenceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutGeofenceErrorKind::ThrottlingException(_inner) => Some(_inner),
PutGeofenceErrorKind::ValidationException(_inner) => Some(_inner),
PutGeofenceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListGeofencesError {
pub kind: ListGeofencesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListGeofencesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListGeofencesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListGeofencesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListGeofencesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListGeofencesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListGeofencesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListGeofencesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListGeofencesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListGeofencesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListGeofencesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListGeofencesError {
fn code(&self) -> Option<&str> {
ListGeofencesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListGeofencesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListGeofencesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListGeofencesError {
pub fn new(kind: ListGeofencesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListGeofencesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListGeofencesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, ListGeofencesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListGeofencesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListGeofencesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListGeofencesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListGeofencesErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListGeofencesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListGeofencesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListGeofencesErrorKind::InternalServerException(_inner) => Some(_inner),
ListGeofencesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListGeofencesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListGeofencesErrorKind::ValidationException(_inner) => Some(_inner),
ListGeofencesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetGeofenceError {
pub kind: GetGeofenceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetGeofenceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetGeofenceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetGeofenceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetGeofenceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetGeofenceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetGeofenceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetGeofenceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetGeofenceErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetGeofenceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetGeofenceError {
fn code(&self) -> Option<&str> {
GetGeofenceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetGeofenceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetGeofenceErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetGeofenceError {
pub fn new(kind: GetGeofenceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: GetGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetGeofenceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetGeofenceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetGeofenceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetGeofenceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetGeofenceErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetGeofenceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetGeofenceErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetGeofenceErrorKind::InternalServerException(_inner) => Some(_inner),
GetGeofenceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetGeofenceErrorKind::ThrottlingException(_inner) => Some(_inner),
GetGeofenceErrorKind::ValidationException(_inner) => Some(_inner),
GetGeofenceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchPutGeofenceError {
pub kind: BatchPutGeofenceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchPutGeofenceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchPutGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchPutGeofenceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchPutGeofenceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchPutGeofenceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
BatchPutGeofenceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchPutGeofenceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
BatchPutGeofenceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchPutGeofenceErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchPutGeofenceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchPutGeofenceError {
fn code(&self) -> Option<&str> {
BatchPutGeofenceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
BatchPutGeofenceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
BatchPutGeofenceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl BatchPutGeofenceError {
pub fn new(kind: BatchPutGeofenceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchPutGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchPutGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
BatchPutGeofenceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchPutGeofenceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchPutGeofenceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchPutGeofenceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchPutGeofenceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchPutGeofenceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchPutGeofenceErrorKind::AccessDeniedException(_inner) => Some(_inner),
BatchPutGeofenceErrorKind::InternalServerException(_inner) => Some(_inner),
BatchPutGeofenceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
BatchPutGeofenceErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchPutGeofenceErrorKind::ValidationException(_inner) => Some(_inner),
BatchPutGeofenceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchEvaluateGeofencesError {
pub kind: BatchEvaluateGeofencesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchEvaluateGeofencesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchEvaluateGeofencesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchEvaluateGeofencesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchEvaluateGeofencesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchEvaluateGeofencesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
BatchEvaluateGeofencesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchEvaluateGeofencesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
BatchEvaluateGeofencesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchEvaluateGeofencesErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchEvaluateGeofencesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchEvaluateGeofencesError {
fn code(&self) -> Option<&str> {
BatchEvaluateGeofencesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
BatchEvaluateGeofencesErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
BatchEvaluateGeofencesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl BatchEvaluateGeofencesError {
pub fn new(kind: BatchEvaluateGeofencesErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchEvaluateGeofencesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchEvaluateGeofencesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
BatchEvaluateGeofencesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchEvaluateGeofencesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchEvaluateGeofencesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchEvaluateGeofencesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchEvaluateGeofencesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchEvaluateGeofencesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchEvaluateGeofencesErrorKind::AccessDeniedException(_inner) => Some(_inner),
BatchEvaluateGeofencesErrorKind::InternalServerException(_inner) => Some(_inner),
BatchEvaluateGeofencesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
BatchEvaluateGeofencesErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchEvaluateGeofencesErrorKind::ValidationException(_inner) => Some(_inner),
BatchEvaluateGeofencesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchDeleteGeofenceError {
pub kind: BatchDeleteGeofenceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchDeleteGeofenceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchDeleteGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchDeleteGeofenceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchDeleteGeofenceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchDeleteGeofenceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
BatchDeleteGeofenceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchDeleteGeofenceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
BatchDeleteGeofenceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchDeleteGeofenceErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchDeleteGeofenceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchDeleteGeofenceError {
fn code(&self) -> Option<&str> {
BatchDeleteGeofenceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
BatchDeleteGeofenceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
BatchDeleteGeofenceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl BatchDeleteGeofenceError {
pub fn new(kind: BatchDeleteGeofenceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: BatchDeleteGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchDeleteGeofenceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteGeofenceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteGeofenceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteGeofenceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteGeofenceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchDeleteGeofenceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchDeleteGeofenceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchDeleteGeofenceErrorKind::AccessDeniedException(_inner) => Some(_inner),
BatchDeleteGeofenceErrorKind::InternalServerException(_inner) => Some(_inner),
BatchDeleteGeofenceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
BatchDeleteGeofenceErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchDeleteGeofenceErrorKind::ValidationException(_inner) => Some(_inner),
BatchDeleteGeofenceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListGeofenceCollectionsError {
pub kind: ListGeofenceCollectionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListGeofenceCollectionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListGeofenceCollectionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListGeofenceCollectionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListGeofenceCollectionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListGeofenceCollectionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListGeofenceCollectionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListGeofenceCollectionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListGeofenceCollectionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListGeofenceCollectionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListGeofenceCollectionsError {
fn code(&self) -> Option<&str> {
ListGeofenceCollectionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListGeofenceCollectionsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListGeofenceCollectionsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListGeofenceCollectionsError {
pub fn new(kind: ListGeofenceCollectionsErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListGeofenceCollectionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListGeofenceCollectionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListGeofenceCollectionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListGeofenceCollectionsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListGeofenceCollectionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListGeofenceCollectionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListGeofenceCollectionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListGeofenceCollectionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListGeofenceCollectionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListGeofenceCollectionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListGeofenceCollectionsErrorKind::ValidationException(_inner) => Some(_inner),
ListGeofenceCollectionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateGeofenceCollectionError {
pub kind: CreateGeofenceCollectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateGeofenceCollectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateGeofenceCollectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateGeofenceCollectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateGeofenceCollectionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateGeofenceCollectionErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateGeofenceCollectionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateGeofenceCollectionErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateGeofenceCollectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateGeofenceCollectionErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateGeofenceCollectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateGeofenceCollectionError {
fn code(&self) -> Option<&str> {
CreateGeofenceCollectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateGeofenceCollectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateGeofenceCollectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateGeofenceCollectionError {
pub fn new(kind: CreateGeofenceCollectionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateGeofenceCollectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateGeofenceCollectionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateGeofenceCollectionErrorKind::InternalServerException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateGeofenceCollectionErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateGeofenceCollectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateGeofenceCollectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateGeofenceCollectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateGeofenceCollectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateGeofenceCollectionErrorKind::ConflictException(_inner) => Some(_inner),
CreateGeofenceCollectionErrorKind::InternalServerException(_inner) => Some(_inner),
CreateGeofenceCollectionErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateGeofenceCollectionErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateGeofenceCollectionErrorKind::ValidationException(_inner) => Some(_inner),
CreateGeofenceCollectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteGeofenceCollectionError {
pub kind: DeleteGeofenceCollectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteGeofenceCollectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteGeofenceCollectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteGeofenceCollectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteGeofenceCollectionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteGeofenceCollectionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteGeofenceCollectionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteGeofenceCollectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteGeofenceCollectionErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteGeofenceCollectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteGeofenceCollectionError {
fn code(&self) -> Option<&str> {
DeleteGeofenceCollectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteGeofenceCollectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteGeofenceCollectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteGeofenceCollectionError {
pub fn new(kind: DeleteGeofenceCollectionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DeleteGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGeofenceCollectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGeofenceCollectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGeofenceCollectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGeofenceCollectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteGeofenceCollectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteGeofenceCollectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteGeofenceCollectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteGeofenceCollectionErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteGeofenceCollectionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteGeofenceCollectionErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteGeofenceCollectionErrorKind::ValidationException(_inner) => Some(_inner),
DeleteGeofenceCollectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateGeofenceCollectionError {
pub kind: UpdateGeofenceCollectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateGeofenceCollectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateGeofenceCollectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateGeofenceCollectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateGeofenceCollectionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateGeofenceCollectionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateGeofenceCollectionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateGeofenceCollectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateGeofenceCollectionErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateGeofenceCollectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateGeofenceCollectionError {
fn code(&self) -> Option<&str> {
UpdateGeofenceCollectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateGeofenceCollectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateGeofenceCollectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateGeofenceCollectionError {
pub fn new(kind: UpdateGeofenceCollectionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UpdateGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGeofenceCollectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGeofenceCollectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGeofenceCollectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGeofenceCollectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateGeofenceCollectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateGeofenceCollectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateGeofenceCollectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateGeofenceCollectionErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateGeofenceCollectionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateGeofenceCollectionErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateGeofenceCollectionErrorKind::ValidationException(_inner) => Some(_inner),
UpdateGeofenceCollectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeGeofenceCollectionError {
pub kind: DescribeGeofenceCollectionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeGeofenceCollectionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeGeofenceCollectionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeGeofenceCollectionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeGeofenceCollectionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeGeofenceCollectionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeGeofenceCollectionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeGeofenceCollectionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeGeofenceCollectionErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeGeofenceCollectionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeGeofenceCollectionError {
fn code(&self) -> Option<&str> {
DescribeGeofenceCollectionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeGeofenceCollectionErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DescribeGeofenceCollectionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeGeofenceCollectionError {
pub fn new(kind: DescribeGeofenceCollectionErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: DescribeGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeGeofenceCollectionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGeofenceCollectionErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGeofenceCollectionErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGeofenceCollectionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGeofenceCollectionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeGeofenceCollectionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeGeofenceCollectionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeGeofenceCollectionErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeGeofenceCollectionErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeGeofenceCollectionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeGeofenceCollectionErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeGeofenceCollectionErrorKind::ValidationException(_inner) => Some(_inner),
DescribeGeofenceCollectionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UntagResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UntagResourceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
UntagResourceErrorKind::ValidationException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
TagResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
TagResourceErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
TagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
TagResourceErrorKind::ValidationException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListTagsForResourceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InternalServerException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ValidationException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}