#[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 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 retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ClientError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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 ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_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_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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 ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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::ConflictException {
crate::error::ConflictException {
message: self.message,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
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 ListSpacesError {
pub kind: ListSpacesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSpacesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSpacesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSpacesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSpacesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSpacesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListSpacesErrorKind::ConflictException(_inner) => _inner.fmt(f),
ListSpacesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListSpacesErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
ListSpacesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListSpacesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListSpacesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSpacesError {
fn code(&self) -> Option<&str> {
ListSpacesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListSpacesErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl ListSpacesError {
pub fn new(kind: ListSpacesErrorKind, 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: ListSpacesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSpacesErrorKind::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, ListSpacesErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, ListSpacesErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListSpacesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListSpacesErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListSpacesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListSpacesErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListSpacesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSpacesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListSpacesErrorKind::ConflictException(_inner) => Some(_inner),
ListSpacesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListSpacesErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
ListSpacesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListSpacesErrorKind::ValidationException(_inner) => Some(_inner),
ListSpacesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSpaceError {
pub kind: GetSpaceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSpaceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSpaceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSpaceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSpaceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSpaceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetSpaceErrorKind::ConflictException(_inner) => _inner.fmt(f),
GetSpaceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSpaceErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
GetSpaceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetSpaceErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetSpaceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSpaceError {
fn code(&self) -> Option<&str> {
GetSpaceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetSpaceErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetSpaceError {
pub fn new(kind: GetSpaceErrorKind, 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: GetSpaceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSpaceErrorKind::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, GetSpaceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, GetSpaceErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, GetSpaceErrorKind::ResourceNotFoundException(_))
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetSpaceErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetSpaceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetSpaceErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetSpaceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSpaceErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetSpaceErrorKind::ConflictException(_inner) => Some(_inner),
GetSpaceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSpaceErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
GetSpaceErrorKind::ThrottlingException(_inner) => Some(_inner),
GetSpaceErrorKind::ValidationException(_inner) => Some(_inner),
GetSpaceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSubscriptionError {
pub kind: GetSubscriptionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSubscriptionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSubscriptionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSubscriptionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSubscriptionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetSubscriptionErrorKind::ConflictException(_inner) => _inner.fmt(f),
GetSubscriptionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetSubscriptionErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
GetSubscriptionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetSubscriptionErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetSubscriptionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSubscriptionError {
fn code(&self) -> Option<&str> {
GetSubscriptionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetSubscriptionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetSubscriptionError {
pub fn new(kind: GetSubscriptionErrorKind, 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: GetSubscriptionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSubscriptionErrorKind::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,
GetSubscriptionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, GetSubscriptionErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetSubscriptionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetSubscriptionErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetSubscriptionErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetSubscriptionErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetSubscriptionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSubscriptionErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetSubscriptionErrorKind::ConflictException(_inner) => Some(_inner),
GetSubscriptionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetSubscriptionErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
GetSubscriptionErrorKind::ThrottlingException(_inner) => Some(_inner),
GetSubscriptionErrorKind::ValidationException(_inner) => Some(_inner),
GetSubscriptionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListProjectsError {
pub kind: ListProjectsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListProjectsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListProjectsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListProjectsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListProjectsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListProjectsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListProjectsErrorKind::ConflictException(_inner) => _inner.fmt(f),
ListProjectsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListProjectsErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
ListProjectsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListProjectsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListProjectsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListProjectsError {
fn code(&self) -> Option<&str> {
ListProjectsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListProjectsErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl ListProjectsError {
pub fn new(kind: ListProjectsErrorKind, 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: ListProjectsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListProjectsErrorKind::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, ListProjectsErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, ListProjectsErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListProjectsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListProjectsErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListProjectsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListProjectsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListProjectsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListProjectsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListProjectsErrorKind::ConflictException(_inner) => Some(_inner),
ListProjectsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListProjectsErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
ListProjectsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListProjectsErrorKind::ValidationException(_inner) => Some(_inner),
ListProjectsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateProjectError {
pub kind: CreateProjectErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateProjectError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateProjectErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateProjectErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateProjectError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateProjectErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateProjectErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateProjectErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateProjectErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateProjectErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateProjectErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateProjectErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateProjectError {
fn code(&self) -> Option<&str> {
CreateProjectError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateProjectErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateProjectError {
pub fn new(kind: CreateProjectErrorKind, 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: CreateProjectErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateProjectErrorKind::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, CreateProjectErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateProjectErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateProjectErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateProjectErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, CreateProjectErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, CreateProjectErrorKind::ValidationException(_))
}
}
impl std::error::Error for CreateProjectError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateProjectErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateProjectErrorKind::ConflictException(_inner) => Some(_inner),
CreateProjectErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateProjectErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateProjectErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateProjectErrorKind::ValidationException(_inner) => Some(_inner),
CreateProjectErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetProjectError {
pub kind: GetProjectErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetProjectError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetProjectErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetProjectErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetProjectError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetProjectErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetProjectErrorKind::ConflictException(_inner) => _inner.fmt(f),
GetProjectErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetProjectErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
GetProjectErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetProjectErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetProjectErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetProjectError {
fn code(&self) -> Option<&str> {
GetProjectError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetProjectErrorKind::ThrottlingException(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetProjectError {
pub fn new(kind: GetProjectErrorKind, 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: GetProjectErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetProjectErrorKind::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, GetProjectErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, GetProjectErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetProjectErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetProjectErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetProjectErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetProjectErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetProjectError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetProjectErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetProjectErrorKind::ConflictException(_inner) => Some(_inner),
GetProjectErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetProjectErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
GetProjectErrorKind::ThrottlingException(_inner) => Some(_inner),
GetProjectErrorKind::ValidationException(_inner) => Some(_inner),
GetProjectErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSourceRepositoryCloneUrlsError {
pub kind: GetSourceRepositoryCloneUrlsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSourceRepositoryCloneUrlsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSourceRepositoryCloneUrlsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSourceRepositoryCloneUrlsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSourceRepositoryCloneUrlsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSourceRepositoryCloneUrlsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetSourceRepositoryCloneUrlsErrorKind::ConflictException(_inner) => _inner.fmt(f),
GetSourceRepositoryCloneUrlsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetSourceRepositoryCloneUrlsErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
GetSourceRepositoryCloneUrlsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetSourceRepositoryCloneUrlsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetSourceRepositoryCloneUrlsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSourceRepositoryCloneUrlsError {
fn code(&self) -> Option<&str> {
GetSourceRepositoryCloneUrlsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetSourceRepositoryCloneUrlsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetSourceRepositoryCloneUrlsError {
pub fn new(kind: GetSourceRepositoryCloneUrlsErrorKind, 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: GetSourceRepositoryCloneUrlsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSourceRepositoryCloneUrlsErrorKind::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,
GetSourceRepositoryCloneUrlsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
GetSourceRepositoryCloneUrlsErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetSourceRepositoryCloneUrlsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetSourceRepositoryCloneUrlsErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetSourceRepositoryCloneUrlsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetSourceRepositoryCloneUrlsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetSourceRepositoryCloneUrlsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSourceRepositoryCloneUrlsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetSourceRepositoryCloneUrlsErrorKind::ConflictException(_inner) => Some(_inner),
GetSourceRepositoryCloneUrlsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetSourceRepositoryCloneUrlsErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
GetSourceRepositoryCloneUrlsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetSourceRepositoryCloneUrlsErrorKind::ValidationException(_inner) => Some(_inner),
GetSourceRepositoryCloneUrlsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSourceRepositoriesError {
pub kind: ListSourceRepositoriesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSourceRepositoriesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSourceRepositoriesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSourceRepositoriesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSourceRepositoriesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSourceRepositoriesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListSourceRepositoriesErrorKind::ConflictException(_inner) => _inner.fmt(f),
ListSourceRepositoriesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListSourceRepositoriesErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
ListSourceRepositoriesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListSourceRepositoriesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListSourceRepositoriesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSourceRepositoriesError {
fn code(&self) -> Option<&str> {
ListSourceRepositoriesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListSourceRepositoriesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListSourceRepositoriesError {
pub fn new(kind: ListSourceRepositoriesErrorKind, 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: ListSourceRepositoriesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSourceRepositoriesErrorKind::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,
ListSourceRepositoriesErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoriesErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoriesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoriesErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoriesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoriesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListSourceRepositoriesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSourceRepositoriesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListSourceRepositoriesErrorKind::ConflictException(_inner) => Some(_inner),
ListSourceRepositoriesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListSourceRepositoriesErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
ListSourceRepositoriesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListSourceRepositoriesErrorKind::ValidationException(_inner) => Some(_inner),
ListSourceRepositoriesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSourceRepositoryBranchesError {
pub kind: ListSourceRepositoryBranchesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListSourceRepositoryBranchesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListSourceRepositoryBranchesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSourceRepositoryBranchesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListSourceRepositoryBranchesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSourceRepositoryBranchesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListSourceRepositoryBranchesErrorKind::ConflictException(_inner) => _inner.fmt(f),
ListSourceRepositoryBranchesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListSourceRepositoryBranchesErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
ListSourceRepositoryBranchesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListSourceRepositoryBranchesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListSourceRepositoryBranchesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSourceRepositoryBranchesError {
fn code(&self) -> Option<&str> {
ListSourceRepositoryBranchesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListSourceRepositoryBranchesErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListSourceRepositoryBranchesError {
pub fn new(kind: ListSourceRepositoryBranchesErrorKind, 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: ListSourceRepositoryBranchesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSourceRepositoryBranchesErrorKind::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,
ListSourceRepositoryBranchesErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoryBranchesErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoryBranchesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoryBranchesErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoryBranchesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListSourceRepositoryBranchesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListSourceRepositoryBranchesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSourceRepositoryBranchesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListSourceRepositoryBranchesErrorKind::ConflictException(_inner) => Some(_inner),
ListSourceRepositoryBranchesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListSourceRepositoryBranchesErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
ListSourceRepositoryBranchesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListSourceRepositoryBranchesErrorKind::ValidationException(_inner) => Some(_inner),
ListSourceRepositoryBranchesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSourceRepositoryBranchError {
pub kind: CreateSourceRepositoryBranchErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSourceRepositoryBranchError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSourceRepositoryBranchErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSourceRepositoryBranchErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSourceRepositoryBranchError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSourceRepositoryBranchErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateSourceRepositoryBranchErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateSourceRepositoryBranchErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
CreateSourceRepositoryBranchErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateSourceRepositoryBranchErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateSourceRepositoryBranchErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateSourceRepositoryBranchErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSourceRepositoryBranchError {
fn code(&self) -> Option<&str> {
CreateSourceRepositoryBranchError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateSourceRepositoryBranchErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateSourceRepositoryBranchError {
pub fn new(kind: CreateSourceRepositoryBranchErrorKind, 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: CreateSourceRepositoryBranchErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSourceRepositoryBranchErrorKind::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,
CreateSourceRepositoryBranchErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateSourceRepositoryBranchErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateSourceRepositoryBranchErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateSourceRepositoryBranchErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateSourceRepositoryBranchErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateSourceRepositoryBranchErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateSourceRepositoryBranchError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSourceRepositoryBranchErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateSourceRepositoryBranchErrorKind::ConflictException(_inner) => Some(_inner),
CreateSourceRepositoryBranchErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
CreateSourceRepositoryBranchErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
CreateSourceRepositoryBranchErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateSourceRepositoryBranchErrorKind::ValidationException(_inner) => Some(_inner),
CreateSourceRepositoryBranchErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StopDevEnvironmentError {
pub kind: StopDevEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StopDevEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StopDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StopDevEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StopDevEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StopDevEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StopDevEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
StopDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StopDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
StopDevEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StopDevEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
StopDevEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StopDevEnvironmentError {
fn code(&self) -> Option<&str> {
StopDevEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StopDevEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl StopDevEnvironmentError {
pub fn new(kind: StopDevEnvironmentErrorKind, 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: StopDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StopDevEnvironmentErrorKind::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,
StopDevEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
StopDevEnvironmentErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StopDevEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StopDevEnvironmentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StopDevEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
StopDevEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for StopDevEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StopDevEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
StopDevEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
StopDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StopDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
StopDevEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
StopDevEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
StopDevEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartDevEnvironmentSessionError {
pub kind: StartDevEnvironmentSessionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartDevEnvironmentSessionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartDevEnvironmentSessionErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartDevEnvironmentSessionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartDevEnvironmentSessionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartDevEnvironmentSessionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartDevEnvironmentSessionErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartDevEnvironmentSessionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartDevEnvironmentSessionErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
StartDevEnvironmentSessionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartDevEnvironmentSessionErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartDevEnvironmentSessionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartDevEnvironmentSessionError {
fn code(&self) -> Option<&str> {
StartDevEnvironmentSessionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StartDevEnvironmentSessionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl StartDevEnvironmentSessionError {
pub fn new(kind: StartDevEnvironmentSessionErrorKind, 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: StartDevEnvironmentSessionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartDevEnvironmentSessionErrorKind::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,
StartDevEnvironmentSessionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentSessionErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentSessionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentSessionErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentSessionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentSessionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for StartDevEnvironmentSessionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartDevEnvironmentSessionErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartDevEnvironmentSessionErrorKind::ConflictException(_inner) => Some(_inner),
StartDevEnvironmentSessionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartDevEnvironmentSessionErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
StartDevEnvironmentSessionErrorKind::ThrottlingException(_inner) => Some(_inner),
StartDevEnvironmentSessionErrorKind::ValidationException(_inner) => Some(_inner),
StartDevEnvironmentSessionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct StartDevEnvironmentError {
pub kind: StartDevEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for StartDevEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: StartDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum StartDevEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for StartDevEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
StartDevEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
StartDevEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
StartDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
StartDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
StartDevEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
StartDevEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
StartDevEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for StartDevEnvironmentError {
fn code(&self) -> Option<&str> {
StartDevEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
StartDevEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl StartDevEnvironmentError {
pub fn new(kind: StartDevEnvironmentErrorKind, 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: StartDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: StartDevEnvironmentErrorKind::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,
StartDevEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
StartDevEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for StartDevEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
StartDevEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
StartDevEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
StartDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
StartDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
StartDevEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
StartDevEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
StartDevEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDevEnvironmentsError {
pub kind: ListDevEnvironmentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDevEnvironmentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDevEnvironmentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDevEnvironmentsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDevEnvironmentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDevEnvironmentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListDevEnvironmentsErrorKind::ConflictException(_inner) => _inner.fmt(f),
ListDevEnvironmentsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListDevEnvironmentsErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
ListDevEnvironmentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDevEnvironmentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListDevEnvironmentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDevEnvironmentsError {
fn code(&self) -> Option<&str> {
ListDevEnvironmentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListDevEnvironmentsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListDevEnvironmentsError {
pub fn new(kind: ListDevEnvironmentsErrorKind, 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: ListDevEnvironmentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDevEnvironmentsErrorKind::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,
ListDevEnvironmentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ListDevEnvironmentsErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListDevEnvironmentsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListDevEnvironmentsErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListDevEnvironmentsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListDevEnvironmentsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListDevEnvironmentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDevEnvironmentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListDevEnvironmentsErrorKind::ConflictException(_inner) => Some(_inner),
ListDevEnvironmentsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListDevEnvironmentsErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
ListDevEnvironmentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDevEnvironmentsErrorKind::ValidationException(_inner) => Some(_inner),
ListDevEnvironmentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDevEnvironmentError {
pub kind: CreateDevEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDevEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDevEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDevEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDevEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateDevEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateDevEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateDevEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateDevEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDevEnvironmentError {
fn code(&self) -> Option<&str> {
CreateDevEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateDevEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateDevEnvironmentError {
pub fn new(kind: CreateDevEnvironmentErrorKind, 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: CreateDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDevEnvironmentErrorKind::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,
CreateDevEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateDevEnvironmentErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDevEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateDevEnvironmentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateDevEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateDevEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateDevEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDevEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateDevEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
CreateDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateDevEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateDevEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
CreateDevEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDevEnvironmentError {
pub kind: DeleteDevEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDevEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDevEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDevEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDevEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteDevEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
DeleteDevEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteDevEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteDevEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDevEnvironmentError {
fn code(&self) -> Option<&str> {
DeleteDevEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteDevEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteDevEnvironmentError {
pub fn new(kind: DeleteDevEnvironmentErrorKind, 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: DeleteDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDevEnvironmentErrorKind::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,
DeleteDevEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDevEnvironmentErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDevEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDevEnvironmentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDevEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDevEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteDevEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDevEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteDevEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
DeleteDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
DeleteDevEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteDevEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
DeleteDevEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateDevEnvironmentError {
pub kind: UpdateDevEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateDevEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateDevEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateDevEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateDevEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateDevEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdateDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdateDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
UpdateDevEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateDevEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateDevEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateDevEnvironmentError {
fn code(&self) -> Option<&str> {
UpdateDevEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateDevEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateDevEnvironmentError {
pub fn new(kind: UpdateDevEnvironmentErrorKind, 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: UpdateDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateDevEnvironmentErrorKind::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,
UpdateDevEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDevEnvironmentErrorKind::ConflictException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDevEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDevEnvironmentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDevEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateDevEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateDevEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateDevEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateDevEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
UpdateDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdateDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
UpdateDevEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateDevEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
UpdateDevEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDevEnvironmentError {
pub kind: GetDevEnvironmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDevEnvironmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDevEnvironmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDevEnvironmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDevEnvironmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDevEnvironmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
GetDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
GetDevEnvironmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDevEnvironmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDevEnvironmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDevEnvironmentError {
fn code(&self) -> Option<&str> {
GetDevEnvironmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetDevEnvironmentErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetDevEnvironmentError {
pub fn new(kind: GetDevEnvironmentErrorKind, 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: GetDevEnvironmentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDevEnvironmentErrorKind::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,
GetDevEnvironmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, GetDevEnvironmentErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDevEnvironmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetDevEnvironmentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetDevEnvironmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetDevEnvironmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetDevEnvironmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDevEnvironmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDevEnvironmentErrorKind::ConflictException(_inner) => Some(_inner),
GetDevEnvironmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDevEnvironmentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
GetDevEnvironmentErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDevEnvironmentErrorKind::ValidationException(_inner) => Some(_inner),
GetDevEnvironmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEventLogsError {
pub kind: ListEventLogsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEventLogsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEventLogsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEventLogsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEventLogsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEventLogsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListEventLogsErrorKind::ConflictException(_inner) => _inner.fmt(f),
ListEventLogsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListEventLogsErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
ListEventLogsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListEventLogsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListEventLogsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEventLogsError {
fn code(&self) -> Option<&str> {
ListEventLogsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListEventLogsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListEventLogsError {
pub fn new(kind: ListEventLogsErrorKind, 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: ListEventLogsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEventLogsErrorKind::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, ListEventLogsErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, ListEventLogsErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListEventLogsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListEventLogsErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListEventLogsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListEventLogsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListEventLogsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEventLogsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListEventLogsErrorKind::ConflictException(_inner) => Some(_inner),
ListEventLogsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListEventLogsErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
ListEventLogsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListEventLogsErrorKind::ValidationException(_inner) => Some(_inner),
ListEventLogsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAccessTokensError {
pub kind: ListAccessTokensErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAccessTokensError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAccessTokensErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAccessTokensErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAccessTokensError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAccessTokensErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListAccessTokensErrorKind::ConflictException(_inner) => _inner.fmt(f),
ListAccessTokensErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListAccessTokensErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
ListAccessTokensErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListAccessTokensErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListAccessTokensErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAccessTokensError {
fn code(&self) -> Option<&str> {
ListAccessTokensError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListAccessTokensErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListAccessTokensError {
pub fn new(kind: ListAccessTokensErrorKind, 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: ListAccessTokensErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAccessTokensErrorKind::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,
ListAccessTokensErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, ListAccessTokensErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListAccessTokensErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ListAccessTokensErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListAccessTokensErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListAccessTokensErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListAccessTokensError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAccessTokensErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListAccessTokensErrorKind::ConflictException(_inner) => Some(_inner),
ListAccessTokensErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListAccessTokensErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
ListAccessTokensErrorKind::ThrottlingException(_inner) => Some(_inner),
ListAccessTokensErrorKind::ValidationException(_inner) => Some(_inner),
ListAccessTokensErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAccessTokenError {
pub kind: CreateAccessTokenErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAccessTokenError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAccessTokenErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAccessTokenErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAccessTokenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAccessTokenErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateAccessTokenErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateAccessTokenErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateAccessTokenErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateAccessTokenErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateAccessTokenErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateAccessTokenErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAccessTokenError {
fn code(&self) -> Option<&str> {
CreateAccessTokenError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateAccessTokenErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateAccessTokenError {
pub fn new(kind: CreateAccessTokenErrorKind, 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: CreateAccessTokenErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAccessTokenErrorKind::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,
CreateAccessTokenErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateAccessTokenErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccessTokenErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccessTokenErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccessTokenErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccessTokenErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateAccessTokenError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAccessTokenErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateAccessTokenErrorKind::ConflictException(_inner) => Some(_inner),
CreateAccessTokenErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateAccessTokenErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateAccessTokenErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateAccessTokenErrorKind::ValidationException(_inner) => Some(_inner),
CreateAccessTokenErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAccessTokenError {
pub kind: DeleteAccessTokenErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAccessTokenError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAccessTokenErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAccessTokenErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAccessTokenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAccessTokenErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteAccessTokenErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteAccessTokenErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteAccessTokenErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
DeleteAccessTokenErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteAccessTokenErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteAccessTokenErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAccessTokenError {
fn code(&self) -> Option<&str> {
DeleteAccessTokenError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
DeleteAccessTokenErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl DeleteAccessTokenError {
pub fn new(kind: DeleteAccessTokenErrorKind, 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: DeleteAccessTokenErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAccessTokenErrorKind::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,
DeleteAccessTokenErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteAccessTokenErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAccessTokenErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAccessTokenErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAccessTokenErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAccessTokenErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteAccessTokenError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAccessTokenErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteAccessTokenErrorKind::ConflictException(_inner) => Some(_inner),
DeleteAccessTokenErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteAccessTokenErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
DeleteAccessTokenErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteAccessTokenErrorKind::ValidationException(_inner) => Some(_inner),
DeleteAccessTokenErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct VerifySessionError {
pub kind: VerifySessionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for VerifySessionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: VerifySessionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum VerifySessionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for VerifySessionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
VerifySessionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
VerifySessionErrorKind::ConflictException(_inner) => _inner.fmt(f),
VerifySessionErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
VerifySessionErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
VerifySessionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
VerifySessionErrorKind::ValidationException(_inner) => _inner.fmt(f),
VerifySessionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for VerifySessionError {
fn code(&self) -> Option<&str> {
VerifySessionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
VerifySessionErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl VerifySessionError {
pub fn new(kind: VerifySessionErrorKind, 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: VerifySessionErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: VerifySessionErrorKind::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, VerifySessionErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, VerifySessionErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
VerifySessionErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
VerifySessionErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, VerifySessionErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, VerifySessionErrorKind::ValidationException(_))
}
}
impl std::error::Error for VerifySessionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
VerifySessionErrorKind::AccessDeniedException(_inner) => Some(_inner),
VerifySessionErrorKind::ConflictException(_inner) => Some(_inner),
VerifySessionErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
VerifySessionErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
VerifySessionErrorKind::ThrottlingException(_inner) => Some(_inner),
VerifySessionErrorKind::ValidationException(_inner) => Some(_inner),
VerifySessionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetUserDetailsError {
pub kind: GetUserDetailsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetUserDetailsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetUserDetailsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetUserDetailsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetUserDetailsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetUserDetailsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetUserDetailsErrorKind::ConflictException(_inner) => _inner.fmt(f),
GetUserDetailsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetUserDetailsErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
GetUserDetailsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetUserDetailsErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetUserDetailsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetUserDetailsError {
fn code(&self) -> Option<&str> {
GetUserDetailsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetUserDetailsErrorKind::ThrottlingException(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetUserDetailsError {
pub fn new(kind: GetUserDetailsErrorKind, 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: GetUserDetailsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetUserDetailsErrorKind::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,
GetUserDetailsErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, GetUserDetailsErrorKind::ConflictException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetUserDetailsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetUserDetailsErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetUserDetailsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetUserDetailsErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetUserDetailsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetUserDetailsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetUserDetailsErrorKind::ConflictException(_inner) => Some(_inner),
GetUserDetailsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetUserDetailsErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
GetUserDetailsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetUserDetailsErrorKind::ValidationException(_inner) => Some(_inner),
GetUserDetailsErrorKind::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 _)
}
}