#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListWorkflowStepGroupsError {
pub kind: ListWorkflowStepGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListWorkflowStepGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListWorkflowStepGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListWorkflowStepGroupsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListWorkflowStepGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListWorkflowStepGroupsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListWorkflowStepGroupsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListWorkflowStepGroupsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListWorkflowStepGroupsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListWorkflowStepGroupsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListWorkflowStepGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListWorkflowStepGroupsError {
fn code(&self) -> Option<&str> {
ListWorkflowStepGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListWorkflowStepGroupsErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
ListWorkflowStepGroupsErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListWorkflowStepGroupsError {
pub fn new(kind: ListWorkflowStepGroupsErrorKind, 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: ListWorkflowStepGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListWorkflowStepGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowStepGroupsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowStepGroupsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowStepGroupsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowStepGroupsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowStepGroupsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListWorkflowStepGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListWorkflowStepGroupsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListWorkflowStepGroupsErrorKind::InternalServerException(_inner) => Some(_inner),
ListWorkflowStepGroupsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListWorkflowStepGroupsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListWorkflowStepGroupsErrorKind::ValidationException(_inner) => Some(_inner),
ListWorkflowStepGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ValidationException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ClientError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottlingException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ClientError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWorkflowStepGroupError {
pub kind: CreateWorkflowStepGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWorkflowStepGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWorkflowStepGroupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWorkflowStepGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWorkflowStepGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateWorkflowStepGroupErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateWorkflowStepGroupErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateWorkflowStepGroupErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateWorkflowStepGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWorkflowStepGroupError {
fn code(&self) -> Option<&str> {
CreateWorkflowStepGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateWorkflowStepGroupErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
CreateWorkflowStepGroupErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateWorkflowStepGroupError {
pub fn new(kind: CreateWorkflowStepGroupErrorKind, 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: CreateWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowStepGroupErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowStepGroupErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowStepGroupErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowStepGroupErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateWorkflowStepGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWorkflowStepGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateWorkflowStepGroupErrorKind::InternalServerException(_inner) => Some(_inner),
CreateWorkflowStepGroupErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateWorkflowStepGroupErrorKind::ValidationException(_inner) => Some(_inner),
CreateWorkflowStepGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWorkflowStepGroupError {
pub kind: DeleteWorkflowStepGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWorkflowStepGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWorkflowStepGroupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWorkflowStepGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWorkflowStepGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteWorkflowStepGroupErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteWorkflowStepGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteWorkflowStepGroupErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteWorkflowStepGroupErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteWorkflowStepGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWorkflowStepGroupError {
fn code(&self) -> Option<&str> {
DeleteWorkflowStepGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteWorkflowStepGroupErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteWorkflowStepGroupErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteWorkflowStepGroupError {
pub fn new(kind: DeleteWorkflowStepGroupErrorKind, 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: DeleteWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepGroupErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepGroupErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepGroupErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepGroupErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepGroupErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteWorkflowStepGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWorkflowStepGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteWorkflowStepGroupErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteWorkflowStepGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteWorkflowStepGroupErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteWorkflowStepGroupErrorKind::ValidationException(_inner) => Some(_inner),
DeleteWorkflowStepGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateWorkflowStepGroupError {
pub kind: UpdateWorkflowStepGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateWorkflowStepGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateWorkflowStepGroupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateWorkflowStepGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateWorkflowStepGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateWorkflowStepGroupErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateWorkflowStepGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateWorkflowStepGroupErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateWorkflowStepGroupErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateWorkflowStepGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateWorkflowStepGroupError {
fn code(&self) -> Option<&str> {
UpdateWorkflowStepGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateWorkflowStepGroupErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateWorkflowStepGroupErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateWorkflowStepGroupError {
pub fn new(kind: UpdateWorkflowStepGroupErrorKind, 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: UpdateWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowStepGroupErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowStepGroupErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowStepGroupErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowStepGroupErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowStepGroupErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateWorkflowStepGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateWorkflowStepGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateWorkflowStepGroupErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateWorkflowStepGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateWorkflowStepGroupErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateWorkflowStepGroupErrorKind::ValidationException(_inner) => Some(_inner),
UpdateWorkflowStepGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetWorkflowStepGroupError {
pub kind: GetWorkflowStepGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetWorkflowStepGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetWorkflowStepGroupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetWorkflowStepGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetWorkflowStepGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetWorkflowStepGroupErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetWorkflowStepGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetWorkflowStepGroupErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetWorkflowStepGroupErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetWorkflowStepGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetWorkflowStepGroupError {
fn code(&self) -> Option<&str> {
GetWorkflowStepGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetWorkflowStepGroupErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
GetWorkflowStepGroupErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetWorkflowStepGroupError {
pub fn new(kind: GetWorkflowStepGroupErrorKind, 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: GetWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetWorkflowStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkflowStepGroupErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkflowStepGroupErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkflowStepGroupErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkflowStepGroupErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkflowStepGroupErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetWorkflowStepGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetWorkflowStepGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetWorkflowStepGroupErrorKind::InternalServerException(_inner) => Some(_inner),
GetWorkflowStepGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetWorkflowStepGroupErrorKind::ThrottlingException(_inner) => Some(_inner),
GetWorkflowStepGroupErrorKind::ValidationException(_inner) => Some(_inner),
GetWorkflowStepGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RetryWorkflowStepError {
pub kind: RetryWorkflowStepErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for RetryWorkflowStepError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: RetryWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RetryWorkflowStepErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for RetryWorkflowStepError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RetryWorkflowStepErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
RetryWorkflowStepErrorKind::InternalServerException(_inner) => _inner.fmt(f),
RetryWorkflowStepErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
RetryWorkflowStepErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
RetryWorkflowStepErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RetryWorkflowStepError {
fn code(&self) -> Option<&str> {
RetryWorkflowStepError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
RetryWorkflowStepErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl RetryWorkflowStepError {
pub fn new(kind: RetryWorkflowStepErrorKind, 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: RetryWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RetryWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
RetryWorkflowStepErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
RetryWorkflowStepErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
RetryWorkflowStepErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
RetryWorkflowStepErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for RetryWorkflowStepError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RetryWorkflowStepErrorKind::AccessDeniedException(_inner) => Some(_inner),
RetryWorkflowStepErrorKind::InternalServerException(_inner) => Some(_inner),
RetryWorkflowStepErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
RetryWorkflowStepErrorKind::ThrottlingException(_inner) => Some(_inner),
RetryWorkflowStepErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListWorkflowStepsError {
pub kind: ListWorkflowStepsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListWorkflowStepsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListWorkflowStepsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListWorkflowStepsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListWorkflowStepsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListWorkflowStepsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListWorkflowStepsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListWorkflowStepsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListWorkflowStepsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListWorkflowStepsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListWorkflowStepsError {
fn code(&self) -> Option<&str> {
ListWorkflowStepsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListWorkflowStepsErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
ListWorkflowStepsErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListWorkflowStepsError {
pub fn new(kind: ListWorkflowStepsErrorKind, 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: ListWorkflowStepsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListWorkflowStepsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowStepsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowStepsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowStepsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowStepsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListWorkflowStepsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListWorkflowStepsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListWorkflowStepsErrorKind::InternalServerException(_inner) => Some(_inner),
ListWorkflowStepsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListWorkflowStepsErrorKind::ValidationException(_inner) => Some(_inner),
ListWorkflowStepsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWorkflowStepError {
pub kind: CreateWorkflowStepErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWorkflowStepError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWorkflowStepErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWorkflowStepError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWorkflowStepErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateWorkflowStepErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateWorkflowStepErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateWorkflowStepErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateWorkflowStepErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWorkflowStepError {
fn code(&self) -> Option<&str> {
CreateWorkflowStepError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateWorkflowStepErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
CreateWorkflowStepErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateWorkflowStepError {
pub fn new(kind: CreateWorkflowStepErrorKind, 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: CreateWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowStepErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowStepErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowStepErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowStepErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateWorkflowStepError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWorkflowStepErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateWorkflowStepErrorKind::InternalServerException(_inner) => Some(_inner),
CreateWorkflowStepErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateWorkflowStepErrorKind::ValidationException(_inner) => Some(_inner),
CreateWorkflowStepErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWorkflowStepError {
pub kind: DeleteWorkflowStepErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWorkflowStepError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWorkflowStepErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWorkflowStepError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWorkflowStepErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteWorkflowStepErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteWorkflowStepErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteWorkflowStepErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteWorkflowStepErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteWorkflowStepErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWorkflowStepError {
fn code(&self) -> Option<&str> {
DeleteWorkflowStepError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteWorkflowStepErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteWorkflowStepErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteWorkflowStepError {
pub fn new(kind: DeleteWorkflowStepErrorKind, 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: DeleteWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowStepErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteWorkflowStepError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWorkflowStepErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteWorkflowStepErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteWorkflowStepErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteWorkflowStepErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteWorkflowStepErrorKind::ValidationException(_inner) => Some(_inner),
DeleteWorkflowStepErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateWorkflowStepError {
pub kind: UpdateWorkflowStepErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateWorkflowStepError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateWorkflowStepErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateWorkflowStepError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateWorkflowStepErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateWorkflowStepErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateWorkflowStepErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateWorkflowStepErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateWorkflowStepErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateWorkflowStepError {
fn code(&self) -> Option<&str> {
UpdateWorkflowStepError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateWorkflowStepErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateWorkflowStepErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateWorkflowStepError {
pub fn new(kind: UpdateWorkflowStepErrorKind, 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: UpdateWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowStepErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowStepErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowStepErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowStepErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateWorkflowStepError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateWorkflowStepErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateWorkflowStepErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateWorkflowStepErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateWorkflowStepErrorKind::ValidationException(_inner) => Some(_inner),
UpdateWorkflowStepErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetWorkflowStepError {
pub kind: GetWorkflowStepErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetWorkflowStepError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetWorkflowStepErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetWorkflowStepError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetWorkflowStepErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetWorkflowStepErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetWorkflowStepErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetWorkflowStepErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetWorkflowStepErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetWorkflowStepError {
fn code(&self) -> Option<&str> {
GetWorkflowStepError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetWorkflowStepErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetWorkflowStepError {
pub fn new(kind: GetWorkflowStepErrorKind, 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: GetWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetWorkflowStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkflowStepErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkflowStepErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkflowStepErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetWorkflowStepErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for GetWorkflowStepError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetWorkflowStepErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetWorkflowStepErrorKind::InternalServerException(_inner) => Some(_inner),
GetWorkflowStepErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetWorkflowStepErrorKind::ThrottlingException(_inner) => Some(_inner),
GetWorkflowStepErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTemplateStepGroupsError {
pub kind: ListTemplateStepGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTemplateStepGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTemplateStepGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTemplateStepGroupsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTemplateStepGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTemplateStepGroupsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListTemplateStepGroupsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTemplateStepGroupsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTemplateStepGroupsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTemplateStepGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTemplateStepGroupsError {
fn code(&self) -> Option<&str> {
ListTemplateStepGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListTemplateStepGroupsErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListTemplateStepGroupsError {
pub fn new(kind: ListTemplateStepGroupsErrorKind, 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: ListTemplateStepGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTemplateStepGroupsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplateStepGroupsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplateStepGroupsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplateStepGroupsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplateStepGroupsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ListTemplateStepGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTemplateStepGroupsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTemplateStepGroupsErrorKind::InternalServerException(_inner) => Some(_inner),
ListTemplateStepGroupsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTemplateStepGroupsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTemplateStepGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTemplateStepGroupError {
pub kind: GetTemplateStepGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTemplateStepGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTemplateStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTemplateStepGroupErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTemplateStepGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTemplateStepGroupErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetTemplateStepGroupErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetTemplateStepGroupErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetTemplateStepGroupErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetTemplateStepGroupErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetTemplateStepGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTemplateStepGroupError {
fn code(&self) -> Option<&str> {
GetTemplateStepGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetTemplateStepGroupErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
GetTemplateStepGroupErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetTemplateStepGroupError {
pub fn new(kind: GetTemplateStepGroupErrorKind, 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: GetTemplateStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTemplateStepGroupErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateStepGroupErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateStepGroupErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateStepGroupErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateStepGroupErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateStepGroupErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetTemplateStepGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTemplateStepGroupErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetTemplateStepGroupErrorKind::InternalServerException(_inner) => Some(_inner),
GetTemplateStepGroupErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetTemplateStepGroupErrorKind::ThrottlingException(_inner) => Some(_inner),
GetTemplateStepGroupErrorKind::ValidationException(_inner) => Some(_inner),
GetTemplateStepGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTemplateStepsError {
pub kind: ListTemplateStepsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTemplateStepsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTemplateStepsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTemplateStepsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTemplateStepsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTemplateStepsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListTemplateStepsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTemplateStepsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTemplateStepsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTemplateStepsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTemplateStepsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTemplateStepsError {
fn code(&self) -> Option<&str> {
ListTemplateStepsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListTemplateStepsErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
ListTemplateStepsErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListTemplateStepsError {
pub fn new(kind: ListTemplateStepsErrorKind, 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: ListTemplateStepsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTemplateStepsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplateStepsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplateStepsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplateStepsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplateStepsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplateStepsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTemplateStepsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTemplateStepsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTemplateStepsErrorKind::InternalServerException(_inner) => Some(_inner),
ListTemplateStepsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTemplateStepsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTemplateStepsErrorKind::ValidationException(_inner) => Some(_inner),
ListTemplateStepsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTemplateStepError {
pub kind: GetTemplateStepErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTemplateStepError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTemplateStepErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTemplateStepErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTemplateStepError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTemplateStepErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetTemplateStepErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetTemplateStepErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetTemplateStepErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetTemplateStepErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetTemplateStepErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTemplateStepError {
fn code(&self) -> Option<&str> {
GetTemplateStepError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetTemplateStepErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
GetTemplateStepErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetTemplateStepError {
pub fn new(kind: GetTemplateStepErrorKind, 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: GetTemplateStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTemplateStepErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateStepErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateStepErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateStepErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetTemplateStepErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetTemplateStepErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetTemplateStepError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTemplateStepErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetTemplateStepErrorKind::InternalServerException(_inner) => Some(_inner),
GetTemplateStepErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetTemplateStepErrorKind::ThrottlingException(_inner) => Some(_inner),
GetTemplateStepErrorKind::ValidationException(_inner) => Some(_inner),
GetTemplateStepErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPluginsError {
pub kind: ListPluginsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPluginsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPluginsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPluginsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPluginsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPluginsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListPluginsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListPluginsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListPluginsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPluginsError {
fn code(&self) -> Option<&str> {
ListPluginsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListPluginsErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
ListPluginsErrorKind::ValidationException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl ListPluginsError {
pub fn new(kind: ListPluginsErrorKind, 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: ListPluginsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPluginsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, ListPluginsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, ListPluginsErrorKind::InternalServerException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListPluginsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListPluginsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPluginsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListPluginsErrorKind::InternalServerException(_inner) => Some(_inner),
ListPluginsErrorKind::ValidationException(_inner) => Some(_inner),
ListPluginsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTemplatesError {
pub kind: ListTemplatesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTemplatesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTemplatesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTemplatesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTemplatesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTemplatesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListTemplatesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTemplatesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTemplatesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTemplatesError {
fn code(&self) -> Option<&str> {
ListTemplatesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListTemplatesErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListTemplatesError {
pub fn new(kind: ListTemplatesErrorKind, 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: ListTemplatesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTemplatesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, ListTemplatesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTemplatesErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListTemplatesErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for ListTemplatesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTemplatesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTemplatesErrorKind::InternalServerException(_inner) => Some(_inner),
ListTemplatesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTemplatesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTemplateError {
pub kind: GetTemplateErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTemplateError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTemplateErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTemplateErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTemplateError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTemplateErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetTemplateErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetTemplateErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetTemplateErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetTemplateErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTemplateError {
fn code(&self) -> Option<&str> {
GetTemplateError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetTemplateErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetTemplateError {
pub fn new(kind: GetTemplateErrorKind, 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: GetTemplateErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTemplateErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetTemplateErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetTemplateErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetTemplateErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetTemplateErrorKind::ThrottlingException(_))
}
}
impl std::error::Error for GetTemplateError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTemplateErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetTemplateErrorKind::InternalServerException(_inner) => Some(_inner),
GetTemplateErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetTemplateErrorKind::ThrottlingException(_inner) => Some(_inner),
GetTemplateErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopWorkflowError {
pub kind: StopWorkflowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopWorkflowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopWorkflowErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopWorkflowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopWorkflowErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StopWorkflowErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StopWorkflowErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopWorkflowErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StopWorkflowErrorKind::ValidationException(_inner) => _inner.fmt(f),
StopWorkflowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopWorkflowError {
fn code(&self) -> Option<&str> {
StopWorkflowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StopWorkflowErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
StopWorkflowErrorKind::ValidationException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl StopWorkflowError {
pub fn new(kind: StopWorkflowErrorKind, 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: StopWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, StopWorkflowErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StopWorkflowErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopWorkflowErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, StopWorkflowErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, StopWorkflowErrorKind::ValidationException(_))
}
}
impl std::error::Error for StopWorkflowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopWorkflowErrorKind::AccessDeniedException(_inner) => Some(_inner),
StopWorkflowErrorKind::InternalServerException(_inner) => Some(_inner),
StopWorkflowErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopWorkflowErrorKind::ThrottlingException(_inner) => Some(_inner),
StopWorkflowErrorKind::ValidationException(_inner) => Some(_inner),
StopWorkflowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartWorkflowError {
pub kind: StartWorkflowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartWorkflowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartWorkflowErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartWorkflowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartWorkflowErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartWorkflowErrorKind::InternalServerException(_inner) => _inner.fmt(f),
StartWorkflowErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartWorkflowErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartWorkflowErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartWorkflowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartWorkflowError {
fn code(&self) -> Option<&str> {
StartWorkflowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StartWorkflowErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
StartWorkflowErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl StartWorkflowError {
pub fn new(kind: StartWorkflowErrorKind, 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: StartWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, StartWorkflowErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
StartWorkflowErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartWorkflowErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, StartWorkflowErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, StartWorkflowErrorKind::ValidationException(_))
}
}
impl std::error::Error for StartWorkflowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartWorkflowErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartWorkflowErrorKind::InternalServerException(_inner) => Some(_inner),
StartWorkflowErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartWorkflowErrorKind::ThrottlingException(_inner) => Some(_inner),
StartWorkflowErrorKind::ValidationException(_inner) => Some(_inner),
StartWorkflowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListWorkflowsError {
pub kind: ListWorkflowsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListWorkflowsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListWorkflowsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListWorkflowsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListWorkflowsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListWorkflowsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListWorkflowsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListWorkflowsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListWorkflowsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListWorkflowsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListWorkflowsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListWorkflowsError {
fn code(&self) -> Option<&str> {
ListWorkflowsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListWorkflowsErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
ListWorkflowsErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListWorkflowsError {
pub fn new(kind: ListWorkflowsErrorKind, 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: ListWorkflowsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListWorkflowsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, ListWorkflowsErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListWorkflowsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListWorkflowsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListWorkflowsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListWorkflowsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListWorkflowsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListWorkflowsErrorKind::InternalServerException(_inner) => Some(_inner),
ListWorkflowsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListWorkflowsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListWorkflowsErrorKind::ValidationException(_inner) => Some(_inner),
ListWorkflowsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateWorkflowError {
pub kind: CreateWorkflowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateWorkflowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateWorkflowErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateWorkflowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateWorkflowErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateWorkflowErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateWorkflowErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateWorkflowErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateWorkflowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateWorkflowError {
fn code(&self) -> Option<&str> {
CreateWorkflowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateWorkflowErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
CreateWorkflowErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateWorkflowError {
pub fn new(kind: CreateWorkflowErrorKind, 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: CreateWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateWorkflowErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateWorkflowErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateWorkflowErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateWorkflowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateWorkflowErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateWorkflowErrorKind::InternalServerException(_inner) => Some(_inner),
CreateWorkflowErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateWorkflowErrorKind::ValidationException(_inner) => Some(_inner),
CreateWorkflowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteWorkflowError {
pub kind: DeleteWorkflowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteWorkflowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteWorkflowErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteWorkflowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteWorkflowErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteWorkflowErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteWorkflowErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteWorkflowErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteWorkflowErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteWorkflowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteWorkflowError {
fn code(&self) -> Option<&str> {
DeleteWorkflowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteWorkflowErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
DeleteWorkflowErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteWorkflowError {
pub fn new(kind: DeleteWorkflowErrorKind, 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: DeleteWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteWorkflowErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteWorkflowErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteWorkflowErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteWorkflowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteWorkflowErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteWorkflowErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteWorkflowErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteWorkflowErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteWorkflowErrorKind::ValidationException(_inner) => Some(_inner),
DeleteWorkflowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateWorkflowError {
pub kind: UpdateWorkflowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateWorkflowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateWorkflowErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateWorkflowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateWorkflowErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateWorkflowErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateWorkflowErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateWorkflowErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateWorkflowErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateWorkflowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateWorkflowError {
fn code(&self) -> Option<&str> {
UpdateWorkflowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateWorkflowErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
UpdateWorkflowErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateWorkflowError {
pub fn new(kind: UpdateWorkflowErrorKind, 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: UpdateWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateWorkflowErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UpdateWorkflowErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UpdateWorkflowErrorKind::ValidationException(_))
}
}
impl std::error::Error for UpdateWorkflowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateWorkflowErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateWorkflowErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateWorkflowErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateWorkflowErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateWorkflowErrorKind::ValidationException(_inner) => Some(_inner),
UpdateWorkflowErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetWorkflowError {
pub kind: GetWorkflowErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetWorkflowError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetWorkflowErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetWorkflowError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetWorkflowErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetWorkflowErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetWorkflowErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetWorkflowErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetWorkflowErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetWorkflowErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetWorkflowError {
fn code(&self) -> Option<&str> {
GetWorkflowError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetWorkflowErrorKind::AccessDeniedException(inner) => {
Some(inner.retryable_error_kind())
}
GetWorkflowErrorKind::ValidationException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetWorkflowError {
pub fn new(kind: GetWorkflowErrorKind, 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: GetWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetWorkflowErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, GetWorkflowErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, GetWorkflowErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetWorkflowErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetWorkflowErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetWorkflowErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetWorkflowError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetWorkflowErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetWorkflowErrorKind::InternalServerException(_inner) => Some(_inner),
GetWorkflowErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetWorkflowErrorKind::ThrottlingException(_inner) => Some(_inner),
GetWorkflowErrorKind::ValidationException(_inner) => Some(_inner),
GetWorkflowErrorKind::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 {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UntagResourceErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ValidationException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
TagResourceErrorKind::ValidationException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ValidationException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListTagsForResourceErrorKind::ValidationException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ValidationException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}