#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateCampaignOutboundCallConfigError {
pub kind: UpdateCampaignOutboundCallConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateCampaignOutboundCallConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCampaignOutboundCallConfigErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCampaignOutboundCallConfigErrorKind {
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 UpdateCampaignOutboundCallConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCampaignOutboundCallConfigErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
UpdateCampaignOutboundCallConfigErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateCampaignOutboundCallConfigErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
UpdateCampaignOutboundCallConfigErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
UpdateCampaignOutboundCallConfigErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateCampaignOutboundCallConfigErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateCampaignOutboundCallConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCampaignOutboundCallConfigError {
fn code(&self) -> Option<&str> {
UpdateCampaignOutboundCallConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateCampaignOutboundCallConfigErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateCampaignOutboundCallConfigErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateCampaignOutboundCallConfigError {
pub fn new(
kind: UpdateCampaignOutboundCallConfigErrorKind,
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: UpdateCampaignOutboundCallConfigErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCampaignOutboundCallConfigErrorKind::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,
UpdateCampaignOutboundCallConfigErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignOutboundCallConfigErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignOutboundCallConfigErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignOutboundCallConfigErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignOutboundCallConfigErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignOutboundCallConfigErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateCampaignOutboundCallConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCampaignOutboundCallConfigErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
UpdateCampaignOutboundCallConfigErrorKind::ConflictException(_inner) => Some(_inner),
UpdateCampaignOutboundCallConfigErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
UpdateCampaignOutboundCallConfigErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
UpdateCampaignOutboundCallConfigErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateCampaignOutboundCallConfigErrorKind::ValidationException(_inner) => Some(_inner),
UpdateCampaignOutboundCallConfigErrorKind::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 x_amz_error_type: std::option::Option<std::string::String>,
}
impl ValidationException {
pub fn x_amz_error_type(&self) -> std::option::Option<&str> {
self.x_amz_error_type.as_deref()
}
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) x_amz_error_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 x_amz_error_type(mut self, input: impl Into<std::string::String>) -> Self {
self.x_amz_error_type = Some(input.into());
self
}
pub fn set_x_amz_error_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.x_amz_error_type = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
x_amz_error_type: self.x_amz_error_type,
}
}
}
}
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 x_amz_error_type: std::option::Option<std::string::String>,
}
impl ThrottlingException {
pub fn x_amz_error_type(&self) -> std::option::Option<&str> {
self.x_amz_error_type.as_deref()
}
}
impl ThrottlingException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ClientError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) x_amz_error_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 x_amz_error_type(mut self, input: impl Into<std::string::String>) -> Self {
self.x_amz_error_type = Some(input.into());
self
}
pub fn set_x_amz_error_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.x_amz_error_type = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
x_amz_error_type: self.x_amz_error_type,
}
}
}
}
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 x_amz_error_type: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn x_amz_error_type(&self) -> std::option::Option<&str> {
self.x_amz_error_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_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) x_amz_error_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 x_amz_error_type(mut self, input: impl Into<std::string::String>) -> Self {
self.x_amz_error_type = Some(input.into());
self
}
pub fn set_x_amz_error_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.x_amz_error_type = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
x_amz_error_type: self.x_amz_error_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 InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub x_amz_error_type: std::option::Option<std::string::String>,
}
impl InternalServerException {
pub fn x_amz_error_type(&self) -> std::option::Option<&str> {
self.x_amz_error_type.as_deref()
}
}
impl InternalServerException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ServerError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) x_amz_error_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 x_amz_error_type(mut self, input: impl Into<std::string::String>) -> Self {
self.x_amz_error_type = Some(input.into());
self
}
pub fn set_x_amz_error_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.x_amz_error_type = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
x_amz_error_type: self.x_amz_error_type,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub x_amz_error_type: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn x_amz_error_type(&self) -> std::option::Option<&str> {
self.x_amz_error_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_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
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) x_amz_error_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 x_amz_error_type(mut self, input: impl Into<std::string::String>) -> Self {
self.x_amz_error_type = Some(input.into());
self
}
pub fn set_x_amz_error_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.x_amz_error_type = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
x_amz_error_type: self.x_amz_error_type,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_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>,
#[doc(hidden)]
pub x_amz_error_type: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn x_amz_error_type(&self) -> std::option::Option<&str> {
self.x_amz_error_type.as_deref()
}
}
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_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
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>,
pub(crate) x_amz_error_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 x_amz_error_type(mut self, input: impl Into<std::string::String>) -> Self {
self.x_amz_error_type = Some(input.into());
self
}
pub fn set_x_amz_error_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.x_amz_error_type = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
x_amz_error_type: self.x_amz_error_type,
}
}
}
}
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 UpdateCampaignNameError {
pub kind: UpdateCampaignNameErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateCampaignNameError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCampaignNameErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCampaignNameErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateCampaignNameError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCampaignNameErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateCampaignNameErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateCampaignNameErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateCampaignNameErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateCampaignNameErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateCampaignNameErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCampaignNameError {
fn code(&self) -> Option<&str> {
UpdateCampaignNameError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateCampaignNameErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateCampaignNameError {
pub fn new(kind: UpdateCampaignNameErrorKind, 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: UpdateCampaignNameErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCampaignNameErrorKind::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,
UpdateCampaignNameErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignNameErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignNameErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignNameErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignNameErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateCampaignNameError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCampaignNameErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateCampaignNameErrorKind::ConflictException(_inner) => Some(_inner),
UpdateCampaignNameErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateCampaignNameErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateCampaignNameErrorKind::ValidationException(_inner) => Some(_inner),
UpdateCampaignNameErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateCampaignDialerConfigError {
pub kind: UpdateCampaignDialerConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateCampaignDialerConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateCampaignDialerConfigErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateCampaignDialerConfigErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateCampaignDialerConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateCampaignDialerConfigErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateCampaignDialerConfigErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateCampaignDialerConfigErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateCampaignDialerConfigErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateCampaignDialerConfigErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateCampaignDialerConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateCampaignDialerConfigError {
fn code(&self) -> Option<&str> {
UpdateCampaignDialerConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateCampaignDialerConfigErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateCampaignDialerConfigError {
pub fn new(kind: UpdateCampaignDialerConfigErrorKind, 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: UpdateCampaignDialerConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateCampaignDialerConfigErrorKind::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,
UpdateCampaignDialerConfigErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignDialerConfigErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignDialerConfigErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignDialerConfigErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateCampaignDialerConfigErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateCampaignDialerConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateCampaignDialerConfigErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateCampaignDialerConfigErrorKind::ConflictException(_inner) => Some(_inner),
UpdateCampaignDialerConfigErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateCampaignDialerConfigErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateCampaignDialerConfigErrorKind::ValidationException(_inner) => Some(_inner),
UpdateCampaignDialerConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UntagResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
UntagResourceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
UntagResourceErrorKind::ValidationException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
TagResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
TagResourceErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
TagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
TagResourceErrorKind::ValidationException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopCampaignError {
pub kind: StopCampaignErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopCampaignError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopCampaignErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopCampaignErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidCampaignStateException(crate::error::InvalidCampaignStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopCampaignError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopCampaignErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StopCampaignErrorKind::ConflictException(_inner) => _inner.fmt(f),
StopCampaignErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StopCampaignErrorKind::InvalidCampaignStateException(_inner) => _inner.fmt(f),
StopCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopCampaignErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StopCampaignErrorKind::ValidationException(_inner) => _inner.fmt(f),
StopCampaignErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopCampaignError {
fn code(&self) -> Option<&str> {
StopCampaignError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StopCampaignErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
StopCampaignErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl StopCampaignError {
pub fn new(kind: StopCampaignErrorKind, 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: StopCampaignErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopCampaignErrorKind::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, StopCampaignErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, StopCampaignErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StopCampaignErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_campaign_state_exception(&self) -> bool {
matches!(
&self.kind,
StopCampaignErrorKind::InvalidCampaignStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, StopCampaignErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, StopCampaignErrorKind::ValidationException(_))
}
}
impl std::error::Error for StopCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
StopCampaignErrorKind::ConflictException(_inner) => Some(_inner),
StopCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
StopCampaignErrorKind::InvalidCampaignStateException(_inner) => Some(_inner),
StopCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopCampaignErrorKind::ThrottlingException(_inner) => Some(_inner),
StopCampaignErrorKind::ValidationException(_inner) => Some(_inner),
StopCampaignErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidCampaignStateException {
#[doc(hidden)]
pub state: std::option::Option<crate::model::CampaignState>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub x_amz_error_type: std::option::Option<std::string::String>,
}
impl InvalidCampaignStateException {
pub fn state(&self) -> std::option::Option<&crate::model::CampaignState> {
self.state.as_ref()
}
pub fn x_amz_error_type(&self) -> std::option::Option<&str> {
self.x_amz_error_type.as_deref()
}
}
impl InvalidCampaignStateException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidCampaignStateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidCampaignStateException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidCampaignStateException {}
pub mod invalid_campaign_state_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) state: std::option::Option<crate::model::CampaignState>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) x_amz_error_type: std::option::Option<std::string::String>,
}
impl Builder {
pub fn state(mut self, input: crate::model::CampaignState) -> Self {
self.state = Some(input);
self
}
pub fn set_state(
mut self,
input: std::option::Option<crate::model::CampaignState>,
) -> Self {
self.state = 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 x_amz_error_type(mut self, input: impl Into<std::string::String>) -> Self {
self.x_amz_error_type = Some(input.into());
self
}
pub fn set_x_amz_error_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.x_amz_error_type = input;
self
}
pub fn build(self) -> crate::error::InvalidCampaignStateException {
crate::error::InvalidCampaignStateException {
state: self.state,
message: self.message,
x_amz_error_type: self.x_amz_error_type,
}
}
}
}
impl InvalidCampaignStateException {
pub fn builder() -> crate::error::invalid_campaign_state_exception::Builder {
crate::error::invalid_campaign_state_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartInstanceOnboardingJobError {
pub kind: StartInstanceOnboardingJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartInstanceOnboardingJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartInstanceOnboardingJobErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartInstanceOnboardingJobErrorKind {
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 StartInstanceOnboardingJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartInstanceOnboardingJobErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartInstanceOnboardingJobErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartInstanceOnboardingJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartInstanceOnboardingJobErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartInstanceOnboardingJobErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartInstanceOnboardingJobErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartInstanceOnboardingJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartInstanceOnboardingJobError {
fn code(&self) -> Option<&str> {
StartInstanceOnboardingJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StartInstanceOnboardingJobErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
StartInstanceOnboardingJobErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl StartInstanceOnboardingJobError {
pub fn new(kind: StartInstanceOnboardingJobErrorKind, 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: StartInstanceOnboardingJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartInstanceOnboardingJobErrorKind::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,
StartInstanceOnboardingJobErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
StartInstanceOnboardingJobErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartInstanceOnboardingJobErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartInstanceOnboardingJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartInstanceOnboardingJobErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
StartInstanceOnboardingJobErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for StartInstanceOnboardingJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartInstanceOnboardingJobErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartInstanceOnboardingJobErrorKind::ConflictException(_inner) => Some(_inner),
StartInstanceOnboardingJobErrorKind::InternalServerException(_inner) => Some(_inner),
StartInstanceOnboardingJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartInstanceOnboardingJobErrorKind::ThrottlingException(_inner) => Some(_inner),
StartInstanceOnboardingJobErrorKind::ValidationException(_inner) => Some(_inner),
StartInstanceOnboardingJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartCampaignError {
pub kind: StartCampaignErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartCampaignError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartCampaignErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartCampaignErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidCampaignStateException(crate::error::InvalidCampaignStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartCampaignError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartCampaignErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartCampaignErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartCampaignErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartCampaignErrorKind::InvalidCampaignStateException(_inner) => _inner.fmt(f),
StartCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartCampaignErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartCampaignErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartCampaignErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartCampaignError {
fn code(&self) -> Option<&str> {
StartCampaignError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StartCampaignErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
StartCampaignErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl StartCampaignError {
pub fn new(kind: StartCampaignErrorKind, 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: StartCampaignErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartCampaignErrorKind::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, StartCampaignErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, StartCampaignErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartCampaignErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_campaign_state_exception(&self) -> bool {
matches!(
&self.kind,
StartCampaignErrorKind::InvalidCampaignStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, StartCampaignErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, StartCampaignErrorKind::ValidationException(_))
}
}
impl std::error::Error for StartCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartCampaignErrorKind::ConflictException(_inner) => Some(_inner),
StartCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
StartCampaignErrorKind::InvalidCampaignStateException(_inner) => Some(_inner),
StartCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartCampaignErrorKind::ThrottlingException(_inner) => Some(_inner),
StartCampaignErrorKind::ValidationException(_inner) => Some(_inner),
StartCampaignErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ResumeCampaignError {
pub kind: ResumeCampaignErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ResumeCampaignError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ResumeCampaignErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ResumeCampaignErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidCampaignStateException(crate::error::InvalidCampaignStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ResumeCampaignError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ResumeCampaignErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ResumeCampaignErrorKind::ConflictException(_inner) => _inner.fmt(f),
ResumeCampaignErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ResumeCampaignErrorKind::InvalidCampaignStateException(_inner) => _inner.fmt(f),
ResumeCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ResumeCampaignErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ResumeCampaignErrorKind::ValidationException(_inner) => _inner.fmt(f),
ResumeCampaignErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ResumeCampaignError {
fn code(&self) -> Option<&str> {
ResumeCampaignError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ResumeCampaignErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ResumeCampaignErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ResumeCampaignError {
pub fn new(kind: ResumeCampaignErrorKind, 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: ResumeCampaignErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ResumeCampaignErrorKind::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,
ResumeCampaignErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, ResumeCampaignErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ResumeCampaignErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_campaign_state_exception(&self) -> bool {
matches!(
&self.kind,
ResumeCampaignErrorKind::InvalidCampaignStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ResumeCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ResumeCampaignErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ResumeCampaignErrorKind::ValidationException(_))
}
}
impl std::error::Error for ResumeCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ResumeCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
ResumeCampaignErrorKind::ConflictException(_inner) => Some(_inner),
ResumeCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
ResumeCampaignErrorKind::InvalidCampaignStateException(_inner) => Some(_inner),
ResumeCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ResumeCampaignErrorKind::ThrottlingException(_inner) => Some(_inner),
ResumeCampaignErrorKind::ValidationException(_inner) => Some(_inner),
ResumeCampaignErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutDialRequestBatchError {
pub kind: PutDialRequestBatchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutDialRequestBatchError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutDialRequestBatchErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutDialRequestBatchErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidCampaignStateException(crate::error::InvalidCampaignStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutDialRequestBatchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutDialRequestBatchErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutDialRequestBatchErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutDialRequestBatchErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutDialRequestBatchErrorKind::InvalidCampaignStateException(_inner) => _inner.fmt(f),
PutDialRequestBatchErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutDialRequestBatchErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutDialRequestBatchErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutDialRequestBatchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutDialRequestBatchError {
fn code(&self) -> Option<&str> {
PutDialRequestBatchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
PutDialRequestBatchErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
PutDialRequestBatchErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl PutDialRequestBatchError {
pub fn new(kind: PutDialRequestBatchErrorKind, 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: PutDialRequestBatchErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutDialRequestBatchErrorKind::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,
PutDialRequestBatchErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
PutDialRequestBatchErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutDialRequestBatchErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_campaign_state_exception(&self) -> bool {
matches!(
&self.kind,
PutDialRequestBatchErrorKind::InvalidCampaignStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutDialRequestBatchErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutDialRequestBatchErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutDialRequestBatchErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutDialRequestBatchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutDialRequestBatchErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutDialRequestBatchErrorKind::ConflictException(_inner) => Some(_inner),
PutDialRequestBatchErrorKind::InternalServerException(_inner) => Some(_inner),
PutDialRequestBatchErrorKind::InvalidCampaignStateException(_inner) => Some(_inner),
PutDialRequestBatchErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutDialRequestBatchErrorKind::ThrottlingException(_inner) => Some(_inner),
PutDialRequestBatchErrorKind::ValidationException(_inner) => Some(_inner),
PutDialRequestBatchErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PauseCampaignError {
pub kind: PauseCampaignErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PauseCampaignError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PauseCampaignErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PauseCampaignErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
InvalidCampaignStateException(crate::error::InvalidCampaignStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PauseCampaignError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PauseCampaignErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PauseCampaignErrorKind::ConflictException(_inner) => _inner.fmt(f),
PauseCampaignErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PauseCampaignErrorKind::InvalidCampaignStateException(_inner) => _inner.fmt(f),
PauseCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PauseCampaignErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PauseCampaignErrorKind::ValidationException(_inner) => _inner.fmt(f),
PauseCampaignErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PauseCampaignError {
fn code(&self) -> Option<&str> {
PauseCampaignError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
PauseCampaignErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
PauseCampaignErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl PauseCampaignError {
pub fn new(kind: PauseCampaignErrorKind, 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: PauseCampaignErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PauseCampaignErrorKind::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, PauseCampaignErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, PauseCampaignErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PauseCampaignErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_campaign_state_exception(&self) -> bool {
matches!(
&self.kind,
PauseCampaignErrorKind::InvalidCampaignStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PauseCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, PauseCampaignErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, PauseCampaignErrorKind::ValidationException(_))
}
}
impl std::error::Error for PauseCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PauseCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
PauseCampaignErrorKind::ConflictException(_inner) => Some(_inner),
PauseCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
PauseCampaignErrorKind::InvalidCampaignStateException(_inner) => Some(_inner),
PauseCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PauseCampaignErrorKind::ThrottlingException(_inner) => Some(_inner),
PauseCampaignErrorKind::ValidationException(_inner) => Some(_inner),
PauseCampaignErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
ListTagsForResourceErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InternalServerException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ValidationException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[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),
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
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::InternalServerException(_inner) => _inner.fmt(f),
ListCampaignsErrorKind::ValidationException(_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> {
match &self.kind {
ListCampaignsErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListCampaignsErrorKind::InternalServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListCampaignsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListCampaignsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCampaignsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListCampaignsErrorKind::InternalServerException(_inner) => Some(_inner),
ListCampaignsErrorKind::ValidationException(_inner) => Some(_inner),
ListCampaignsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetInstanceOnboardingJobStatusError {
pub kind: GetInstanceOnboardingJobStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetInstanceOnboardingJobStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetInstanceOnboardingJobStatusErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetInstanceOnboardingJobStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetInstanceOnboardingJobStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetInstanceOnboardingJobStatusErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetInstanceOnboardingJobStatusErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetInstanceOnboardingJobStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetInstanceOnboardingJobStatusErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetInstanceOnboardingJobStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetInstanceOnboardingJobStatusError {
fn code(&self) -> Option<&str> {
GetInstanceOnboardingJobStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetInstanceOnboardingJobStatusErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetInstanceOnboardingJobStatusError {
pub fn new(
kind: GetInstanceOnboardingJobStatusErrorKind,
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: GetInstanceOnboardingJobStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetInstanceOnboardingJobStatusErrorKind::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,
GetInstanceOnboardingJobStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetInstanceOnboardingJobStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetInstanceOnboardingJobStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetInstanceOnboardingJobStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetInstanceOnboardingJobStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetInstanceOnboardingJobStatusErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetInstanceOnboardingJobStatusErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetInstanceOnboardingJobStatusErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetInstanceOnboardingJobStatusErrorKind::ValidationException(_inner) => Some(_inner),
GetInstanceOnboardingJobStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetConnectInstanceConfigError {
pub kind: GetConnectInstanceConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetConnectInstanceConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetConnectInstanceConfigErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetConnectInstanceConfigErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetConnectInstanceConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetConnectInstanceConfigErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetConnectInstanceConfigErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetConnectInstanceConfigErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetConnectInstanceConfigErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetConnectInstanceConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetConnectInstanceConfigError {
fn code(&self) -> Option<&str> {
GetConnectInstanceConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetConnectInstanceConfigErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetConnectInstanceConfigError {
pub fn new(kind: GetConnectInstanceConfigErrorKind, 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: GetConnectInstanceConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetConnectInstanceConfigErrorKind::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,
GetConnectInstanceConfigErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectInstanceConfigErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectInstanceConfigErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectInstanceConfigErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetConnectInstanceConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetConnectInstanceConfigErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetConnectInstanceConfigErrorKind::InternalServerException(_inner) => Some(_inner),
GetConnectInstanceConfigErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetConnectInstanceConfigErrorKind::ValidationException(_inner) => Some(_inner),
GetConnectInstanceConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCampaignStateBatchError {
pub kind: GetCampaignStateBatchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCampaignStateBatchError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCampaignStateBatchErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCampaignStateBatchErrorKind {
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 GetCampaignStateBatchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCampaignStateBatchErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetCampaignStateBatchErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCampaignStateBatchErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetCampaignStateBatchErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetCampaignStateBatchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCampaignStateBatchError {
fn code(&self) -> Option<&str> {
GetCampaignStateBatchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetCampaignStateBatchErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetCampaignStateBatchErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetCampaignStateBatchError {
pub fn new(kind: GetCampaignStateBatchErrorKind, 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: GetCampaignStateBatchErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCampaignStateBatchErrorKind::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,
GetCampaignStateBatchErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCampaignStateBatchErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetCampaignStateBatchErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetCampaignStateBatchErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetCampaignStateBatchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCampaignStateBatchErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetCampaignStateBatchErrorKind::InternalServerException(_inner) => Some(_inner),
GetCampaignStateBatchErrorKind::ThrottlingException(_inner) => Some(_inner),
GetCampaignStateBatchErrorKind::ValidationException(_inner) => Some(_inner),
GetCampaignStateBatchErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCampaignStateError {
pub kind: GetCampaignStateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCampaignStateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCampaignStateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCampaignStateErrorKind {
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 GetCampaignStateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCampaignStateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetCampaignStateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCampaignStateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetCampaignStateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetCampaignStateErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetCampaignStateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCampaignStateError {
fn code(&self) -> Option<&str> {
GetCampaignStateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetCampaignStateErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
GetCampaignStateErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetCampaignStateError {
pub fn new(kind: GetCampaignStateErrorKind, 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: GetCampaignStateErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCampaignStateErrorKind::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,
GetCampaignStateErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCampaignStateErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCampaignStateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetCampaignStateErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetCampaignStateErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetCampaignStateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCampaignStateErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetCampaignStateErrorKind::InternalServerException(_inner) => Some(_inner),
GetCampaignStateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetCampaignStateErrorKind::ThrottlingException(_inner) => Some(_inner),
GetCampaignStateErrorKind::ValidationException(_inner) => Some(_inner),
GetCampaignStateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeCampaignError {
pub kind: DescribeCampaignErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeCampaignError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeCampaignErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeCampaignErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeCampaignError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeCampaignErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeCampaignErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeCampaignErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeCampaignErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeCampaignError {
fn code(&self) -> Option<&str> {
DescribeCampaignError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DescribeCampaignErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DescribeCampaignError {
pub fn new(kind: DescribeCampaignErrorKind, 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: DescribeCampaignErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeCampaignErrorKind::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,
DescribeCampaignErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCampaignErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeCampaignErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeCampaignErrorKind::ValidationException(_inner) => Some(_inner),
DescribeCampaignErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteInstanceOnboardingJobError {
pub kind: DeleteInstanceOnboardingJobErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteInstanceOnboardingJobError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteInstanceOnboardingJobErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteInstanceOnboardingJobErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteInstanceOnboardingJobError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteInstanceOnboardingJobErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteInstanceOnboardingJobErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteInstanceOnboardingJobErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
DeleteInstanceOnboardingJobErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteInstanceOnboardingJobErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteInstanceOnboardingJobErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteInstanceOnboardingJobError {
fn code(&self) -> Option<&str> {
DeleteInstanceOnboardingJobError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteInstanceOnboardingJobErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteInstanceOnboardingJobError {
pub fn new(kind: DeleteInstanceOnboardingJobErrorKind, 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: DeleteInstanceOnboardingJobErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteInstanceOnboardingJobErrorKind::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,
DeleteInstanceOnboardingJobErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInstanceOnboardingJobErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInstanceOnboardingJobErrorKind::InvalidStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInstanceOnboardingJobErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInstanceOnboardingJobErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteInstanceOnboardingJobError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteInstanceOnboardingJobErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteInstanceOnboardingJobErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteInstanceOnboardingJobErrorKind::InvalidStateException(_inner) => Some(_inner),
DeleteInstanceOnboardingJobErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteInstanceOnboardingJobErrorKind::ValidationException(_inner) => Some(_inner),
DeleteInstanceOnboardingJobErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidStateException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub x_amz_error_type: std::option::Option<std::string::String>,
}
impl InvalidStateException {
pub fn x_amz_error_type(&self) -> std::option::Option<&str> {
self.x_amz_error_type.as_deref()
}
}
impl InvalidStateException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidStateException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidStateException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidStateException {}
pub mod invalid_state_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) x_amz_error_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 x_amz_error_type(mut self, input: impl Into<std::string::String>) -> Self {
self.x_amz_error_type = Some(input.into());
self
}
pub fn set_x_amz_error_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.x_amz_error_type = input;
self
}
pub fn build(self) -> crate::error::InvalidStateException {
crate::error::InvalidStateException {
message: self.message,
x_amz_error_type: self.x_amz_error_type,
}
}
}
}
impl InvalidStateException {
pub fn builder() -> crate::error::invalid_state_exception::Builder {
crate::error::invalid_state_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteConnectInstanceConfigError {
pub kind: DeleteConnectInstanceConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteConnectInstanceConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteConnectInstanceConfigErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteConnectInstanceConfigErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidStateException(crate::error::InvalidStateException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteConnectInstanceConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteConnectInstanceConfigErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteConnectInstanceConfigErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteConnectInstanceConfigErrorKind::InvalidStateException(_inner) => _inner.fmt(f),
DeleteConnectInstanceConfigErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteConnectInstanceConfigErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteConnectInstanceConfigErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteConnectInstanceConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteConnectInstanceConfigError {
fn code(&self) -> Option<&str> {
DeleteConnectInstanceConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteConnectInstanceConfigErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteConnectInstanceConfigErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteConnectInstanceConfigError {
pub fn new(kind: DeleteConnectInstanceConfigErrorKind, 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: DeleteConnectInstanceConfigErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteConnectInstanceConfigErrorKind::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,
DeleteConnectInstanceConfigErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectInstanceConfigErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_state_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectInstanceConfigErrorKind::InvalidStateException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectInstanceConfigErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectInstanceConfigErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteConnectInstanceConfigErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteConnectInstanceConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteConnectInstanceConfigErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteConnectInstanceConfigErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteConnectInstanceConfigErrorKind::InvalidStateException(_inner) => Some(_inner),
DeleteConnectInstanceConfigErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteConnectInstanceConfigErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteConnectInstanceConfigErrorKind::ValidationException(_inner) => Some(_inner),
DeleteConnectInstanceConfigErrorKind::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),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
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::InternalServerException(_inner) => _inner.fmt(f),
DeleteCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteCampaignErrorKind::ValidationException(_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> {
match &self.kind {
DeleteCampaignErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCampaignErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteCampaignErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteCampaignError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCampaignErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteCampaignErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteCampaignErrorKind::ValidationException(_inner) => Some(_inner),
DeleteCampaignErrorKind::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),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for 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::InternalServerException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateCampaignErrorKind::ValidationException(_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> {
match &self.kind {
CreateCampaignErrorKind::InternalServerException(inner) => {
Some(inner.retryable_error_kind())
}
CreateCampaignErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => 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_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateCampaignErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateCampaignErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateCampaignErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateCampaignErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateCampaignErrorKind::ValidationException(_))
}
}
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::InternalServerException(_inner) => Some(_inner),
CreateCampaignErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateCampaignErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateCampaignErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateCampaignErrorKind::ValidationException(_inner) => Some(_inner),
CreateCampaignErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub x_amz_error_type: std::option::Option<std::string::String>,
}
impl ServiceQuotaExceededException {
pub fn x_amz_error_type(&self) -> std::option::Option<&str> {
self.x_amz_error_type.as_deref()
}
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) x_amz_error_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 x_amz_error_type(mut self, input: impl Into<std::string::String>) -> Self {
self.x_amz_error_type = Some(input.into());
self
}
pub fn set_x_amz_error_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.x_amz_error_type = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
x_amz_error_type: self.x_amz_error_type,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}
#[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 _)
}
}