#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDestinationError {
pub kind: UpdateDestinationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDestinationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDestinationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDestinationErrorKind {
ConcurrentModificationException(crate::error::ConcurrentModificationException),
InvalidArgumentException(crate::error::InvalidArgumentException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDestinationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDestinationErrorKind::ConcurrentModificationException(_inner) => _inner.fmt(f),
UpdateDestinationErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
UpdateDestinationErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UpdateDestinationErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateDestinationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDestinationError {
fn code(&self) -> Option<&str> {
UpdateDestinationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateDestinationError {
pub fn new(kind: UpdateDestinationErrorKind, 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: UpdateDestinationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDestinationErrorKind::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_concurrent_modification_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDestinationErrorKind::ConcurrentModificationException(_)
)
}
pub fn is_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDestinationErrorKind::InvalidArgumentException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDestinationErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDestinationErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UpdateDestinationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDestinationErrorKind::ConcurrentModificationException(_inner) => Some(_inner),
UpdateDestinationErrorKind::InvalidArgumentException(_inner) => Some(_inner),
UpdateDestinationErrorKind::ResourceInUseException(_inner) => Some(_inner),
UpdateDestinationErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDestinationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceInUseException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceInUseException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceInUseException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceInUseException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceInUseException {}
pub mod resource_in_use_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceInUseException {
crate::error::ResourceInUseException {
message: self.message,
}
}
}
}
impl ResourceInUseException {
pub fn builder() -> crate::error::resource_in_use_exception::Builder {
crate::error::resource_in_use_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidArgumentException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidArgumentException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidArgumentException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidArgumentException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidArgumentException {}
pub mod invalid_argument_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidArgumentException {
crate::error::InvalidArgumentException {
message: self.message,
}
}
}
}
impl InvalidArgumentException {
pub fn builder() -> crate::error::invalid_argument_exception::Builder {
crate::error::invalid_argument_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ConcurrentModificationException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConcurrentModificationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConcurrentModificationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConcurrentModificationException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for ConcurrentModificationException {}
pub mod concurrent_modification_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ConcurrentModificationException {
crate::error::ConcurrentModificationException {
message: self.message,
}
}
}
}
impl ConcurrentModificationException {
pub fn builder() -> crate::error::concurrent_modification_exception::Builder {
crate::error::concurrent_modification_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagDeliveryStreamError {
pub kind: UntagDeliveryStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagDeliveryStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagDeliveryStreamErrorKind {
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagDeliveryStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagDeliveryStreamErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
UntagDeliveryStreamErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
UntagDeliveryStreamErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
UntagDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagDeliveryStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagDeliveryStreamError {
fn code(&self) -> Option<&str> {
UntagDeliveryStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagDeliveryStreamError {
pub fn new(kind: UntagDeliveryStreamErrorKind, 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: UntagDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagDeliveryStreamErrorKind::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_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
UntagDeliveryStreamErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UntagDeliveryStreamErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
UntagDeliveryStreamErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagDeliveryStreamErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for UntagDeliveryStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagDeliveryStreamErrorKind::InvalidArgumentException(_inner) => Some(_inner),
UntagDeliveryStreamErrorKind::LimitExceededException(_inner) => Some(_inner),
UntagDeliveryStreamErrorKind::ResourceInUseException(_inner) => Some(_inner),
UntagDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagDeliveryStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagDeliveryStreamError {
pub kind: TagDeliveryStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagDeliveryStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagDeliveryStreamErrorKind {
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagDeliveryStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagDeliveryStreamErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
TagDeliveryStreamErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
TagDeliveryStreamErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
TagDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagDeliveryStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagDeliveryStreamError {
fn code(&self) -> Option<&str> {
TagDeliveryStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagDeliveryStreamError {
pub fn new(kind: TagDeliveryStreamErrorKind, 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: TagDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagDeliveryStreamErrorKind::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_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
TagDeliveryStreamErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
TagDeliveryStreamErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
TagDeliveryStreamErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagDeliveryStreamErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for TagDeliveryStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagDeliveryStreamErrorKind::InvalidArgumentException(_inner) => Some(_inner),
TagDeliveryStreamErrorKind::LimitExceededException(_inner) => Some(_inner),
TagDeliveryStreamErrorKind::ResourceInUseException(_inner) => Some(_inner),
TagDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagDeliveryStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopDeliveryStreamEncryptionError {
pub kind: StopDeliveryStreamEncryptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopDeliveryStreamEncryptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopDeliveryStreamEncryptionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopDeliveryStreamEncryptionErrorKind {
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopDeliveryStreamEncryptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopDeliveryStreamEncryptionErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
StopDeliveryStreamEncryptionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StopDeliveryStreamEncryptionErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
StopDeliveryStreamEncryptionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
StopDeliveryStreamEncryptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopDeliveryStreamEncryptionError {
fn code(&self) -> Option<&str> {
StopDeliveryStreamEncryptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopDeliveryStreamEncryptionError {
pub fn new(kind: StopDeliveryStreamEncryptionErrorKind, 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: StopDeliveryStreamEncryptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopDeliveryStreamEncryptionErrorKind::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_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
StopDeliveryStreamEncryptionErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StopDeliveryStreamEncryptionErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
StopDeliveryStreamEncryptionErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopDeliveryStreamEncryptionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StopDeliveryStreamEncryptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopDeliveryStreamEncryptionErrorKind::InvalidArgumentException(_inner) => Some(_inner),
StopDeliveryStreamEncryptionErrorKind::LimitExceededException(_inner) => Some(_inner),
StopDeliveryStreamEncryptionErrorKind::ResourceInUseException(_inner) => Some(_inner),
StopDeliveryStreamEncryptionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
StopDeliveryStreamEncryptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartDeliveryStreamEncryptionError {
pub kind: StartDeliveryStreamEncryptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartDeliveryStreamEncryptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartDeliveryStreamEncryptionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartDeliveryStreamEncryptionErrorKind {
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidKmsResourceException(crate::error::InvalidKmsResourceException),
LimitExceededException(crate::error::LimitExceededException),
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartDeliveryStreamEncryptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartDeliveryStreamEncryptionErrorKind::InvalidArgumentException(_inner) => {
_inner.fmt(f)
}
StartDeliveryStreamEncryptionErrorKind::InvalidKmsResourceException(_inner) => {
_inner.fmt(f)
}
StartDeliveryStreamEncryptionErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
StartDeliveryStreamEncryptionErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
StartDeliveryStreamEncryptionErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
StartDeliveryStreamEncryptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartDeliveryStreamEncryptionError {
fn code(&self) -> Option<&str> {
StartDeliveryStreamEncryptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartDeliveryStreamEncryptionError {
pub fn new(
kind: StartDeliveryStreamEncryptionErrorKind,
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: StartDeliveryStreamEncryptionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartDeliveryStreamEncryptionErrorKind::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_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
StartDeliveryStreamEncryptionErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_kms_resource_exception(&self) -> bool {
matches!(
&self.kind,
StartDeliveryStreamEncryptionErrorKind::InvalidKmsResourceException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartDeliveryStreamEncryptionErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
StartDeliveryStreamEncryptionErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartDeliveryStreamEncryptionErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for StartDeliveryStreamEncryptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartDeliveryStreamEncryptionErrorKind::InvalidArgumentException(_inner) => {
Some(_inner)
}
StartDeliveryStreamEncryptionErrorKind::InvalidKmsResourceException(_inner) => {
Some(_inner)
}
StartDeliveryStreamEncryptionErrorKind::LimitExceededException(_inner) => Some(_inner),
StartDeliveryStreamEncryptionErrorKind::ResourceInUseException(_inner) => Some(_inner),
StartDeliveryStreamEncryptionErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
StartDeliveryStreamEncryptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidKmsResourceException {
#[allow(missing_docs)] #[doc(hidden)]
pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidKmsResourceException {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl InvalidKmsResourceException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidKmsResourceException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"InvalidKmsResourceException [InvalidKMSResourceException]"
)?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidKmsResourceException {}
pub mod invalid_kms_resource_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidKmsResourceException {
crate::error::InvalidKmsResourceException {
code: self.code,
message: self.message,
}
}
}
}
impl InvalidKmsResourceException {
pub fn builder() -> crate::error::invalid_kms_resource_exception::Builder {
crate::error::invalid_kms_resource_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutRecordBatchError {
pub kind: PutRecordBatchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutRecordBatchError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutRecordBatchErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutRecordBatchErrorKind {
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidKmsResourceException(crate::error::InvalidKmsResourceException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutRecordBatchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutRecordBatchErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
PutRecordBatchErrorKind::InvalidKmsResourceException(_inner) => _inner.fmt(f),
PutRecordBatchErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutRecordBatchErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutRecordBatchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutRecordBatchError {
fn code(&self) -> Option<&str> {
PutRecordBatchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutRecordBatchError {
pub fn new(kind: PutRecordBatchErrorKind, 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: PutRecordBatchErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutRecordBatchErrorKind::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_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
PutRecordBatchErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_kms_resource_exception(&self) -> bool {
matches!(
&self.kind,
PutRecordBatchErrorKind::InvalidKmsResourceException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutRecordBatchErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutRecordBatchErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for PutRecordBatchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutRecordBatchErrorKind::InvalidArgumentException(_inner) => Some(_inner),
PutRecordBatchErrorKind::InvalidKmsResourceException(_inner) => Some(_inner),
PutRecordBatchErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutRecordBatchErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutRecordBatchErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUnavailableException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUnavailableException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableException {}
pub mod service_unavailable_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceUnavailableException {
crate::error::ServiceUnavailableException {
message: self.message,
}
}
}
}
impl ServiceUnavailableException {
pub fn builder() -> crate::error::service_unavailable_exception::Builder {
crate::error::service_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutRecordError {
pub kind: PutRecordErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutRecordError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutRecordErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutRecordErrorKind {
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidKmsResourceException(crate::error::InvalidKmsResourceException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutRecordError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutRecordErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
PutRecordErrorKind::InvalidKmsResourceException(_inner) => _inner.fmt(f),
PutRecordErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
PutRecordErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PutRecordErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutRecordError {
fn code(&self) -> Option<&str> {
PutRecordError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutRecordError {
pub fn new(kind: PutRecordErrorKind, 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: PutRecordErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutRecordErrorKind::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_invalid_argument_exception(&self) -> bool {
matches!(&self.kind, PutRecordErrorKind::InvalidArgumentException(_))
}
pub fn is_invalid_kms_resource_exception(&self) -> bool {
matches!(
&self.kind,
PutRecordErrorKind::InvalidKmsResourceException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, PutRecordErrorKind::ResourceNotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutRecordErrorKind::ServiceUnavailableException(_)
)
}
}
impl std::error::Error for PutRecordError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutRecordErrorKind::InvalidArgumentException(_inner) => Some(_inner),
PutRecordErrorKind::InvalidKmsResourceException(_inner) => Some(_inner),
PutRecordErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
PutRecordErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PutRecordErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForDeliveryStreamError {
pub kind: ListTagsForDeliveryStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForDeliveryStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForDeliveryStreamErrorKind {
InvalidArgumentException(crate::error::InvalidArgumentException),
LimitExceededException(crate::error::LimitExceededException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForDeliveryStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForDeliveryStreamErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
ListTagsForDeliveryStreamErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
ListTagsForDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForDeliveryStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForDeliveryStreamError {
fn code(&self) -> Option<&str> {
ListTagsForDeliveryStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForDeliveryStreamError {
pub fn new(kind: ListTagsForDeliveryStreamErrorKind, 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: ListTagsForDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForDeliveryStreamErrorKind::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_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForDeliveryStreamErrorKind::InvalidArgumentException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForDeliveryStreamErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForDeliveryStreamErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for ListTagsForDeliveryStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForDeliveryStreamErrorKind::InvalidArgumentException(_inner) => Some(_inner),
ListTagsForDeliveryStreamErrorKind::LimitExceededException(_inner) => Some(_inner),
ListTagsForDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForDeliveryStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDeliveryStreamsError {
pub kind: ListDeliveryStreamsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDeliveryStreamsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDeliveryStreamsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDeliveryStreamsErrorKind {
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDeliveryStreamsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDeliveryStreamsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDeliveryStreamsError {
fn code(&self) -> Option<&str> {
ListDeliveryStreamsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDeliveryStreamsError {
pub fn new(kind: ListDeliveryStreamsErrorKind, 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: ListDeliveryStreamsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDeliveryStreamsErrorKind::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()
}
}
impl std::error::Error for ListDeliveryStreamsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDeliveryStreamsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeDeliveryStreamError {
pub kind: DescribeDeliveryStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeDeliveryStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeDeliveryStreamErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeDeliveryStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeDeliveryStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeDeliveryStreamError {
fn code(&self) -> Option<&str> {
DescribeDeliveryStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeDeliveryStreamError {
pub fn new(kind: DescribeDeliveryStreamErrorKind, 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: DescribeDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeDeliveryStreamErrorKind::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_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeDeliveryStreamErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DescribeDeliveryStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeDeliveryStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDeliveryStreamError {
pub kind: DeleteDeliveryStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDeliveryStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDeliveryStreamErrorKind {
ResourceInUseException(crate::error::ResourceInUseException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDeliveryStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDeliveryStreamErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
DeleteDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDeliveryStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDeliveryStreamError {
fn code(&self) -> Option<&str> {
DeleteDeliveryStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDeliveryStreamError {
pub fn new(kind: DeleteDeliveryStreamErrorKind, 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: DeleteDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDeliveryStreamErrorKind::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_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDeliveryStreamErrorKind::ResourceInUseException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDeliveryStreamErrorKind::ResourceNotFoundException(_)
)
}
}
impl std::error::Error for DeleteDeliveryStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDeliveryStreamErrorKind::ResourceInUseException(_inner) => Some(_inner),
DeleteDeliveryStreamErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDeliveryStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDeliveryStreamError {
pub kind: CreateDeliveryStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDeliveryStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDeliveryStreamErrorKind {
InvalidArgumentException(crate::error::InvalidArgumentException),
InvalidKmsResourceException(crate::error::InvalidKmsResourceException),
LimitExceededException(crate::error::LimitExceededException),
ResourceInUseException(crate::error::ResourceInUseException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDeliveryStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDeliveryStreamErrorKind::InvalidArgumentException(_inner) => _inner.fmt(f),
CreateDeliveryStreamErrorKind::InvalidKmsResourceException(_inner) => _inner.fmt(f),
CreateDeliveryStreamErrorKind::LimitExceededException(_inner) => _inner.fmt(f),
CreateDeliveryStreamErrorKind::ResourceInUseException(_inner) => _inner.fmt(f),
CreateDeliveryStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDeliveryStreamError {
fn code(&self) -> Option<&str> {
CreateDeliveryStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDeliveryStreamError {
pub fn new(kind: CreateDeliveryStreamErrorKind, 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: CreateDeliveryStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDeliveryStreamErrorKind::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_invalid_argument_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeliveryStreamErrorKind::InvalidArgumentException(_)
)
}
pub fn is_invalid_kms_resource_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeliveryStreamErrorKind::InvalidKmsResourceException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeliveryStreamErrorKind::LimitExceededException(_)
)
}
pub fn is_resource_in_use_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeliveryStreamErrorKind::ResourceInUseException(_)
)
}
}
impl std::error::Error for CreateDeliveryStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDeliveryStreamErrorKind::InvalidArgumentException(_inner) => Some(_inner),
CreateDeliveryStreamErrorKind::InvalidKmsResourceException(_inner) => Some(_inner),
CreateDeliveryStreamErrorKind::LimitExceededException(_inner) => Some(_inner),
CreateDeliveryStreamErrorKind::ResourceInUseException(_inner) => Some(_inner),
CreateDeliveryStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}