#[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>,
#[doc(hidden)]
pub retry_after_seconds: i32,
}
impl InternalServerException {
pub fn retry_after_seconds(&self) -> i32 {
self.retry_after_seconds
}
}
impl InternalServerException {
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_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
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>,
pub(crate) retry_after_seconds: std::option::Option<i32>,
}
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 retry_after_seconds(mut self, input: i32) -> Self {
self.retry_after_seconds = Some(input);
self
}
pub fn set_retry_after_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.retry_after_seconds = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
retry_after_seconds: self.retry_after_seconds.unwrap_or_default(),
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateVehicleFleetError {
pub kind: DisassociateVehicleFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateVehicleFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateVehicleFleetErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateVehicleFleetErrorKind {
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 DisassociateVehicleFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateVehicleFleetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DisassociateVehicleFleetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DisassociateVehicleFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DisassociateVehicleFleetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DisassociateVehicleFleetErrorKind::ValidationException(_inner) => _inner.fmt(f),
DisassociateVehicleFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateVehicleFleetError {
fn code(&self) -> Option<&str> {
DisassociateVehicleFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateVehicleFleetError {
pub fn new(kind: DisassociateVehicleFleetErrorKind, 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: DisassociateVehicleFleetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateVehicleFleetErrorKind::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,
DisassociateVehicleFleetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateVehicleFleetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateVehicleFleetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateVehicleFleetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateVehicleFleetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DisassociateVehicleFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateVehicleFleetErrorKind::AccessDeniedException(_inner) => Some(_inner),
DisassociateVehicleFleetErrorKind::InternalServerException(_inner) => Some(_inner),
DisassociateVehicleFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DisassociateVehicleFleetErrorKind::ThrottlingException(_inner) => Some(_inner),
DisassociateVehicleFleetErrorKind::ValidationException(_inner) => Some(_inner),
DisassociateVehicleFleetErrorKind::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_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
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>,
#[doc(hidden)]
pub quota_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub retry_after_seconds: i32,
}
impl ThrottlingException {
pub fn quota_code(&self) -> std::option::Option<&str> {
self.quota_code.as_deref()
}
pub fn service_code(&self) -> std::option::Option<&str> {
self.service_code.as_deref()
}
pub fn retry_after_seconds(&self) -> i32 {
self.retry_after_seconds
}
}
impl ThrottlingException {
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_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
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>,
pub(crate) quota_code: std::option::Option<std::string::String>,
pub(crate) service_code: std::option::Option<std::string::String>,
pub(crate) retry_after_seconds: std::option::Option<i32>,
}
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 quota_code(mut self, input: impl Into<std::string::String>) -> Self {
self.quota_code = Some(input.into());
self
}
pub fn set_quota_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.quota_code = input;
self
}
pub fn service_code(mut self, input: impl Into<std::string::String>) -> Self {
self.service_code = Some(input.into());
self
}
pub fn set_service_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_code = input;
self
}
pub fn retry_after_seconds(mut self, input: i32) -> Self {
self.retry_after_seconds = Some(input);
self
}
pub fn set_retry_after_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.retry_after_seconds = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
quota_code: self.quota_code,
service_code: self.service_code,
retry_after_seconds: self.retry_after_seconds.unwrap_or_default(),
}
}
}
}
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>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
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_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
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>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: 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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
}
}
}
}
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 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 AssociateVehicleFleetError {
pub kind: AssociateVehicleFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateVehicleFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateVehicleFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateVehicleFleetErrorKind {
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 AssociateVehicleFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateVehicleFleetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
AssociateVehicleFleetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
AssociateVehicleFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
AssociateVehicleFleetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
AssociateVehicleFleetErrorKind::ValidationException(_inner) => _inner.fmt(f),
AssociateVehicleFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateVehicleFleetError {
fn code(&self) -> Option<&str> {
AssociateVehicleFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateVehicleFleetError {
pub fn new(kind: AssociateVehicleFleetErrorKind, 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: AssociateVehicleFleetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateVehicleFleetErrorKind::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,
AssociateVehicleFleetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AssociateVehicleFleetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AssociateVehicleFleetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AssociateVehicleFleetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateVehicleFleetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AssociateVehicleFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateVehicleFleetErrorKind::AccessDeniedException(_inner) => Some(_inner),
AssociateVehicleFleetErrorKind::InternalServerException(_inner) => Some(_inner),
AssociateVehicleFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
AssociateVehicleFleetErrorKind::ThrottlingException(_inner) => Some(_inner),
AssociateVehicleFleetErrorKind::ValidationException(_inner) => Some(_inner),
AssociateVehicleFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListVehiclesError {
pub kind: ListVehiclesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListVehiclesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListVehiclesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListVehiclesErrorKind {
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 ListVehiclesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListVehiclesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListVehiclesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListVehiclesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListVehiclesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListVehiclesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListVehiclesError {
fn code(&self) -> Option<&str> {
ListVehiclesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListVehiclesError {
pub fn new(kind: ListVehiclesErrorKind, 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: ListVehiclesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListVehiclesErrorKind::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, ListVehiclesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListVehiclesErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListVehiclesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListVehiclesErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListVehiclesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListVehiclesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListVehiclesErrorKind::InternalServerException(_inner) => Some(_inner),
ListVehiclesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListVehiclesErrorKind::ValidationException(_inner) => Some(_inner),
ListVehiclesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateVehicleError {
pub kind: CreateVehicleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateVehicleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateVehicleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateVehicleErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateVehicleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateVehicleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateVehicleErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateVehicleErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateVehicleErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateVehicleErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateVehicleErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateVehicleErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateVehicleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateVehicleError {
fn code(&self) -> Option<&str> {
CreateVehicleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateVehicleError {
pub fn new(kind: CreateVehicleErrorKind, 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: CreateVehicleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateVehicleErrorKind::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, CreateVehicleErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateVehicleErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateVehicleErrorKind::InternalServerException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateVehicleErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateVehicleErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateVehicleErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateVehicleErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateVehicleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateVehicleErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateVehicleErrorKind::ConflictException(_inner) => Some(_inner),
CreateVehicleErrorKind::InternalServerException(_inner) => Some(_inner),
CreateVehicleErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateVehicleErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateVehicleErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateVehicleErrorKind::ValidationException(_inner) => Some(_inner),
CreateVehicleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_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>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: 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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_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>,
#[doc(hidden)]
pub resource: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn resource(&self) -> std::option::Option<&str> {
self.resource.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
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>,
pub(crate) resource: std::option::Option<std::string::String>,
pub(crate) resource_type: 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 resource(mut self, input: impl Into<std::string::String>) -> Self {
self.resource = Some(input.into());
self
}
pub fn set_resource(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
resource: self.resource,
resource_type: self.resource_type,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteVehicleError {
pub kind: DeleteVehicleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteVehicleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteVehicleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteVehicleErrorKind {
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 DeleteVehicleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteVehicleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteVehicleErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteVehicleErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteVehicleErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteVehicleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteVehicleError {
fn code(&self) -> Option<&str> {
DeleteVehicleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteVehicleError {
pub fn new(kind: DeleteVehicleErrorKind, 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: DeleteVehicleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteVehicleErrorKind::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, DeleteVehicleErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteVehicleErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteVehicleErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteVehicleErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteVehicleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteVehicleErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteVehicleErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteVehicleErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteVehicleErrorKind::ValidationException(_inner) => Some(_inner),
DeleteVehicleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateVehicleError {
pub kind: UpdateVehicleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateVehicleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateVehicleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateVehicleErrorKind {
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 UpdateVehicleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateVehicleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateVehicleErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateVehicleErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateVehicleErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateVehicleErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateVehicleErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateVehicleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateVehicleError {
fn code(&self) -> Option<&str> {
UpdateVehicleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateVehicleError {
pub fn new(kind: UpdateVehicleErrorKind, 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: UpdateVehicleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateVehicleErrorKind::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, UpdateVehicleErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateVehicleErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateVehicleErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateVehicleErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateVehicleErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateVehicleErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateVehicleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateVehicleErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateVehicleErrorKind::ConflictException(_inner) => Some(_inner),
UpdateVehicleErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateVehicleErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateVehicleErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateVehicleErrorKind::ValidationException(_inner) => Some(_inner),
UpdateVehicleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetVehicleError {
pub kind: GetVehicleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetVehicleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetVehicleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetVehicleErrorKind {
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 GetVehicleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetVehicleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetVehicleErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetVehicleErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetVehicleErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetVehicleErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetVehicleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetVehicleError {
fn code(&self) -> Option<&str> {
GetVehicleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetVehicleError {
pub fn new(kind: GetVehicleErrorKind, 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: GetVehicleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetVehicleErrorKind::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, GetVehicleErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetVehicleErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetVehicleErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetVehicleErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetVehicleErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetVehicleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetVehicleErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetVehicleErrorKind::InternalServerException(_inner) => Some(_inner),
GetVehicleErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetVehicleErrorKind::ThrottlingException(_inner) => Some(_inner),
GetVehicleErrorKind::ValidationException(_inner) => Some(_inner),
GetVehicleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListFleetsForVehicleError {
pub kind: ListFleetsForVehicleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListFleetsForVehicleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListFleetsForVehicleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListFleetsForVehicleErrorKind {
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 ListFleetsForVehicleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListFleetsForVehicleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListFleetsForVehicleErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListFleetsForVehicleErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListFleetsForVehicleErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListFleetsForVehicleErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListFleetsForVehicleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListFleetsForVehicleError {
fn code(&self) -> Option<&str> {
ListFleetsForVehicleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListFleetsForVehicleError {
pub fn new(kind: ListFleetsForVehicleErrorKind, 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: ListFleetsForVehicleErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListFleetsForVehicleErrorKind::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,
ListFleetsForVehicleErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListFleetsForVehicleErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListFleetsForVehicleErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListFleetsForVehicleErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListFleetsForVehicleErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListFleetsForVehicleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListFleetsForVehicleErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListFleetsForVehicleErrorKind::InternalServerException(_inner) => Some(_inner),
ListFleetsForVehicleErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListFleetsForVehicleErrorKind::ThrottlingException(_inner) => Some(_inner),
ListFleetsForVehicleErrorKind::ValidationException(_inner) => Some(_inner),
ListFleetsForVehicleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSignalCatalogNodesError {
pub kind: ListSignalCatalogNodesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSignalCatalogNodesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSignalCatalogNodesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSignalCatalogNodesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSignalCatalogNodesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSignalCatalogNodesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListSignalCatalogNodesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListSignalCatalogNodesErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ListSignalCatalogNodesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListSignalCatalogNodesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListSignalCatalogNodesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListSignalCatalogNodesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSignalCatalogNodesError {
fn code(&self) -> Option<&str> {
ListSignalCatalogNodesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSignalCatalogNodesError {
pub fn new(kind: ListSignalCatalogNodesErrorKind, 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: ListSignalCatalogNodesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSignalCatalogNodesErrorKind::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,
ListSignalCatalogNodesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListSignalCatalogNodesErrorKind::InternalServerException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListSignalCatalogNodesErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListSignalCatalogNodesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListSignalCatalogNodesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListSignalCatalogNodesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListSignalCatalogNodesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSignalCatalogNodesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListSignalCatalogNodesErrorKind::InternalServerException(_inner) => Some(_inner),
ListSignalCatalogNodesErrorKind::LimitExceededException(_inner) => Some(_inner),
ListSignalCatalogNodesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListSignalCatalogNodesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListSignalCatalogNodesErrorKind::ValidationException(_inner) => Some(_inner),
ListSignalCatalogNodesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportSignalCatalogError {
pub kind: ImportSignalCatalogErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportSignalCatalogError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportSignalCatalogErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidSignalsException(crate::error::InvalidSignalsException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportSignalCatalogError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportSignalCatalogErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ImportSignalCatalogErrorKind::ConflictException(_inner) => _inner.fmt(f),
ImportSignalCatalogErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ImportSignalCatalogErrorKind::InvalidSignalsException(_inner) => _inner.fmt(f),
ImportSignalCatalogErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ImportSignalCatalogErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ImportSignalCatalogErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ImportSignalCatalogErrorKind::ValidationException(_inner) => _inner.fmt(f),
ImportSignalCatalogErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportSignalCatalogError {
fn code(&self) -> Option<&str> {
ImportSignalCatalogError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportSignalCatalogError {
pub fn new(kind: ImportSignalCatalogErrorKind, 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: ImportSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportSignalCatalogErrorKind::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,
ImportSignalCatalogErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ImportSignalCatalogErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ImportSignalCatalogErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_signals_exception(&self) -> bool {
matches!(
&self.kind,
ImportSignalCatalogErrorKind::InvalidSignalsException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ImportSignalCatalogErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ImportSignalCatalogErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ImportSignalCatalogErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ImportSignalCatalogErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ImportSignalCatalogError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportSignalCatalogErrorKind::AccessDeniedException(_inner) => Some(_inner),
ImportSignalCatalogErrorKind::ConflictException(_inner) => Some(_inner),
ImportSignalCatalogErrorKind::InternalServerException(_inner) => Some(_inner),
ImportSignalCatalogErrorKind::InvalidSignalsException(_inner) => Some(_inner),
ImportSignalCatalogErrorKind::LimitExceededException(_inner) => Some(_inner),
ImportSignalCatalogErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ImportSignalCatalogErrorKind::ThrottlingException(_inner) => Some(_inner),
ImportSignalCatalogErrorKind::ValidationException(_inner) => Some(_inner),
ImportSignalCatalogErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidSignalsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub invalid_signals: std::option::Option<std::vec::Vec<crate::model::InvalidSignal>>,
}
impl InvalidSignalsException {
pub fn invalid_signals(&self) -> std::option::Option<&[crate::model::InvalidSignal]> {
self.invalid_signals.as_deref()
}
}
impl InvalidSignalsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidSignalsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidSignalsException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidSignalsException {}
pub mod invalid_signals_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) invalid_signals: std::option::Option<std::vec::Vec<crate::model::InvalidSignal>>,
}
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 invalid_signals(mut self, input: crate::model::InvalidSignal) -> Self {
let mut v = self.invalid_signals.unwrap_or_default();
v.push(input);
self.invalid_signals = Some(v);
self
}
pub fn set_invalid_signals(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InvalidSignal>>,
) -> Self {
self.invalid_signals = input;
self
}
pub fn build(self) -> crate::error::InvalidSignalsException {
crate::error::InvalidSignalsException {
message: self.message,
invalid_signals: self.invalid_signals,
}
}
}
}
impl InvalidSignalsException {
pub fn builder() -> crate::error::invalid_signals_exception::Builder {
crate::error::invalid_signals_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSignalCatalogsError {
pub kind: ListSignalCatalogsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSignalCatalogsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSignalCatalogsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSignalCatalogsErrorKind {
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 ListSignalCatalogsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSignalCatalogsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListSignalCatalogsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListSignalCatalogsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListSignalCatalogsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListSignalCatalogsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSignalCatalogsError {
fn code(&self) -> Option<&str> {
ListSignalCatalogsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListSignalCatalogsError {
pub fn new(kind: ListSignalCatalogsErrorKind, 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: ListSignalCatalogsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSignalCatalogsErrorKind::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,
ListSignalCatalogsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListSignalCatalogsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListSignalCatalogsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListSignalCatalogsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListSignalCatalogsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSignalCatalogsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListSignalCatalogsErrorKind::InternalServerException(_inner) => Some(_inner),
ListSignalCatalogsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListSignalCatalogsErrorKind::ValidationException(_inner) => Some(_inner),
ListSignalCatalogsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSignalCatalogError {
pub kind: CreateSignalCatalogErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSignalCatalogError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSignalCatalogErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InvalidNodeException(crate::error::InvalidNodeException),
InvalidSignalsException(crate::error::InvalidSignalsException),
LimitExceededException(crate::error::LimitExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSignalCatalogError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSignalCatalogErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateSignalCatalogErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateSignalCatalogErrorKind::InvalidNodeException(_inner) => _inner.fmt(f),
CreateSignalCatalogErrorKind::InvalidSignalsException(_inner) => _inner.fmt(f),
CreateSignalCatalogErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateSignalCatalogErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateSignalCatalogErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateSignalCatalogErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateSignalCatalogErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSignalCatalogError {
fn code(&self) -> Option<&str> {
CreateSignalCatalogError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSignalCatalogError {
pub fn new(kind: CreateSignalCatalogErrorKind, 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: CreateSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSignalCatalogErrorKind::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,
CreateSignalCatalogErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateSignalCatalogErrorKind::ConflictException(_)
)
}
pub fn is_invalid_node_exception(&self) -> bool {
matches!(
&self.kind,
CreateSignalCatalogErrorKind::InvalidNodeException(_)
)
}
pub fn is_invalid_signals_exception(&self) -> bool {
matches!(
&self.kind,
CreateSignalCatalogErrorKind::InvalidSignalsException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateSignalCatalogErrorKind::LimitExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateSignalCatalogErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateSignalCatalogErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateSignalCatalogErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for CreateSignalCatalogError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSignalCatalogErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateSignalCatalogErrorKind::ConflictException(_inner) => Some(_inner),
CreateSignalCatalogErrorKind::InvalidNodeException(_inner) => Some(_inner),
CreateSignalCatalogErrorKind::InvalidSignalsException(_inner) => Some(_inner),
CreateSignalCatalogErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateSignalCatalogErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateSignalCatalogErrorKind::ValidationException(_inner) => Some(_inner),
CreateSignalCatalogErrorKind::InternalServerException(_inner) => Some(_inner),
CreateSignalCatalogErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidNodeException {
#[doc(hidden)]
pub invalid_nodes: std::option::Option<std::vec::Vec<crate::model::Node>>,
#[doc(hidden)]
pub reason: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidNodeException {
pub fn invalid_nodes(&self) -> std::option::Option<&[crate::model::Node]> {
self.invalid_nodes.as_deref()
}
pub fn reason(&self) -> std::option::Option<&str> {
self.reason.as_deref()
}
}
impl InvalidNodeException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidNodeException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidNodeException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidNodeException {}
pub mod invalid_node_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) invalid_nodes: std::option::Option<std::vec::Vec<crate::model::Node>>,
pub(crate) reason: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn invalid_nodes(mut self, input: crate::model::Node) -> Self {
let mut v = self.invalid_nodes.unwrap_or_default();
v.push(input);
self.invalid_nodes = Some(v);
self
}
pub fn set_invalid_nodes(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::Node>>,
) -> Self {
self.invalid_nodes = input;
self
}
pub fn reason(mut self, input: impl Into<std::string::String>) -> Self {
self.reason = Some(input.into());
self
}
pub fn set_reason(mut self, input: std::option::Option<std::string::String>) -> Self {
self.reason = input;
self
}
#[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::InvalidNodeException {
crate::error::InvalidNodeException {
invalid_nodes: self.invalid_nodes,
reason: self.reason,
message: self.message,
}
}
}
}
impl InvalidNodeException {
pub fn builder() -> crate::error::invalid_node_exception::Builder {
crate::error::invalid_node_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSignalCatalogError {
pub kind: DeleteSignalCatalogErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteSignalCatalogError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteSignalCatalogErrorKind {
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 DeleteSignalCatalogError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteSignalCatalogErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteSignalCatalogErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteSignalCatalogErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteSignalCatalogErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteSignalCatalogErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteSignalCatalogErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteSignalCatalogError {
fn code(&self) -> Option<&str> {
DeleteSignalCatalogError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteSignalCatalogError {
pub fn new(kind: DeleteSignalCatalogErrorKind, 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: DeleteSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSignalCatalogErrorKind::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,
DeleteSignalCatalogErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSignalCatalogErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSignalCatalogErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSignalCatalogErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSignalCatalogErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteSignalCatalogError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteSignalCatalogErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteSignalCatalogErrorKind::ConflictException(_inner) => Some(_inner),
DeleteSignalCatalogErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteSignalCatalogErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteSignalCatalogErrorKind::ValidationException(_inner) => Some(_inner),
DeleteSignalCatalogErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateSignalCatalogError {
pub kind: UpdateSignalCatalogErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSignalCatalogError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSignalCatalogErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidNodeException(crate::error::InvalidNodeException),
InvalidSignalsException(crate::error::InvalidSignalsException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateSignalCatalogError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSignalCatalogErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateSignalCatalogErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateSignalCatalogErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateSignalCatalogErrorKind::InvalidNodeException(_inner) => _inner.fmt(f),
UpdateSignalCatalogErrorKind::InvalidSignalsException(_inner) => _inner.fmt(f),
UpdateSignalCatalogErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateSignalCatalogErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateSignalCatalogErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateSignalCatalogErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateSignalCatalogErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSignalCatalogError {
fn code(&self) -> Option<&str> {
UpdateSignalCatalogError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSignalCatalogError {
pub fn new(kind: UpdateSignalCatalogErrorKind, 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: UpdateSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSignalCatalogErrorKind::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,
UpdateSignalCatalogErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSignalCatalogErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSignalCatalogErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_node_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSignalCatalogErrorKind::InvalidNodeException(_)
)
}
pub fn is_invalid_signals_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSignalCatalogErrorKind::InvalidSignalsException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSignalCatalogErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSignalCatalogErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSignalCatalogErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSignalCatalogErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateSignalCatalogError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSignalCatalogErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateSignalCatalogErrorKind::ConflictException(_inner) => Some(_inner),
UpdateSignalCatalogErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateSignalCatalogErrorKind::InvalidNodeException(_inner) => Some(_inner),
UpdateSignalCatalogErrorKind::InvalidSignalsException(_inner) => Some(_inner),
UpdateSignalCatalogErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateSignalCatalogErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateSignalCatalogErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateSignalCatalogErrorKind::ValidationException(_inner) => Some(_inner),
UpdateSignalCatalogErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSignalCatalogError {
pub kind: GetSignalCatalogErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSignalCatalogError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSignalCatalogErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSignalCatalogError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSignalCatalogErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetSignalCatalogErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSignalCatalogErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetSignalCatalogErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetSignalCatalogErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetSignalCatalogErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSignalCatalogError {
fn code(&self) -> Option<&str> {
GetSignalCatalogError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSignalCatalogError {
pub fn new(kind: GetSignalCatalogErrorKind, 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: GetSignalCatalogErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSignalCatalogErrorKind::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,
GetSignalCatalogErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetSignalCatalogErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetSignalCatalogErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetSignalCatalogErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetSignalCatalogErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for GetSignalCatalogError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSignalCatalogErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetSignalCatalogErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSignalCatalogErrorKind::ThrottlingException(_inner) => Some(_inner),
GetSignalCatalogErrorKind::ValidationException(_inner) => Some(_inner),
GetSignalCatalogErrorKind::InternalServerException(_inner) => Some(_inner),
GetSignalCatalogErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListModelManifestNodesError {
pub kind: ListModelManifestNodesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListModelManifestNodesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListModelManifestNodesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListModelManifestNodesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListModelManifestNodesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListModelManifestNodesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListModelManifestNodesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListModelManifestNodesErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ListModelManifestNodesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListModelManifestNodesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListModelManifestNodesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListModelManifestNodesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListModelManifestNodesError {
fn code(&self) -> Option<&str> {
ListModelManifestNodesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListModelManifestNodesError {
pub fn new(kind: ListModelManifestNodesErrorKind, 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: ListModelManifestNodesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListModelManifestNodesErrorKind::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,
ListModelManifestNodesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListModelManifestNodesErrorKind::InternalServerException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListModelManifestNodesErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListModelManifestNodesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListModelManifestNodesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListModelManifestNodesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListModelManifestNodesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListModelManifestNodesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListModelManifestNodesErrorKind::InternalServerException(_inner) => Some(_inner),
ListModelManifestNodesErrorKind::LimitExceededException(_inner) => Some(_inner),
ListModelManifestNodesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListModelManifestNodesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListModelManifestNodesErrorKind::ValidationException(_inner) => Some(_inner),
ListModelManifestNodesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListModelManifestsError {
pub kind: ListModelManifestsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListModelManifestsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListModelManifestsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListModelManifestsErrorKind {
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 ListModelManifestsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListModelManifestsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListModelManifestsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListModelManifestsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListModelManifestsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListModelManifestsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListModelManifestsError {
fn code(&self) -> Option<&str> {
ListModelManifestsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListModelManifestsError {
pub fn new(kind: ListModelManifestsErrorKind, 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: ListModelManifestsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListModelManifestsErrorKind::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,
ListModelManifestsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListModelManifestsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListModelManifestsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListModelManifestsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListModelManifestsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListModelManifestsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListModelManifestsErrorKind::InternalServerException(_inner) => Some(_inner),
ListModelManifestsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListModelManifestsErrorKind::ValidationException(_inner) => Some(_inner),
ListModelManifestsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateModelManifestError {
pub kind: CreateModelManifestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateModelManifestError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateModelManifestErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateModelManifestErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InvalidSignalsException(crate::error::InvalidSignalsException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateModelManifestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateModelManifestErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateModelManifestErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateModelManifestErrorKind::InvalidSignalsException(_inner) => _inner.fmt(f),
CreateModelManifestErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateModelManifestErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateModelManifestErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateModelManifestErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateModelManifestErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateModelManifestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateModelManifestError {
fn code(&self) -> Option<&str> {
CreateModelManifestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateModelManifestError {
pub fn new(kind: CreateModelManifestErrorKind, 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: CreateModelManifestErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateModelManifestErrorKind::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,
CreateModelManifestErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelManifestErrorKind::ConflictException(_)
)
}
pub fn is_invalid_signals_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelManifestErrorKind::InvalidSignalsException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelManifestErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelManifestErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelManifestErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelManifestErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateModelManifestErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for CreateModelManifestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateModelManifestErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateModelManifestErrorKind::ConflictException(_inner) => Some(_inner),
CreateModelManifestErrorKind::InvalidSignalsException(_inner) => Some(_inner),
CreateModelManifestErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateModelManifestErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateModelManifestErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateModelManifestErrorKind::ValidationException(_inner) => Some(_inner),
CreateModelManifestErrorKind::InternalServerException(_inner) => Some(_inner),
CreateModelManifestErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteModelManifestError {
pub kind: DeleteModelManifestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteModelManifestError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteModelManifestErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteModelManifestErrorKind {
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 DeleteModelManifestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteModelManifestErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteModelManifestErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteModelManifestErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteModelManifestErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteModelManifestErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteModelManifestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteModelManifestError {
fn code(&self) -> Option<&str> {
DeleteModelManifestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteModelManifestError {
pub fn new(kind: DeleteModelManifestErrorKind, 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: DeleteModelManifestErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteModelManifestErrorKind::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,
DeleteModelManifestErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteModelManifestErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteModelManifestErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteModelManifestErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteModelManifestErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteModelManifestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteModelManifestErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteModelManifestErrorKind::ConflictException(_inner) => Some(_inner),
DeleteModelManifestErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteModelManifestErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteModelManifestErrorKind::ValidationException(_inner) => Some(_inner),
DeleteModelManifestErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateModelManifestError {
pub kind: UpdateModelManifestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateModelManifestError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateModelManifestErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateModelManifestErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidSignalsException(crate::error::InvalidSignalsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateModelManifestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateModelManifestErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateModelManifestErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateModelManifestErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateModelManifestErrorKind::InvalidSignalsException(_inner) => _inner.fmt(f),
UpdateModelManifestErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateModelManifestErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateModelManifestErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateModelManifestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateModelManifestError {
fn code(&self) -> Option<&str> {
UpdateModelManifestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateModelManifestError {
pub fn new(kind: UpdateModelManifestErrorKind, 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: UpdateModelManifestErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateModelManifestErrorKind::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,
UpdateModelManifestErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelManifestErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelManifestErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_signals_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelManifestErrorKind::InvalidSignalsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelManifestErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelManifestErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateModelManifestErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateModelManifestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateModelManifestErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateModelManifestErrorKind::ConflictException(_inner) => Some(_inner),
UpdateModelManifestErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateModelManifestErrorKind::InvalidSignalsException(_inner) => Some(_inner),
UpdateModelManifestErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateModelManifestErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateModelManifestErrorKind::ValidationException(_inner) => Some(_inner),
UpdateModelManifestErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetModelManifestError {
pub kind: GetModelManifestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetModelManifestError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetModelManifestErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetModelManifestErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetModelManifestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetModelManifestErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetModelManifestErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetModelManifestErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetModelManifestErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetModelManifestErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetModelManifestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetModelManifestError {
fn code(&self) -> Option<&str> {
GetModelManifestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetModelManifestError {
pub fn new(kind: GetModelManifestErrorKind, 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: GetModelManifestErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetModelManifestErrorKind::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,
GetModelManifestErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetModelManifestErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetModelManifestErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetModelManifestErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetModelManifestErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for GetModelManifestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetModelManifestErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetModelManifestErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetModelManifestErrorKind::ThrottlingException(_inner) => Some(_inner),
GetModelManifestErrorKind::ValidationException(_inner) => Some(_inner),
GetModelManifestErrorKind::InternalServerException(_inner) => Some(_inner),
GetModelManifestErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListFleetsError {
pub kind: ListFleetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListFleetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListFleetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListFleetsErrorKind {
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 ListFleetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListFleetsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListFleetsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListFleetsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListFleetsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListFleetsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListFleetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListFleetsError {
fn code(&self) -> Option<&str> {
ListFleetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListFleetsError {
pub fn new(kind: ListFleetsErrorKind, 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: ListFleetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListFleetsErrorKind::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, ListFleetsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, ListFleetsErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListFleetsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListFleetsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListFleetsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListFleetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListFleetsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListFleetsErrorKind::InternalServerException(_inner) => Some(_inner),
ListFleetsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListFleetsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListFleetsErrorKind::ValidationException(_inner) => Some(_inner),
ListFleetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateFleetError {
pub kind: CreateFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateFleetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateFleetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateFleetError {
fn code(&self) -> Option<&str> {
CreateFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateFleetError {
pub fn new(kind: CreateFleetErrorKind, 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: CreateFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateFleetErrorKind::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, CreateFleetErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateFleetErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, CreateFleetErrorKind::InternalServerException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(&self.kind, CreateFleetErrorKind::LimitExceededException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateFleetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateFleetErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateFleetErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateFleetErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateFleetErrorKind::ConflictException(_inner) => Some(_inner),
CreateFleetErrorKind::InternalServerException(_inner) => Some(_inner),
CreateFleetErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateFleetErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateFleetErrorKind::ValidationException(_inner) => Some(_inner),
CreateFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteFleetError {
pub kind: DeleteFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteFleetErrorKind {
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 DeleteFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteFleetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteFleetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteFleetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteFleetErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteFleetError {
fn code(&self) -> Option<&str> {
DeleteFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteFleetError {
pub fn new(kind: DeleteFleetErrorKind, 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: DeleteFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteFleetErrorKind::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, DeleteFleetErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, DeleteFleetErrorKind::InternalServerException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteFleetErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteFleetErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteFleetErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteFleetErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteFleetErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteFleetErrorKind::ValidationException(_inner) => Some(_inner),
DeleteFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFleetError {
pub kind: UpdateFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFleetErrorKind {
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 UpdateFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFleetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFleetError {
fn code(&self) -> Option<&str> {
UpdateFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFleetError {
pub fn new(kind: UpdateFleetErrorKind, 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: UpdateFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFleetErrorKind::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, UpdateFleetErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateFleetErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, UpdateFleetErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFleetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateFleetErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateFleetErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFleetErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateFleetErrorKind::ConflictException(_inner) => Some(_inner),
UpdateFleetErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateFleetErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateFleetErrorKind::ValidationException(_inner) => Some(_inner),
UpdateFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetFleetError {
pub kind: GetFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetFleetErrorKind {
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 GetFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetFleetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetFleetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetFleetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetFleetErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetFleetError {
fn code(&self) -> Option<&str> {
GetFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetFleetError {
pub fn new(kind: GetFleetErrorKind, 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: GetFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetFleetErrorKind::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, GetFleetErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetFleetErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetFleetErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetFleetErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetFleetErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetFleetErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetFleetErrorKind::InternalServerException(_inner) => Some(_inner),
GetFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetFleetErrorKind::ThrottlingException(_inner) => Some(_inner),
GetFleetErrorKind::ValidationException(_inner) => Some(_inner),
GetFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListVehiclesInFleetError {
pub kind: ListVehiclesInFleetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListVehiclesInFleetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListVehiclesInFleetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListVehiclesInFleetErrorKind {
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 ListVehiclesInFleetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListVehiclesInFleetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListVehiclesInFleetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListVehiclesInFleetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListVehiclesInFleetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListVehiclesInFleetErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListVehiclesInFleetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListVehiclesInFleetError {
fn code(&self) -> Option<&str> {
ListVehiclesInFleetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListVehiclesInFleetError {
pub fn new(kind: ListVehiclesInFleetErrorKind, 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: ListVehiclesInFleetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListVehiclesInFleetErrorKind::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,
ListVehiclesInFleetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListVehiclesInFleetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListVehiclesInFleetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListVehiclesInFleetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListVehiclesInFleetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListVehiclesInFleetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListVehiclesInFleetErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListVehiclesInFleetErrorKind::InternalServerException(_inner) => Some(_inner),
ListVehiclesInFleetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListVehiclesInFleetErrorKind::ThrottlingException(_inner) => Some(_inner),
ListVehiclesInFleetErrorKind::ValidationException(_inner) => Some(_inner),
ListVehiclesInFleetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDecoderManifestSignalsError {
pub kind: ListDecoderManifestSignalsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDecoderManifestSignalsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDecoderManifestSignalsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDecoderManifestSignalsErrorKind {
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 ListDecoderManifestSignalsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDecoderManifestSignalsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListDecoderManifestSignalsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListDecoderManifestSignalsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListDecoderManifestSignalsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDecoderManifestSignalsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListDecoderManifestSignalsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDecoderManifestSignalsError {
fn code(&self) -> Option<&str> {
ListDecoderManifestSignalsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDecoderManifestSignalsError {
pub fn new(kind: ListDecoderManifestSignalsErrorKind, 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: ListDecoderManifestSignalsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDecoderManifestSignalsErrorKind::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,
ListDecoderManifestSignalsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestSignalsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestSignalsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestSignalsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestSignalsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListDecoderManifestSignalsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDecoderManifestSignalsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListDecoderManifestSignalsErrorKind::InternalServerException(_inner) => Some(_inner),
ListDecoderManifestSignalsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListDecoderManifestSignalsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDecoderManifestSignalsErrorKind::ValidationException(_inner) => Some(_inner),
ListDecoderManifestSignalsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDecoderManifestNetworkInterfacesError {
pub kind: ListDecoderManifestNetworkInterfacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDecoderManifestNetworkInterfacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDecoderManifestNetworkInterfacesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDecoderManifestNetworkInterfacesErrorKind {
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 ListDecoderManifestNetworkInterfacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDecoderManifestNetworkInterfacesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListDecoderManifestNetworkInterfacesErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListDecoderManifestNetworkInterfacesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListDecoderManifestNetworkInterfacesErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListDecoderManifestNetworkInterfacesErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListDecoderManifestNetworkInterfacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDecoderManifestNetworkInterfacesError {
fn code(&self) -> Option<&str> {
ListDecoderManifestNetworkInterfacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDecoderManifestNetworkInterfacesError {
pub fn new(
kind: ListDecoderManifestNetworkInterfacesErrorKind,
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: ListDecoderManifestNetworkInterfacesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDecoderManifestNetworkInterfacesErrorKind::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,
ListDecoderManifestNetworkInterfacesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestNetworkInterfacesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestNetworkInterfacesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestNetworkInterfacesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestNetworkInterfacesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListDecoderManifestNetworkInterfacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDecoderManifestNetworkInterfacesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListDecoderManifestNetworkInterfacesErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListDecoderManifestNetworkInterfacesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListDecoderManifestNetworkInterfacesErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListDecoderManifestNetworkInterfacesErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListDecoderManifestNetworkInterfacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ImportDecoderManifestError {
pub kind: ImportDecoderManifestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ImportDecoderManifestError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ImportDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ImportDecoderManifestErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
DecoderManifestValidationException(crate::error::DecoderManifestValidationException),
InvalidSignalsException(crate::error::InvalidSignalsException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ImportDecoderManifestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ImportDecoderManifestErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ImportDecoderManifestErrorKind::ConflictException(_inner) => _inner.fmt(f),
ImportDecoderManifestErrorKind::DecoderManifestValidationException(_inner) => {
_inner.fmt(f)
}
ImportDecoderManifestErrorKind::InvalidSignalsException(_inner) => _inner.fmt(f),
ImportDecoderManifestErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ImportDecoderManifestErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ImportDecoderManifestErrorKind::ValidationException(_inner) => _inner.fmt(f),
ImportDecoderManifestErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ImportDecoderManifestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ImportDecoderManifestError {
fn code(&self) -> Option<&str> {
ImportDecoderManifestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ImportDecoderManifestError {
pub fn new(kind: ImportDecoderManifestErrorKind, 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: ImportDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ImportDecoderManifestErrorKind::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,
ImportDecoderManifestErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ImportDecoderManifestErrorKind::ConflictException(_)
)
}
pub fn is_decoder_manifest_validation_exception(&self) -> bool {
matches!(
&self.kind,
ImportDecoderManifestErrorKind::DecoderManifestValidationException(_)
)
}
pub fn is_invalid_signals_exception(&self) -> bool {
matches!(
&self.kind,
ImportDecoderManifestErrorKind::InvalidSignalsException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ImportDecoderManifestErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ImportDecoderManifestErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ImportDecoderManifestErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ImportDecoderManifestErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for ImportDecoderManifestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ImportDecoderManifestErrorKind::AccessDeniedException(_inner) => Some(_inner),
ImportDecoderManifestErrorKind::ConflictException(_inner) => Some(_inner),
ImportDecoderManifestErrorKind::DecoderManifestValidationException(_inner) => {
Some(_inner)
}
ImportDecoderManifestErrorKind::InvalidSignalsException(_inner) => Some(_inner),
ImportDecoderManifestErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ImportDecoderManifestErrorKind::ThrottlingException(_inner) => Some(_inner),
ImportDecoderManifestErrorKind::ValidationException(_inner) => Some(_inner),
ImportDecoderManifestErrorKind::InternalServerException(_inner) => Some(_inner),
ImportDecoderManifestErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DecoderManifestValidationException {
#[doc(hidden)]
pub invalid_signals: std::option::Option<std::vec::Vec<crate::model::InvalidSignalDecoder>>,
#[doc(hidden)]
pub invalid_network_interfaces:
std::option::Option<std::vec::Vec<crate::model::InvalidNetworkInterface>>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl DecoderManifestValidationException {
pub fn invalid_signals(&self) -> std::option::Option<&[crate::model::InvalidSignalDecoder]> {
self.invalid_signals.as_deref()
}
pub fn invalid_network_interfaces(
&self,
) -> std::option::Option<&[crate::model::InvalidNetworkInterface]> {
self.invalid_network_interfaces.as_deref()
}
}
impl DecoderManifestValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for DecoderManifestValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "DecoderManifestValidationException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for DecoderManifestValidationException {}
pub mod decoder_manifest_validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) invalid_signals:
std::option::Option<std::vec::Vec<crate::model::InvalidSignalDecoder>>,
pub(crate) invalid_network_interfaces:
std::option::Option<std::vec::Vec<crate::model::InvalidNetworkInterface>>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn invalid_signals(mut self, input: crate::model::InvalidSignalDecoder) -> Self {
let mut v = self.invalid_signals.unwrap_or_default();
v.push(input);
self.invalid_signals = Some(v);
self
}
pub fn set_invalid_signals(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InvalidSignalDecoder>>,
) -> Self {
self.invalid_signals = input;
self
}
pub fn invalid_network_interfaces(
mut self,
input: crate::model::InvalidNetworkInterface,
) -> Self {
let mut v = self.invalid_network_interfaces.unwrap_or_default();
v.push(input);
self.invalid_network_interfaces = Some(v);
self
}
pub fn set_invalid_network_interfaces(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::InvalidNetworkInterface>>,
) -> Self {
self.invalid_network_interfaces = input;
self
}
#[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::DecoderManifestValidationException {
crate::error::DecoderManifestValidationException {
invalid_signals: self.invalid_signals,
invalid_network_interfaces: self.invalid_network_interfaces,
message: self.message,
}
}
}
}
impl DecoderManifestValidationException {
pub fn builder() -> crate::error::decoder_manifest_validation_exception::Builder {
crate::error::decoder_manifest_validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDecoderManifestsError {
pub kind: ListDecoderManifestsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDecoderManifestsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDecoderManifestsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDecoderManifestsErrorKind {
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 ListDecoderManifestsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDecoderManifestsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListDecoderManifestsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListDecoderManifestsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDecoderManifestsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListDecoderManifestsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDecoderManifestsError {
fn code(&self) -> Option<&str> {
ListDecoderManifestsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDecoderManifestsError {
pub fn new(kind: ListDecoderManifestsErrorKind, 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: ListDecoderManifestsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDecoderManifestsErrorKind::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,
ListDecoderManifestsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListDecoderManifestsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListDecoderManifestsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDecoderManifestsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListDecoderManifestsErrorKind::InternalServerException(_inner) => Some(_inner),
ListDecoderManifestsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDecoderManifestsErrorKind::ValidationException(_inner) => Some(_inner),
ListDecoderManifestsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDecoderManifestError {
pub kind: CreateDecoderManifestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDecoderManifestError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDecoderManifestErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
DecoderManifestValidationException(crate::error::DecoderManifestValidationException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDecoderManifestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDecoderManifestErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateDecoderManifestErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateDecoderManifestErrorKind::DecoderManifestValidationException(_inner) => {
_inner.fmt(f)
}
CreateDecoderManifestErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateDecoderManifestErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDecoderManifestErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateDecoderManifestErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateDecoderManifestErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDecoderManifestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDecoderManifestError {
fn code(&self) -> Option<&str> {
CreateDecoderManifestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDecoderManifestError {
pub fn new(kind: CreateDecoderManifestErrorKind, 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: CreateDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDecoderManifestErrorKind::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,
CreateDecoderManifestErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateDecoderManifestErrorKind::ConflictException(_)
)
}
pub fn is_decoder_manifest_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateDecoderManifestErrorKind::DecoderManifestValidationException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDecoderManifestErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDecoderManifestErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateDecoderManifestErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateDecoderManifestErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDecoderManifestErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for CreateDecoderManifestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDecoderManifestErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateDecoderManifestErrorKind::ConflictException(_inner) => Some(_inner),
CreateDecoderManifestErrorKind::DecoderManifestValidationException(_inner) => {
Some(_inner)
}
CreateDecoderManifestErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateDecoderManifestErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDecoderManifestErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateDecoderManifestErrorKind::ValidationException(_inner) => Some(_inner),
CreateDecoderManifestErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDecoderManifestErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDecoderManifestError {
pub kind: DeleteDecoderManifestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDecoderManifestError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDecoderManifestErrorKind {
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 DeleteDecoderManifestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDecoderManifestErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteDecoderManifestErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteDecoderManifestErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteDecoderManifestErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteDecoderManifestErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteDecoderManifestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDecoderManifestError {
fn code(&self) -> Option<&str> {
DeleteDecoderManifestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDecoderManifestError {
pub fn new(kind: DeleteDecoderManifestErrorKind, 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: DeleteDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDecoderManifestErrorKind::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,
DeleteDecoderManifestErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDecoderManifestErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDecoderManifestErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDecoderManifestErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDecoderManifestErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteDecoderManifestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDecoderManifestErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteDecoderManifestErrorKind::ConflictException(_inner) => Some(_inner),
DeleteDecoderManifestErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteDecoderManifestErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteDecoderManifestErrorKind::ValidationException(_inner) => Some(_inner),
DeleteDecoderManifestErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDecoderManifestError {
pub kind: UpdateDecoderManifestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDecoderManifestError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDecoderManifestErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
DecoderManifestValidationException(crate::error::DecoderManifestValidationException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDecoderManifestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDecoderManifestErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateDecoderManifestErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateDecoderManifestErrorKind::DecoderManifestValidationException(_inner) => {
_inner.fmt(f)
}
UpdateDecoderManifestErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UpdateDecoderManifestErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateDecoderManifestErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateDecoderManifestErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateDecoderManifestErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateDecoderManifestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDecoderManifestError {
fn code(&self) -> Option<&str> {
UpdateDecoderManifestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDecoderManifestError {
pub fn new(kind: UpdateDecoderManifestErrorKind, 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: UpdateDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDecoderManifestErrorKind::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,
UpdateDecoderManifestErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDecoderManifestErrorKind::ConflictException(_)
)
}
pub fn is_decoder_manifest_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDecoderManifestErrorKind::DecoderManifestValidationException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDecoderManifestErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDecoderManifestErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDecoderManifestErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDecoderManifestErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDecoderManifestErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for UpdateDecoderManifestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDecoderManifestErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateDecoderManifestErrorKind::ConflictException(_inner) => Some(_inner),
UpdateDecoderManifestErrorKind::DecoderManifestValidationException(_inner) => {
Some(_inner)
}
UpdateDecoderManifestErrorKind::LimitExceededException(_inner) => Some(_inner),
UpdateDecoderManifestErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDecoderManifestErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateDecoderManifestErrorKind::ValidationException(_inner) => Some(_inner),
UpdateDecoderManifestErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateDecoderManifestErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDecoderManifestError {
pub kind: GetDecoderManifestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDecoderManifestError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDecoderManifestErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDecoderManifestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDecoderManifestErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDecoderManifestErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDecoderManifestErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDecoderManifestErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDecoderManifestErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDecoderManifestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDecoderManifestError {
fn code(&self) -> Option<&str> {
GetDecoderManifestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDecoderManifestError {
pub fn new(kind: GetDecoderManifestErrorKind, 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: GetDecoderManifestErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDecoderManifestErrorKind::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,
GetDecoderManifestErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDecoderManifestErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDecoderManifestErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetDecoderManifestErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDecoderManifestErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for GetDecoderManifestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDecoderManifestErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDecoderManifestErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDecoderManifestErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDecoderManifestErrorKind::ValidationException(_inner) => Some(_inner),
GetDecoderManifestErrorKind::InternalServerException(_inner) => Some(_inner),
GetDecoderManifestErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCampaignsError {
pub kind: ListCampaignsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCampaignsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCampaignsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCampaignsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCampaignsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCampaignsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListCampaignsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListCampaignsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListCampaignsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListCampaignsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCampaignsError {
fn code(&self) -> Option<&str> {
ListCampaignsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCampaignsError {
pub fn new(kind: ListCampaignsErrorKind, 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: ListCampaignsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCampaignsErrorKind::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, ListCampaignsErrorKind::AccessDeniedException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListCampaignsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListCampaignsErrorKind::ValidationException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListCampaignsErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for ListCampaignsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCampaignsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListCampaignsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListCampaignsErrorKind::ValidationException(_inner) => Some(_inner),
ListCampaignsErrorKind::InternalServerException(_inner) => Some(_inner),
ListCampaignsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateCampaignError {
pub kind: CreateCampaignErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateCampaignError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateCampaignErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateCampaignErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateCampaignError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateCampaignErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateCampaignError {
fn code(&self) -> Option<&str> {
CreateCampaignError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateCampaignError {
pub fn new(kind: CreateCampaignErrorKind, 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: CreateCampaignErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateCampaignErrorKind::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,
CreateCampaignErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateCampaignErrorKind::ConflictException(_))
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateCampaignErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateCampaignErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateCampaignErrorKind::ValidationException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateCampaignErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for CreateCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateCampaignErrorKind::ConflictException(_inner) => Some(_inner),
CreateCampaignErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateCampaignErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateCampaignErrorKind::ValidationException(_inner) => Some(_inner),
CreateCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
CreateCampaignErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCampaignError {
pub kind: DeleteCampaignErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCampaignError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCampaignErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCampaignErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCampaignError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCampaignErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteCampaignErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteCampaignErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteCampaignErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteCampaignErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCampaignError {
fn code(&self) -> Option<&str> {
DeleteCampaignError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCampaignError {
pub fn new(kind: DeleteCampaignErrorKind, 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: DeleteCampaignErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCampaignErrorKind::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,
DeleteCampaignErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteCampaignErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteCampaignErrorKind::ValidationException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCampaignErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for DeleteCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteCampaignErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteCampaignErrorKind::ValidationException(_inner) => Some(_inner),
DeleteCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteCampaignErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateCampaignError {
pub kind: UpdateCampaignErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateCampaignError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCampaignErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCampaignErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateCampaignError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCampaignErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateCampaignErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateCampaignErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateCampaignErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateCampaignErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateCampaignErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCampaignError {
fn code(&self) -> Option<&str> {
UpdateCampaignError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateCampaignError {
pub fn new(kind: UpdateCampaignErrorKind, 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: UpdateCampaignErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCampaignErrorKind::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,
UpdateCampaignErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UpdateCampaignErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateCampaignErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateCampaignErrorKind::ValidationException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for UpdateCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateCampaignErrorKind::ConflictException(_inner) => Some(_inner),
UpdateCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateCampaignErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateCampaignErrorKind::ValidationException(_inner) => Some(_inner),
UpdateCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateCampaignErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCampaignError {
pub kind: GetCampaignErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCampaignError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCampaignErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCampaignErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCampaignError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCampaignErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetCampaignErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetCampaignErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetCampaignErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCampaignErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCampaignError {
fn code(&self) -> Option<&str> {
GetCampaignError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCampaignError {
pub fn new(kind: GetCampaignErrorKind, 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: GetCampaignErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCampaignErrorKind::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, GetCampaignErrorKind::AccessDeniedException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetCampaignErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetCampaignErrorKind::ValidationException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetCampaignErrorKind::InternalServerException(_))
}
}
impl std::error::Error for GetCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetCampaignErrorKind::ThrottlingException(_inner) => Some(_inner),
GetCampaignErrorKind::ValidationException(_inner) => Some(_inner),
GetCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
GetCampaignErrorKind::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> {
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> {
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 RegisterAccountError {
pub kind: RegisterAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RegisterAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RegisterAccountErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RegisterAccountErrorKind {
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 RegisterAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RegisterAccountErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RegisterAccountErrorKind::ConflictException(_inner) => _inner.fmt(f),
RegisterAccountErrorKind::InternalServerException(_inner) => _inner.fmt(f),
RegisterAccountErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RegisterAccountErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
RegisterAccountErrorKind::ValidationException(_inner) => _inner.fmt(f),
RegisterAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RegisterAccountError {
fn code(&self) -> Option<&str> {
RegisterAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RegisterAccountError {
pub fn new(kind: RegisterAccountErrorKind, 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: RegisterAccountErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RegisterAccountErrorKind::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,
RegisterAccountErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, RegisterAccountErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
RegisterAccountErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RegisterAccountErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, RegisterAccountErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, RegisterAccountErrorKind::ValidationException(_))
}
}
impl std::error::Error for RegisterAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RegisterAccountErrorKind::AccessDeniedException(_inner) => Some(_inner),
RegisterAccountErrorKind::ConflictException(_inner) => Some(_inner),
RegisterAccountErrorKind::InternalServerException(_inner) => Some(_inner),
RegisterAccountErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RegisterAccountErrorKind::ThrottlingException(_inner) => Some(_inner),
RegisterAccountErrorKind::ValidationException(_inner) => Some(_inner),
RegisterAccountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutLoggingOptionsError {
pub kind: PutLoggingOptionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutLoggingOptionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutLoggingOptionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutLoggingOptionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutLoggingOptionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutLoggingOptionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutLoggingOptionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutLoggingOptionsError {
fn code(&self) -> Option<&str> {
PutLoggingOptionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutLoggingOptionsError {
pub fn new(kind: PutLoggingOptionsErrorKind, 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: PutLoggingOptionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutLoggingOptionsErrorKind::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,
PutLoggingOptionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PutLoggingOptionsErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutLoggingOptionsErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for PutLoggingOptionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutLoggingOptionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::ConflictException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::ThrottlingException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::ValidationException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::InternalServerException(_inner) => Some(_inner),
PutLoggingOptionsErrorKind::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> {
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),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetVehicleStatusError {
pub kind: GetVehicleStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetVehicleStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetVehicleStatusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetVehicleStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetVehicleStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetVehicleStatusErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetVehicleStatusErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetVehicleStatusErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetVehicleStatusErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetVehicleStatusErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetVehicleStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetVehicleStatusError {
fn code(&self) -> Option<&str> {
GetVehicleStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetVehicleStatusError {
pub fn new(kind: GetVehicleStatusErrorKind, 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: GetVehicleStatusErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetVehicleStatusErrorKind::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,
GetVehicleStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetVehicleStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetVehicleStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetVehicleStatusErrorKind::ValidationException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetVehicleStatusErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for GetVehicleStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetVehicleStatusErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetVehicleStatusErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetVehicleStatusErrorKind::ThrottlingException(_inner) => Some(_inner),
GetVehicleStatusErrorKind::ValidationException(_inner) => Some(_inner),
GetVehicleStatusErrorKind::InternalServerException(_inner) => Some(_inner),
GetVehicleStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRegisterAccountStatusError {
pub kind: GetRegisterAccountStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRegisterAccountStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRegisterAccountStatusErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRegisterAccountStatusErrorKind {
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 GetRegisterAccountStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRegisterAccountStatusErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetRegisterAccountStatusErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetRegisterAccountStatusErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetRegisterAccountStatusErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetRegisterAccountStatusErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetRegisterAccountStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRegisterAccountStatusError {
fn code(&self) -> Option<&str> {
GetRegisterAccountStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRegisterAccountStatusError {
pub fn new(kind: GetRegisterAccountStatusErrorKind, 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: GetRegisterAccountStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRegisterAccountStatusErrorKind::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,
GetRegisterAccountStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetRegisterAccountStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRegisterAccountStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetRegisterAccountStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetRegisterAccountStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetRegisterAccountStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRegisterAccountStatusErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetRegisterAccountStatusErrorKind::InternalServerException(_inner) => Some(_inner),
GetRegisterAccountStatusErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetRegisterAccountStatusErrorKind::ThrottlingException(_inner) => Some(_inner),
GetRegisterAccountStatusErrorKind::ValidationException(_inner) => Some(_inner),
GetRegisterAccountStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLoggingOptionsError {
pub kind: GetLoggingOptionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetLoggingOptionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetLoggingOptionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetLoggingOptionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ThrottlingException(crate::error::ThrottlingException),
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetLoggingOptionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetLoggingOptionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetLoggingOptionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetLoggingOptionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetLoggingOptionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetLoggingOptionsError {
fn code(&self) -> Option<&str> {
GetLoggingOptionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetLoggingOptionsError {
pub fn new(kind: GetLoggingOptionsErrorKind, 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: GetLoggingOptionsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLoggingOptionsErrorKind::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,
GetLoggingOptionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetLoggingOptionsErrorKind::ThrottlingException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetLoggingOptionsErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for GetLoggingOptionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetLoggingOptionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetLoggingOptionsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetLoggingOptionsErrorKind::InternalServerException(_inner) => Some(_inner),
GetLoggingOptionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchUpdateVehicleError {
pub kind: BatchUpdateVehicleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchUpdateVehicleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchUpdateVehicleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchUpdateVehicleErrorKind {
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 BatchUpdateVehicleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchUpdateVehicleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
BatchUpdateVehicleErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchUpdateVehicleErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchUpdateVehicleErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchUpdateVehicleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchUpdateVehicleError {
fn code(&self) -> Option<&str> {
BatchUpdateVehicleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchUpdateVehicleError {
pub fn new(kind: BatchUpdateVehicleErrorKind, 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: BatchUpdateVehicleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchUpdateVehicleErrorKind::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,
BatchUpdateVehicleErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchUpdateVehicleErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchUpdateVehicleErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchUpdateVehicleErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchUpdateVehicleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchUpdateVehicleErrorKind::AccessDeniedException(_inner) => Some(_inner),
BatchUpdateVehicleErrorKind::InternalServerException(_inner) => Some(_inner),
BatchUpdateVehicleErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchUpdateVehicleErrorKind::ValidationException(_inner) => Some(_inner),
BatchUpdateVehicleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchCreateVehicleError {
pub kind: BatchCreateVehicleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchCreateVehicleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchCreateVehicleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchCreateVehicleErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
LimitExceededException(crate::error::LimitExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchCreateVehicleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchCreateVehicleErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
BatchCreateVehicleErrorKind::InternalServerException(_inner) => _inner.fmt(f),
BatchCreateVehicleErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
BatchCreateVehicleErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
BatchCreateVehicleErrorKind::ValidationException(_inner) => _inner.fmt(f),
BatchCreateVehicleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchCreateVehicleError {
fn code(&self) -> Option<&str> {
BatchCreateVehicleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchCreateVehicleError {
pub fn new(kind: BatchCreateVehicleErrorKind, 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: BatchCreateVehicleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchCreateVehicleErrorKind::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,
BatchCreateVehicleErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateVehicleErrorKind::InternalServerException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateVehicleErrorKind::LimitExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateVehicleErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchCreateVehicleErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchCreateVehicleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchCreateVehicleErrorKind::AccessDeniedException(_inner) => Some(_inner),
BatchCreateVehicleErrorKind::InternalServerException(_inner) => Some(_inner),
BatchCreateVehicleErrorKind::LimitExceededException(_inner) => Some(_inner),
BatchCreateVehicleErrorKind::ThrottlingException(_inner) => Some(_inner),
BatchCreateVehicleErrorKind::ValidationException(_inner) => Some(_inner),
BatchCreateVehicleErrorKind::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 _)
}
}