#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFlowSourceError {
pub kind: UpdateFlowSourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFlowSourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFlowSourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFlowSourceErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFlowSourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFlowSourceErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateFlowSourceErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateFlowSourceErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
UpdateFlowSourceErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateFlowSourceErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateFlowSourceErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateFlowSourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFlowSourceError {
fn code(&self) -> Option<&str> {
UpdateFlowSourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFlowSourceError {
pub fn new(kind: UpdateFlowSourceErrorKind, 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: UpdateFlowSourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFlowSourceErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowSourceErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, UpdateFlowSourceErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowSourceErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, UpdateFlowSourceErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowSourceErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowSourceErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateFlowSourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFlowSourceErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateFlowSourceErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateFlowSourceErrorKind::InternalServerErrorException(_inner) => Some(_inner),
UpdateFlowSourceErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateFlowSourceErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateFlowSourceErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateFlowSourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyRequestsException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl TooManyRequestsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyRequestsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyRequestsException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyRequestsException {}
pub mod too_many_requests_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::TooManyRequestsException {
crate::error::TooManyRequestsException {
message: self.message,
}
}
}
}
impl TooManyRequestsException {
pub fn builder() -> crate::error::too_many_requests_exception::Builder {
crate::error::too_many_requests_exception::Builder::default()
}
}
#[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_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
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::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NotFoundException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl NotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for NotFoundException {}
pub mod 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::NotFoundException {
crate::error::NotFoundException {
message: self.message,
}
}
}
}
impl NotFoundException {
pub fn builder() -> crate::error::not_found_exception::Builder {
crate::error::not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerErrorException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerErrorException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerErrorException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerErrorException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerErrorException {}
pub mod internal_server_error_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::InternalServerErrorException {
crate::error::InternalServerErrorException {
message: self.message,
}
}
}
}
impl InternalServerErrorException {
pub fn builder() -> crate::error::internal_server_error_exception::Builder {
crate::error::internal_server_error_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ForbiddenException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ForbiddenException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ForbiddenException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ForbiddenException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ForbiddenException {}
pub mod forbidden_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::ForbiddenException {
crate::error::ForbiddenException {
message: self.message,
}
}
}
}
impl ForbiddenException {
pub fn builder() -> crate::error::forbidden_exception::Builder {
crate::error::forbidden_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BadRequestException {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl BadRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadRequestException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for BadRequestException {}
pub mod bad_request_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::BadRequestException {
crate::error::BadRequestException {
message: self.message,
}
}
}
}
impl BadRequestException {
pub fn builder() -> crate::error::bad_request_exception::Builder {
crate::error::bad_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFlowOutputError {
pub kind: UpdateFlowOutputErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFlowOutputError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFlowOutputErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFlowOutputErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFlowOutputError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFlowOutputErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateFlowOutputErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateFlowOutputErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
UpdateFlowOutputErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateFlowOutputErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateFlowOutputErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateFlowOutputErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFlowOutputError {
fn code(&self) -> Option<&str> {
UpdateFlowOutputError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFlowOutputError {
pub fn new(kind: UpdateFlowOutputErrorKind, 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: UpdateFlowOutputErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFlowOutputErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowOutputErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, UpdateFlowOutputErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowOutputErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, UpdateFlowOutputErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowOutputErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowOutputErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateFlowOutputError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFlowOutputErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateFlowOutputErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateFlowOutputErrorKind::InternalServerErrorException(_inner) => Some(_inner),
UpdateFlowOutputErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateFlowOutputErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateFlowOutputErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateFlowOutputErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFlowMediaStreamError {
pub kind: UpdateFlowMediaStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFlowMediaStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFlowMediaStreamErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFlowMediaStreamErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFlowMediaStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFlowMediaStreamErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateFlowMediaStreamErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateFlowMediaStreamErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
UpdateFlowMediaStreamErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateFlowMediaStreamErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateFlowMediaStreamErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateFlowMediaStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFlowMediaStreamError {
fn code(&self) -> Option<&str> {
UpdateFlowMediaStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFlowMediaStreamError {
pub fn new(kind: UpdateFlowMediaStreamErrorKind, 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: UpdateFlowMediaStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFlowMediaStreamErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowMediaStreamErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowMediaStreamErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowMediaStreamErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowMediaStreamErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowMediaStreamErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowMediaStreamErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateFlowMediaStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFlowMediaStreamErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateFlowMediaStreamErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateFlowMediaStreamErrorKind::InternalServerErrorException(_inner) => Some(_inner),
UpdateFlowMediaStreamErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateFlowMediaStreamErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateFlowMediaStreamErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateFlowMediaStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFlowEntitlementError {
pub kind: UpdateFlowEntitlementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFlowEntitlementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFlowEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFlowEntitlementErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFlowEntitlementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFlowEntitlementErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateFlowEntitlementErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateFlowEntitlementErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
UpdateFlowEntitlementErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateFlowEntitlementErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateFlowEntitlementErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateFlowEntitlementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFlowEntitlementError {
fn code(&self) -> Option<&str> {
UpdateFlowEntitlementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFlowEntitlementError {
pub fn new(kind: UpdateFlowEntitlementErrorKind, 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: UpdateFlowEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFlowEntitlementErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowEntitlementErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowEntitlementErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowEntitlementErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowEntitlementErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowEntitlementErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowEntitlementErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for UpdateFlowEntitlementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFlowEntitlementErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateFlowEntitlementErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateFlowEntitlementErrorKind::InternalServerErrorException(_inner) => Some(_inner),
UpdateFlowEntitlementErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateFlowEntitlementErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateFlowEntitlementErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateFlowEntitlementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateFlowError {
pub kind: UpdateFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
UpdateFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
UpdateFlowErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
UpdateFlowErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UpdateFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateFlowErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
UpdateFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateFlowError {
fn code(&self) -> Option<&str> {
UpdateFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateFlowError {
pub fn new(kind: UpdateFlowErrorKind, 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: UpdateFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, UpdateFlowErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, UpdateFlowErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, UpdateFlowErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(&self.kind, UpdateFlowErrorKind::TooManyRequestsException(_))
}
}
impl std::error::Error for UpdateFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateFlowErrorKind::BadRequestException(_inner) => Some(_inner),
UpdateFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
UpdateFlowErrorKind::InternalServerErrorException(_inner) => Some(_inner),
UpdateFlowErrorKind::NotFoundException(_inner) => Some(_inner),
UpdateFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateFlowErrorKind::TooManyRequestsException(_inner) => Some(_inner),
UpdateFlowErrorKind::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 {
BadRequestException(crate::error::BadRequestException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
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::BadRequestException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::NotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::BadRequestException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::NotFoundException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::BadRequestException(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServerErrorException(_inner) => Some(_inner),
UntagResourceErrorKind::NotFoundException(_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 {
BadRequestException(crate::error::BadRequestException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
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::BadRequestException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
TagResourceErrorKind::NotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::BadRequestException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::NotFoundException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::BadRequestException(_inner) => Some(_inner),
TagResourceErrorKind::InternalServerErrorException(_inner) => Some(_inner),
TagResourceErrorKind::NotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopFlowError {
pub kind: StopFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
StopFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
StopFlowErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
StopFlowErrorKind::NotFoundException(_inner) => _inner.fmt(f),
StopFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
StopFlowErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
StopFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopFlowError {
fn code(&self) -> Option<&str> {
StopFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StopFlowError {
pub fn new(kind: StopFlowErrorKind, 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: StopFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, StopFlowErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, StopFlowErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
StopFlowErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, StopFlowErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
StopFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(&self.kind, StopFlowErrorKind::TooManyRequestsException(_))
}
}
impl std::error::Error for StopFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopFlowErrorKind::BadRequestException(_inner) => Some(_inner),
StopFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
StopFlowErrorKind::InternalServerErrorException(_inner) => Some(_inner),
StopFlowErrorKind::NotFoundException(_inner) => Some(_inner),
StopFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
StopFlowErrorKind::TooManyRequestsException(_inner) => Some(_inner),
StopFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartFlowError {
pub kind: StartFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
StartFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
StartFlowErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
StartFlowErrorKind::NotFoundException(_inner) => _inner.fmt(f),
StartFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
StartFlowErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
StartFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartFlowError {
fn code(&self) -> Option<&str> {
StartFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl StartFlowError {
pub fn new(kind: StartFlowErrorKind, 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: StartFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, StartFlowErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, StartFlowErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
StartFlowErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, StartFlowErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
StartFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(&self.kind, StartFlowErrorKind::TooManyRequestsException(_))
}
}
impl std::error::Error for StartFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartFlowErrorKind::BadRequestException(_inner) => Some(_inner),
StartFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
StartFlowErrorKind::InternalServerErrorException(_inner) => Some(_inner),
StartFlowErrorKind::NotFoundException(_inner) => Some(_inner),
StartFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
StartFlowErrorKind::TooManyRequestsException(_inner) => Some(_inner),
StartFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RevokeFlowEntitlementError {
pub kind: RevokeFlowEntitlementErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RevokeFlowEntitlementError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RevokeFlowEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RevokeFlowEntitlementErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RevokeFlowEntitlementError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RevokeFlowEntitlementErrorKind::BadRequestException(_inner) => _inner.fmt(f),
RevokeFlowEntitlementErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
RevokeFlowEntitlementErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
RevokeFlowEntitlementErrorKind::NotFoundException(_inner) => _inner.fmt(f),
RevokeFlowEntitlementErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
RevokeFlowEntitlementErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
RevokeFlowEntitlementErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RevokeFlowEntitlementError {
fn code(&self) -> Option<&str> {
RevokeFlowEntitlementError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RevokeFlowEntitlementError {
pub fn new(kind: RevokeFlowEntitlementErrorKind, 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: RevokeFlowEntitlementErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RevokeFlowEntitlementErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
RevokeFlowEntitlementErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
RevokeFlowEntitlementErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
RevokeFlowEntitlementErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RevokeFlowEntitlementErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
RevokeFlowEntitlementErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
RevokeFlowEntitlementErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for RevokeFlowEntitlementError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RevokeFlowEntitlementErrorKind::BadRequestException(_inner) => Some(_inner),
RevokeFlowEntitlementErrorKind::ForbiddenException(_inner) => Some(_inner),
RevokeFlowEntitlementErrorKind::InternalServerErrorException(_inner) => Some(_inner),
RevokeFlowEntitlementErrorKind::NotFoundException(_inner) => Some(_inner),
RevokeFlowEntitlementErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
RevokeFlowEntitlementErrorKind::TooManyRequestsException(_inner) => Some(_inner),
RevokeFlowEntitlementErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveFlowVpcInterfaceError {
pub kind: RemoveFlowVpcInterfaceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveFlowVpcInterfaceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveFlowVpcInterfaceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveFlowVpcInterfaceErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveFlowVpcInterfaceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveFlowVpcInterfaceErrorKind::BadRequestException(_inner) => _inner.fmt(f),
RemoveFlowVpcInterfaceErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
RemoveFlowVpcInterfaceErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
RemoveFlowVpcInterfaceErrorKind::NotFoundException(_inner) => _inner.fmt(f),
RemoveFlowVpcInterfaceErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
RemoveFlowVpcInterfaceErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
RemoveFlowVpcInterfaceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveFlowVpcInterfaceError {
fn code(&self) -> Option<&str> {
RemoveFlowVpcInterfaceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveFlowVpcInterfaceError {
pub fn new(kind: RemoveFlowVpcInterfaceErrorKind, 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: RemoveFlowVpcInterfaceErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveFlowVpcInterfaceErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowVpcInterfaceErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowVpcInterfaceErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowVpcInterfaceErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowVpcInterfaceErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowVpcInterfaceErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowVpcInterfaceErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for RemoveFlowVpcInterfaceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveFlowVpcInterfaceErrorKind::BadRequestException(_inner) => Some(_inner),
RemoveFlowVpcInterfaceErrorKind::ForbiddenException(_inner) => Some(_inner),
RemoveFlowVpcInterfaceErrorKind::InternalServerErrorException(_inner) => Some(_inner),
RemoveFlowVpcInterfaceErrorKind::NotFoundException(_inner) => Some(_inner),
RemoveFlowVpcInterfaceErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
RemoveFlowVpcInterfaceErrorKind::TooManyRequestsException(_inner) => Some(_inner),
RemoveFlowVpcInterfaceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveFlowSourceError {
pub kind: RemoveFlowSourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveFlowSourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveFlowSourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveFlowSourceErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveFlowSourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveFlowSourceErrorKind::BadRequestException(_inner) => _inner.fmt(f),
RemoveFlowSourceErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
RemoveFlowSourceErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
RemoveFlowSourceErrorKind::NotFoundException(_inner) => _inner.fmt(f),
RemoveFlowSourceErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
RemoveFlowSourceErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
RemoveFlowSourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveFlowSourceError {
fn code(&self) -> Option<&str> {
RemoveFlowSourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveFlowSourceError {
pub fn new(kind: RemoveFlowSourceErrorKind, 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: RemoveFlowSourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveFlowSourceErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowSourceErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, RemoveFlowSourceErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowSourceErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, RemoveFlowSourceErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowSourceErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowSourceErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for RemoveFlowSourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveFlowSourceErrorKind::BadRequestException(_inner) => Some(_inner),
RemoveFlowSourceErrorKind::ForbiddenException(_inner) => Some(_inner),
RemoveFlowSourceErrorKind::InternalServerErrorException(_inner) => Some(_inner),
RemoveFlowSourceErrorKind::NotFoundException(_inner) => Some(_inner),
RemoveFlowSourceErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
RemoveFlowSourceErrorKind::TooManyRequestsException(_inner) => Some(_inner),
RemoveFlowSourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveFlowOutputError {
pub kind: RemoveFlowOutputErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveFlowOutputError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveFlowOutputErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveFlowOutputErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveFlowOutputError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveFlowOutputErrorKind::BadRequestException(_inner) => _inner.fmt(f),
RemoveFlowOutputErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
RemoveFlowOutputErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
RemoveFlowOutputErrorKind::NotFoundException(_inner) => _inner.fmt(f),
RemoveFlowOutputErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
RemoveFlowOutputErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
RemoveFlowOutputErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveFlowOutputError {
fn code(&self) -> Option<&str> {
RemoveFlowOutputError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveFlowOutputError {
pub fn new(kind: RemoveFlowOutputErrorKind, 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: RemoveFlowOutputErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveFlowOutputErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowOutputErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, RemoveFlowOutputErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowOutputErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, RemoveFlowOutputErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowOutputErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowOutputErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for RemoveFlowOutputError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveFlowOutputErrorKind::BadRequestException(_inner) => Some(_inner),
RemoveFlowOutputErrorKind::ForbiddenException(_inner) => Some(_inner),
RemoveFlowOutputErrorKind::InternalServerErrorException(_inner) => Some(_inner),
RemoveFlowOutputErrorKind::NotFoundException(_inner) => Some(_inner),
RemoveFlowOutputErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
RemoveFlowOutputErrorKind::TooManyRequestsException(_inner) => Some(_inner),
RemoveFlowOutputErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RemoveFlowMediaStreamError {
pub kind: RemoveFlowMediaStreamErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RemoveFlowMediaStreamError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RemoveFlowMediaStreamErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RemoveFlowMediaStreamErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RemoveFlowMediaStreamError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RemoveFlowMediaStreamErrorKind::BadRequestException(_inner) => _inner.fmt(f),
RemoveFlowMediaStreamErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
RemoveFlowMediaStreamErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
RemoveFlowMediaStreamErrorKind::NotFoundException(_inner) => _inner.fmt(f),
RemoveFlowMediaStreamErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
RemoveFlowMediaStreamErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
RemoveFlowMediaStreamErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RemoveFlowMediaStreamError {
fn code(&self) -> Option<&str> {
RemoveFlowMediaStreamError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl RemoveFlowMediaStreamError {
pub fn new(kind: RemoveFlowMediaStreamErrorKind, 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: RemoveFlowMediaStreamErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RemoveFlowMediaStreamErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowMediaStreamErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowMediaStreamErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowMediaStreamErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowMediaStreamErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowMediaStreamErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
RemoveFlowMediaStreamErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for RemoveFlowMediaStreamError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RemoveFlowMediaStreamErrorKind::BadRequestException(_inner) => Some(_inner),
RemoveFlowMediaStreamErrorKind::ForbiddenException(_inner) => Some(_inner),
RemoveFlowMediaStreamErrorKind::InternalServerErrorException(_inner) => Some(_inner),
RemoveFlowMediaStreamErrorKind::NotFoundException(_inner) => Some(_inner),
RemoveFlowMediaStreamErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
RemoveFlowMediaStreamErrorKind::TooManyRequestsException(_inner) => Some(_inner),
RemoveFlowMediaStreamErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PurchaseOfferingError {
pub kind: PurchaseOfferingErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PurchaseOfferingError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PurchaseOfferingErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PurchaseOfferingErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PurchaseOfferingError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PurchaseOfferingErrorKind::BadRequestException(_inner) => _inner.fmt(f),
PurchaseOfferingErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
PurchaseOfferingErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
PurchaseOfferingErrorKind::NotFoundException(_inner) => _inner.fmt(f),
PurchaseOfferingErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
PurchaseOfferingErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
PurchaseOfferingErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PurchaseOfferingError {
fn code(&self) -> Option<&str> {
PurchaseOfferingError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PurchaseOfferingError {
pub fn new(kind: PurchaseOfferingErrorKind, 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: PurchaseOfferingErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PurchaseOfferingErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
PurchaseOfferingErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, PurchaseOfferingErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
PurchaseOfferingErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, PurchaseOfferingErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PurchaseOfferingErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
PurchaseOfferingErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for PurchaseOfferingError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PurchaseOfferingErrorKind::BadRequestException(_inner) => Some(_inner),
PurchaseOfferingErrorKind::ForbiddenException(_inner) => Some(_inner),
PurchaseOfferingErrorKind::InternalServerErrorException(_inner) => Some(_inner),
PurchaseOfferingErrorKind::NotFoundException(_inner) => Some(_inner),
PurchaseOfferingErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
PurchaseOfferingErrorKind::TooManyRequestsException(_inner) => Some(_inner),
PurchaseOfferingErrorKind::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 {
BadRequestException(crate::error::BadRequestException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
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::BadRequestException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::NotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::BadRequestException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::NotFoundException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::BadRequestException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InternalServerErrorException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::NotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListReservationsError {
pub kind: ListReservationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListReservationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListReservationsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListReservationsErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServerErrorException(crate::error::InternalServerErrorException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListReservationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListReservationsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListReservationsErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
ListReservationsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListReservationsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListReservationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListReservationsError {
fn code(&self) -> Option<&str> {
ListReservationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListReservationsError {
pub fn new(kind: ListReservationsErrorKind, 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: ListReservationsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListReservationsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListReservationsErrorKind::BadRequestException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
ListReservationsErrorKind::InternalServerErrorException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListReservationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListReservationsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListReservationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListReservationsErrorKind::BadRequestException(_inner) => Some(_inner),
ListReservationsErrorKind::InternalServerErrorException(_inner) => Some(_inner),
ListReservationsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListReservationsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListReservationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListOfferingsError {
pub kind: ListOfferingsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListOfferingsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListOfferingsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListOfferingsErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServerErrorException(crate::error::InternalServerErrorException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListOfferingsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListOfferingsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListOfferingsErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
ListOfferingsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListOfferingsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListOfferingsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListOfferingsError {
fn code(&self) -> Option<&str> {
ListOfferingsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListOfferingsError {
pub fn new(kind: ListOfferingsErrorKind, 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: ListOfferingsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListOfferingsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, ListOfferingsErrorKind::BadRequestException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
ListOfferingsErrorKind::InternalServerErrorException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListOfferingsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListOfferingsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListOfferingsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListOfferingsErrorKind::BadRequestException(_inner) => Some(_inner),
ListOfferingsErrorKind::InternalServerErrorException(_inner) => Some(_inner),
ListOfferingsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListOfferingsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListOfferingsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListFlowsError {
pub kind: ListFlowsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListFlowsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListFlowsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListFlowsErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServerErrorException(crate::error::InternalServerErrorException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListFlowsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListFlowsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListFlowsErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
ListFlowsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListFlowsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListFlowsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListFlowsError {
fn code(&self) -> Option<&str> {
ListFlowsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListFlowsError {
pub fn new(kind: ListFlowsErrorKind, 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: ListFlowsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListFlowsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, ListFlowsErrorKind::BadRequestException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
ListFlowsErrorKind::InternalServerErrorException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListFlowsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(&self.kind, ListFlowsErrorKind::TooManyRequestsException(_))
}
}
impl std::error::Error for ListFlowsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListFlowsErrorKind::BadRequestException(_inner) => Some(_inner),
ListFlowsErrorKind::InternalServerErrorException(_inner) => Some(_inner),
ListFlowsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListFlowsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListFlowsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEntitlementsError {
pub kind: ListEntitlementsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEntitlementsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEntitlementsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEntitlementsErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServerErrorException(crate::error::InternalServerErrorException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEntitlementsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEntitlementsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
ListEntitlementsErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
ListEntitlementsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
ListEntitlementsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
ListEntitlementsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEntitlementsError {
fn code(&self) -> Option<&str> {
ListEntitlementsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListEntitlementsError {
pub fn new(kind: ListEntitlementsErrorKind, 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: ListEntitlementsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEntitlementsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
ListEntitlementsErrorKind::BadRequestException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
ListEntitlementsErrorKind::InternalServerErrorException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ListEntitlementsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
ListEntitlementsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for ListEntitlementsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEntitlementsErrorKind::BadRequestException(_inner) => Some(_inner),
ListEntitlementsErrorKind::InternalServerErrorException(_inner) => Some(_inner),
ListEntitlementsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
ListEntitlementsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
ListEntitlementsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GrantFlowEntitlementsError {
pub kind: GrantFlowEntitlementsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GrantFlowEntitlementsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GrantFlowEntitlementsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GrantFlowEntitlementsErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
GrantFlowEntitlements420Exception(crate::error::GrantFlowEntitlements420Exception),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GrantFlowEntitlementsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GrantFlowEntitlementsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
GrantFlowEntitlementsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
GrantFlowEntitlementsErrorKind::GrantFlowEntitlements420Exception(_inner) => {
_inner.fmt(f)
}
GrantFlowEntitlementsErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
GrantFlowEntitlementsErrorKind::NotFoundException(_inner) => _inner.fmt(f),
GrantFlowEntitlementsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GrantFlowEntitlementsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
GrantFlowEntitlementsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GrantFlowEntitlementsError {
fn code(&self) -> Option<&str> {
GrantFlowEntitlementsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GrantFlowEntitlementsError {
pub fn new(kind: GrantFlowEntitlementsErrorKind, 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: GrantFlowEntitlementsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GrantFlowEntitlementsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
GrantFlowEntitlementsErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
GrantFlowEntitlementsErrorKind::ForbiddenException(_)
)
}
pub fn is_grant_flow_entitlements420_exception(&self) -> bool {
matches!(
&self.kind,
GrantFlowEntitlementsErrorKind::GrantFlowEntitlements420Exception(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
GrantFlowEntitlementsErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GrantFlowEntitlementsErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GrantFlowEntitlementsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
GrantFlowEntitlementsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for GrantFlowEntitlementsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GrantFlowEntitlementsErrorKind::BadRequestException(_inner) => Some(_inner),
GrantFlowEntitlementsErrorKind::ForbiddenException(_inner) => Some(_inner),
GrantFlowEntitlementsErrorKind::GrantFlowEntitlements420Exception(_inner) => {
Some(_inner)
}
GrantFlowEntitlementsErrorKind::InternalServerErrorException(_inner) => Some(_inner),
GrantFlowEntitlementsErrorKind::NotFoundException(_inner) => Some(_inner),
GrantFlowEntitlementsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GrantFlowEntitlementsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
GrantFlowEntitlementsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GrantFlowEntitlements420Exception {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl GrantFlowEntitlements420Exception {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for GrantFlowEntitlements420Exception {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "GrantFlowEntitlements420Exception")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for GrantFlowEntitlements420Exception {}
pub mod grant_flow_entitlements420_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::GrantFlowEntitlements420Exception {
crate::error::GrantFlowEntitlements420Exception {
message: self.message,
}
}
}
}
impl GrantFlowEntitlements420Exception {
pub fn builder() -> crate::error::grant_flow_entitlements420_exception::Builder {
crate::error::grant_flow_entitlements420_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeReservationError {
pub kind: DescribeReservationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeReservationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeReservationErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeReservationErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeReservationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeReservationErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DescribeReservationErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
DescribeReservationErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeReservationErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeReservationErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DescribeReservationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeReservationError {
fn code(&self) -> Option<&str> {
DescribeReservationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeReservationError {
pub fn new(kind: DescribeReservationErrorKind, 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: DescribeReservationErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeReservationErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReservationErrorKind::BadRequestException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReservationErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReservationErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReservationErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DescribeReservationErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DescribeReservationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeReservationErrorKind::BadRequestException(_inner) => Some(_inner),
DescribeReservationErrorKind::InternalServerErrorException(_inner) => Some(_inner),
DescribeReservationErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeReservationErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeReservationErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DescribeReservationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeOfferingError {
pub kind: DescribeOfferingErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeOfferingError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeOfferingErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeOfferingErrorKind {
BadRequestException(crate::error::BadRequestException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeOfferingError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeOfferingErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DescribeOfferingErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
DescribeOfferingErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeOfferingErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeOfferingErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DescribeOfferingErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeOfferingError {
fn code(&self) -> Option<&str> {
DescribeOfferingError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeOfferingError {
pub fn new(kind: DescribeOfferingErrorKind, 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: DescribeOfferingErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeOfferingErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOfferingErrorKind::BadRequestException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOfferingErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DescribeOfferingErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOfferingErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DescribeOfferingErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DescribeOfferingError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeOfferingErrorKind::BadRequestException(_inner) => Some(_inner),
DescribeOfferingErrorKind::InternalServerErrorException(_inner) => Some(_inner),
DescribeOfferingErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeOfferingErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeOfferingErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DescribeOfferingErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeFlowError {
pub kind: DescribeFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DescribeFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DescribeFlowErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
DescribeFlowErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DescribeFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DescribeFlowErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DescribeFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeFlowError {
fn code(&self) -> Option<&str> {
DescribeFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeFlowError {
pub fn new(kind: DescribeFlowErrorKind, 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: DescribeFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, DescribeFlowErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, DescribeFlowErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFlowErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DescribeFlowErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
DescribeFlowErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for DescribeFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeFlowErrorKind::BadRequestException(_inner) => Some(_inner),
DescribeFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
DescribeFlowErrorKind::InternalServerErrorException(_inner) => Some(_inner),
DescribeFlowErrorKind::NotFoundException(_inner) => Some(_inner),
DescribeFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DescribeFlowErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DescribeFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteFlowError {
pub kind: DeleteFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
DeleteFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
DeleteFlowErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
DeleteFlowErrorKind::NotFoundException(_inner) => _inner.fmt(f),
DeleteFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
DeleteFlowErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
DeleteFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteFlowError {
fn code(&self) -> Option<&str> {
DeleteFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteFlowError {
pub fn new(kind: DeleteFlowErrorKind, 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: DeleteFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, DeleteFlowErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, DeleteFlowErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFlowErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, DeleteFlowErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(&self.kind, DeleteFlowErrorKind::TooManyRequestsException(_))
}
}
impl std::error::Error for DeleteFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteFlowErrorKind::BadRequestException(_inner) => Some(_inner),
DeleteFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
DeleteFlowErrorKind::InternalServerErrorException(_inner) => Some(_inner),
DeleteFlowErrorKind::NotFoundException(_inner) => Some(_inner),
DeleteFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
DeleteFlowErrorKind::TooManyRequestsException(_inner) => Some(_inner),
DeleteFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateFlowError {
pub kind: CreateFlowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateFlowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateFlowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateFlowErrorKind {
BadRequestException(crate::error::BadRequestException),
CreateFlow420Exception(crate::error::CreateFlow420Exception),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateFlowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateFlowErrorKind::BadRequestException(_inner) => _inner.fmt(f),
CreateFlowErrorKind::CreateFlow420Exception(_inner) => _inner.fmt(f),
CreateFlowErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
CreateFlowErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
CreateFlowErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
CreateFlowErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
CreateFlowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateFlowError {
fn code(&self) -> Option<&str> {
CreateFlowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateFlowError {
pub fn new(kind: CreateFlowErrorKind, 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: CreateFlowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateFlowErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, CreateFlowErrorKind::BadRequestException(_))
}
pub fn is_create_flow420_exception(&self) -> bool {
matches!(&self.kind, CreateFlowErrorKind::CreateFlow420Exception(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, CreateFlowErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
CreateFlowErrorKind::InternalServerErrorException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
CreateFlowErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(&self.kind, CreateFlowErrorKind::TooManyRequestsException(_))
}
}
impl std::error::Error for CreateFlowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateFlowErrorKind::BadRequestException(_inner) => Some(_inner),
CreateFlowErrorKind::CreateFlow420Exception(_inner) => Some(_inner),
CreateFlowErrorKind::ForbiddenException(_inner) => Some(_inner),
CreateFlowErrorKind::InternalServerErrorException(_inner) => Some(_inner),
CreateFlowErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
CreateFlowErrorKind::TooManyRequestsException(_inner) => Some(_inner),
CreateFlowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreateFlow420Exception {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl CreateFlow420Exception {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for CreateFlow420Exception {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "CreateFlow420Exception")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for CreateFlow420Exception {}
pub mod create_flow420_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::CreateFlow420Exception {
crate::error::CreateFlow420Exception {
message: self.message,
}
}
}
}
impl CreateFlow420Exception {
pub fn builder() -> crate::error::create_flow420_exception::Builder {
crate::error::create_flow420_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddFlowVpcInterfacesError {
pub kind: AddFlowVpcInterfacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddFlowVpcInterfacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddFlowVpcInterfacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddFlowVpcInterfacesErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddFlowVpcInterfacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddFlowVpcInterfacesErrorKind::BadRequestException(_inner) => _inner.fmt(f),
AddFlowVpcInterfacesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
AddFlowVpcInterfacesErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
AddFlowVpcInterfacesErrorKind::NotFoundException(_inner) => _inner.fmt(f),
AddFlowVpcInterfacesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
AddFlowVpcInterfacesErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
AddFlowVpcInterfacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddFlowVpcInterfacesError {
fn code(&self) -> Option<&str> {
AddFlowVpcInterfacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddFlowVpcInterfacesError {
pub fn new(kind: AddFlowVpcInterfacesErrorKind, 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: AddFlowVpcInterfacesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddFlowVpcInterfacesErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowVpcInterfacesErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowVpcInterfacesErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowVpcInterfacesErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowVpcInterfacesErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowVpcInterfacesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowVpcInterfacesErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for AddFlowVpcInterfacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddFlowVpcInterfacesErrorKind::BadRequestException(_inner) => Some(_inner),
AddFlowVpcInterfacesErrorKind::ForbiddenException(_inner) => Some(_inner),
AddFlowVpcInterfacesErrorKind::InternalServerErrorException(_inner) => Some(_inner),
AddFlowVpcInterfacesErrorKind::NotFoundException(_inner) => Some(_inner),
AddFlowVpcInterfacesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
AddFlowVpcInterfacesErrorKind::TooManyRequestsException(_inner) => Some(_inner),
AddFlowVpcInterfacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddFlowSourcesError {
pub kind: AddFlowSourcesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddFlowSourcesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddFlowSourcesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddFlowSourcesErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddFlowSourcesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddFlowSourcesErrorKind::BadRequestException(_inner) => _inner.fmt(f),
AddFlowSourcesErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
AddFlowSourcesErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
AddFlowSourcesErrorKind::NotFoundException(_inner) => _inner.fmt(f),
AddFlowSourcesErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
AddFlowSourcesErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
AddFlowSourcesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddFlowSourcesError {
fn code(&self) -> Option<&str> {
AddFlowSourcesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddFlowSourcesError {
pub fn new(kind: AddFlowSourcesErrorKind, 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: AddFlowSourcesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddFlowSourcesErrorKind::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_bad_request_exception(&self) -> bool {
matches!(&self.kind, AddFlowSourcesErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, AddFlowSourcesErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowSourcesErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, AddFlowSourcesErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowSourcesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowSourcesErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for AddFlowSourcesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddFlowSourcesErrorKind::BadRequestException(_inner) => Some(_inner),
AddFlowSourcesErrorKind::ForbiddenException(_inner) => Some(_inner),
AddFlowSourcesErrorKind::InternalServerErrorException(_inner) => Some(_inner),
AddFlowSourcesErrorKind::NotFoundException(_inner) => Some(_inner),
AddFlowSourcesErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
AddFlowSourcesErrorKind::TooManyRequestsException(_inner) => Some(_inner),
AddFlowSourcesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddFlowOutputsError {
pub kind: AddFlowOutputsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddFlowOutputsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddFlowOutputsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddFlowOutputsErrorKind {
AddFlowOutputs420Exception(crate::error::AddFlowOutputs420Exception),
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddFlowOutputsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddFlowOutputsErrorKind::AddFlowOutputs420Exception(_inner) => _inner.fmt(f),
AddFlowOutputsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
AddFlowOutputsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
AddFlowOutputsErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
AddFlowOutputsErrorKind::NotFoundException(_inner) => _inner.fmt(f),
AddFlowOutputsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
AddFlowOutputsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
AddFlowOutputsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddFlowOutputsError {
fn code(&self) -> Option<&str> {
AddFlowOutputsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddFlowOutputsError {
pub fn new(kind: AddFlowOutputsErrorKind, 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: AddFlowOutputsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddFlowOutputsErrorKind::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_add_flow_outputs420_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowOutputsErrorKind::AddFlowOutputs420Exception(_)
)
}
pub fn is_bad_request_exception(&self) -> bool {
matches!(&self.kind, AddFlowOutputsErrorKind::BadRequestException(_))
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(&self.kind, AddFlowOutputsErrorKind::ForbiddenException(_))
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowOutputsErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(&self.kind, AddFlowOutputsErrorKind::NotFoundException(_))
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowOutputsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowOutputsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for AddFlowOutputsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddFlowOutputsErrorKind::AddFlowOutputs420Exception(_inner) => Some(_inner),
AddFlowOutputsErrorKind::BadRequestException(_inner) => Some(_inner),
AddFlowOutputsErrorKind::ForbiddenException(_inner) => Some(_inner),
AddFlowOutputsErrorKind::InternalServerErrorException(_inner) => Some(_inner),
AddFlowOutputsErrorKind::NotFoundException(_inner) => Some(_inner),
AddFlowOutputsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
AddFlowOutputsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
AddFlowOutputsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AddFlowOutputs420Exception {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AddFlowOutputs420Exception {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AddFlowOutputs420Exception {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AddFlowOutputs420Exception")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for AddFlowOutputs420Exception {}
pub mod add_flow_outputs420_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::AddFlowOutputs420Exception {
crate::error::AddFlowOutputs420Exception {
message: self.message,
}
}
}
}
impl AddFlowOutputs420Exception {
pub fn builder() -> crate::error::add_flow_outputs420_exception::Builder {
crate::error::add_flow_outputs420_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AddFlowMediaStreamsError {
pub kind: AddFlowMediaStreamsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AddFlowMediaStreamsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AddFlowMediaStreamsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AddFlowMediaStreamsErrorKind {
BadRequestException(crate::error::BadRequestException),
ForbiddenException(crate::error::ForbiddenException),
InternalServerErrorException(crate::error::InternalServerErrorException),
NotFoundException(crate::error::NotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
TooManyRequestsException(crate::error::TooManyRequestsException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AddFlowMediaStreamsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AddFlowMediaStreamsErrorKind::BadRequestException(_inner) => _inner.fmt(f),
AddFlowMediaStreamsErrorKind::ForbiddenException(_inner) => _inner.fmt(f),
AddFlowMediaStreamsErrorKind::InternalServerErrorException(_inner) => _inner.fmt(f),
AddFlowMediaStreamsErrorKind::NotFoundException(_inner) => _inner.fmt(f),
AddFlowMediaStreamsErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
AddFlowMediaStreamsErrorKind::TooManyRequestsException(_inner) => _inner.fmt(f),
AddFlowMediaStreamsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AddFlowMediaStreamsError {
fn code(&self) -> Option<&str> {
AddFlowMediaStreamsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AddFlowMediaStreamsError {
pub fn new(kind: AddFlowMediaStreamsErrorKind, 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: AddFlowMediaStreamsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AddFlowMediaStreamsErrorKind::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_bad_request_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowMediaStreamsErrorKind::BadRequestException(_)
)
}
pub fn is_forbidden_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowMediaStreamsErrorKind::ForbiddenException(_)
)
}
pub fn is_internal_server_error_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowMediaStreamsErrorKind::InternalServerErrorException(_)
)
}
pub fn is_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowMediaStreamsErrorKind::NotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowMediaStreamsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_too_many_requests_exception(&self) -> bool {
matches!(
&self.kind,
AddFlowMediaStreamsErrorKind::TooManyRequestsException(_)
)
}
}
impl std::error::Error for AddFlowMediaStreamsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AddFlowMediaStreamsErrorKind::BadRequestException(_inner) => Some(_inner),
AddFlowMediaStreamsErrorKind::ForbiddenException(_inner) => Some(_inner),
AddFlowMediaStreamsErrorKind::InternalServerErrorException(_inner) => Some(_inner),
AddFlowMediaStreamsErrorKind::NotFoundException(_inner) => Some(_inner),
AddFlowMediaStreamsErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
AddFlowMediaStreamsErrorKind::TooManyRequestsException(_inner) => Some(_inner),
AddFlowMediaStreamsErrorKind::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 _)
}
}