#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdatePermissionSetError {
pub kind: UpdatePermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdatePermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdatePermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdatePermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdatePermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdatePermissionSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdatePermissionSetErrorKind::ConflictException(_inner) => _inner.fmt(f),
UpdatePermissionSetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdatePermissionSetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UpdatePermissionSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdatePermissionSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdatePermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdatePermissionSetError {
fn code(&self) -> Option<&str> {
UpdatePermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdatePermissionSetError {
pub fn new(kind: UpdatePermissionSetErrorKind, 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: UpdatePermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdatePermissionSetErrorKind::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,
UpdatePermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdatePermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdatePermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdatePermissionSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdatePermissionSetErrorKind::ConflictException(_inner) => Some(_inner),
UpdatePermissionSetErrorKind::InternalServerException(_inner) => Some(_inner),
UpdatePermissionSetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UpdatePermissionSetErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdatePermissionSetErrorKind::ValidationException(_inner) => Some(_inner),
UpdatePermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottlingException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct 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 UpdateInstanceAccessControlAttributeConfigurationError {
pub kind: UpdateInstanceAccessControlAttributeConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for UpdateInstanceAccessControlAttributeConfigurationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateInstanceAccessControlAttributeConfigurationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateInstanceAccessControlAttributeConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_inner) =>
_inner.fmt(f)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ConflictException(_inner) =>
_inner.fmt(f)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_inner) =>
_inner.fmt(f)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(_inner) =>
_inner.fmt(f)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_inner) =>
_inner.fmt(f)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_inner) =>
_inner.fmt(f)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for UpdateInstanceAccessControlAttributeConfigurationError
{
fn code(&self) -> Option<&str> {
UpdateInstanceAccessControlAttributeConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateInstanceAccessControlAttributeConfigurationError {
pub fn new(
kind: UpdateInstanceAccessControlAttributeConfigurationErrorKind,
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: UpdateInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateInstanceAccessControlAttributeConfigurationErrorKind::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,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(
_
)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateInstanceAccessControlAttributeConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_inner) =>
Some(_inner)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ConflictException(_inner) =>
Some(_inner)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_inner) =>
Some(_inner)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(_inner) =>
Some(_inner)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_inner) =>
Some(_inner)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_inner) =>
Some(_inner)
,
UpdateInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ConflictException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
UntagResourceErrorKind::ConflictException(_inner) => Some(_inner),
UntagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
UntagResourceErrorKind::ValidationException(_inner) => Some(_inner),
UntagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ConflictException(_inner) => _inner.fmt(f),
TagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::AccessDeniedException(_))
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
TagResourceErrorKind::ConflictException(_inner) => Some(_inner),
TagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
TagResourceErrorKind::ValidationException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
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_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
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::fmt::Debug)]
pub struct PutPermissionsBoundaryToPermissionSetError {
pub kind: PutPermissionsBoundaryToPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutPermissionsBoundaryToPermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutPermissionsBoundaryToPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutPermissionsBoundaryToPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutPermissionsBoundaryToPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutPermissionsBoundaryToPermissionSetErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
PutPermissionsBoundaryToPermissionSetErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
PutPermissionsBoundaryToPermissionSetErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
PutPermissionsBoundaryToPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
PutPermissionsBoundaryToPermissionSetErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
PutPermissionsBoundaryToPermissionSetErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
PutPermissionsBoundaryToPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutPermissionsBoundaryToPermissionSetError {
fn code(&self) -> Option<&str> {
PutPermissionsBoundaryToPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutPermissionsBoundaryToPermissionSetError {
pub fn new(
kind: PutPermissionsBoundaryToPermissionSetErrorKind,
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: PutPermissionsBoundaryToPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutPermissionsBoundaryToPermissionSetErrorKind::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,
PutPermissionsBoundaryToPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
PutPermissionsBoundaryToPermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutPermissionsBoundaryToPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutPermissionsBoundaryToPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutPermissionsBoundaryToPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutPermissionsBoundaryToPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutPermissionsBoundaryToPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutPermissionsBoundaryToPermissionSetErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
PutPermissionsBoundaryToPermissionSetErrorKind::ConflictException(_inner) => {
Some(_inner)
}
PutPermissionsBoundaryToPermissionSetErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
PutPermissionsBoundaryToPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
PutPermissionsBoundaryToPermissionSetErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
PutPermissionsBoundaryToPermissionSetErrorKind::ValidationException(_inner) => {
Some(_inner)
}
PutPermissionsBoundaryToPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutInlinePolicyToPermissionSetError {
pub kind: PutInlinePolicyToPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutInlinePolicyToPermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutInlinePolicyToPermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutInlinePolicyToPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutInlinePolicyToPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutInlinePolicyToPermissionSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutInlinePolicyToPermissionSetErrorKind::ConflictException(_inner) => _inner.fmt(f),
PutInlinePolicyToPermissionSetErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
PutInlinePolicyToPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
PutInlinePolicyToPermissionSetErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
PutInlinePolicyToPermissionSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutInlinePolicyToPermissionSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
PutInlinePolicyToPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutInlinePolicyToPermissionSetError {
fn code(&self) -> Option<&str> {
PutInlinePolicyToPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutInlinePolicyToPermissionSetError {
pub fn new(
kind: PutInlinePolicyToPermissionSetErrorKind,
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: PutInlinePolicyToPermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutInlinePolicyToPermissionSetErrorKind::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,
PutInlinePolicyToPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
PutInlinePolicyToPermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutInlinePolicyToPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutInlinePolicyToPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutInlinePolicyToPermissionSetErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutInlinePolicyToPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
PutInlinePolicyToPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for PutInlinePolicyToPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutInlinePolicyToPermissionSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutInlinePolicyToPermissionSetErrorKind::ConflictException(_inner) => Some(_inner),
PutInlinePolicyToPermissionSetErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
PutInlinePolicyToPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
PutInlinePolicyToPermissionSetErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
PutInlinePolicyToPermissionSetErrorKind::ThrottlingException(_inner) => Some(_inner),
PutInlinePolicyToPermissionSetErrorKind::ValidationException(_inner) => Some(_inner),
PutInlinePolicyToPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ProvisionPermissionSetError {
pub kind: ProvisionPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ProvisionPermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ProvisionPermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ProvisionPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ProvisionPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ProvisionPermissionSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ProvisionPermissionSetErrorKind::ConflictException(_inner) => _inner.fmt(f),
ProvisionPermissionSetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ProvisionPermissionSetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ProvisionPermissionSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ProvisionPermissionSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
ProvisionPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ProvisionPermissionSetError {
fn code(&self) -> Option<&str> {
ProvisionPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ProvisionPermissionSetError {
pub fn new(kind: ProvisionPermissionSetErrorKind, 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: ProvisionPermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ProvisionPermissionSetErrorKind::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,
ProvisionPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ProvisionPermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ProvisionPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ProvisionPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ProvisionPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ProvisionPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ProvisionPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ProvisionPermissionSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
ProvisionPermissionSetErrorKind::ConflictException(_inner) => Some(_inner),
ProvisionPermissionSetErrorKind::InternalServerException(_inner) => Some(_inner),
ProvisionPermissionSetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ProvisionPermissionSetErrorKind::ThrottlingException(_inner) => Some(_inner),
ProvisionPermissionSetErrorKind::ValidationException(_inner) => Some(_inner),
ProvisionPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::InternalServerException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottlingException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ValidationException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPermissionSetsProvisionedToAccountError {
pub kind: ListPermissionSetsProvisionedToAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPermissionSetsProvisionedToAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPermissionSetsProvisionedToAccountErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPermissionSetsProvisionedToAccountErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPermissionSetsProvisionedToAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPermissionSetsProvisionedToAccountErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetsProvisionedToAccountErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetsProvisionedToAccountErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetsProvisionedToAccountErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetsProvisionedToAccountErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetsProvisionedToAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPermissionSetsProvisionedToAccountError {
fn code(&self) -> Option<&str> {
ListPermissionSetsProvisionedToAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListPermissionSetsProvisionedToAccountError {
pub fn new(
kind: ListPermissionSetsProvisionedToAccountErrorKind,
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: ListPermissionSetsProvisionedToAccountErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPermissionSetsProvisionedToAccountErrorKind::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,
ListPermissionSetsProvisionedToAccountErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetsProvisionedToAccountErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetsProvisionedToAccountErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetsProvisionedToAccountErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetsProvisionedToAccountErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListPermissionSetsProvisionedToAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPermissionSetsProvisionedToAccountErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListPermissionSetsProvisionedToAccountErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListPermissionSetsProvisionedToAccountErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListPermissionSetsProvisionedToAccountErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListPermissionSetsProvisionedToAccountErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListPermissionSetsProvisionedToAccountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPermissionSetsError {
pub kind: ListPermissionSetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPermissionSetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPermissionSetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPermissionSetsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPermissionSetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPermissionSetsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListPermissionSetsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListPermissionSetsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListPermissionSetsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListPermissionSetsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListPermissionSetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPermissionSetsError {
fn code(&self) -> Option<&str> {
ListPermissionSetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListPermissionSetsError {
pub fn new(kind: ListPermissionSetsErrorKind, 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: ListPermissionSetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPermissionSetsErrorKind::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,
ListPermissionSetsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListPermissionSetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPermissionSetsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListPermissionSetsErrorKind::InternalServerException(_inner) => Some(_inner),
ListPermissionSetsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListPermissionSetsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListPermissionSetsErrorKind::ValidationException(_inner) => Some(_inner),
ListPermissionSetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListPermissionSetProvisioningStatusError {
pub kind: ListPermissionSetProvisioningStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListPermissionSetProvisioningStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListPermissionSetProvisioningStatusErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListPermissionSetProvisioningStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListPermissionSetProvisioningStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListPermissionSetProvisioningStatusErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetProvisioningStatusErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetProvisioningStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetProvisioningStatusErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetProvisioningStatusErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListPermissionSetProvisioningStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListPermissionSetProvisioningStatusError {
fn code(&self) -> Option<&str> {
ListPermissionSetProvisioningStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListPermissionSetProvisioningStatusError {
pub fn new(
kind: ListPermissionSetProvisioningStatusErrorKind,
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: ListPermissionSetProvisioningStatusErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListPermissionSetProvisioningStatusErrorKind::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,
ListPermissionSetProvisioningStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetProvisioningStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetProvisioningStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetProvisioningStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListPermissionSetProvisioningStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListPermissionSetProvisioningStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListPermissionSetProvisioningStatusErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListPermissionSetProvisioningStatusErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListPermissionSetProvisioningStatusErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListPermissionSetProvisioningStatusErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListPermissionSetProvisioningStatusErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListPermissionSetProvisioningStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListManagedPoliciesInPermissionSetError {
pub kind: ListManagedPoliciesInPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListManagedPoliciesInPermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListManagedPoliciesInPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListManagedPoliciesInPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListManagedPoliciesInPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListManagedPoliciesInPermissionSetErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListManagedPoliciesInPermissionSetErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListManagedPoliciesInPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListManagedPoliciesInPermissionSetErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListManagedPoliciesInPermissionSetErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListManagedPoliciesInPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListManagedPoliciesInPermissionSetError {
fn code(&self) -> Option<&str> {
ListManagedPoliciesInPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListManagedPoliciesInPermissionSetError {
pub fn new(
kind: ListManagedPoliciesInPermissionSetErrorKind,
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: ListManagedPoliciesInPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListManagedPoliciesInPermissionSetErrorKind::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,
ListManagedPoliciesInPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListManagedPoliciesInPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListManagedPoliciesInPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListManagedPoliciesInPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListManagedPoliciesInPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListManagedPoliciesInPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListManagedPoliciesInPermissionSetErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListManagedPoliciesInPermissionSetErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListManagedPoliciesInPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListManagedPoliciesInPermissionSetErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListManagedPoliciesInPermissionSetErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListManagedPoliciesInPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListInstancesError {
pub kind: ListInstancesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListInstancesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListInstancesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListInstancesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListInstancesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListInstancesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListInstancesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListInstancesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListInstancesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListInstancesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListInstancesError {
fn code(&self) -> Option<&str> {
ListInstancesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListInstancesError {
pub fn new(kind: ListInstancesErrorKind, 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: ListInstancesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListInstancesErrorKind::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, ListInstancesErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListInstancesErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListInstancesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListInstancesErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListInstancesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListInstancesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListInstancesErrorKind::InternalServerException(_inner) => Some(_inner),
ListInstancesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListInstancesErrorKind::ValidationException(_inner) => Some(_inner),
ListInstancesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCustomerManagedPolicyReferencesInPermissionSetError {
pub kind: ListCustomerManagedPolicyReferencesInPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for ListCustomerManagedPolicyReferencesInPermissionSetError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCustomerManagedPolicyReferencesInPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCustomerManagedPolicyReferencesInPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::AccessDeniedException(_inner) =>
_inner.fmt(f)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::InternalServerException(_inner) =>
_inner.fmt(f)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::ResourceNotFoundException(_inner) =>
_inner.fmt(f)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::ThrottlingException(_inner) =>
_inner.fmt(f)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::ValidationException(_inner) =>
_inner.fmt(f)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for ListCustomerManagedPolicyReferencesInPermissionSetError
{
fn code(&self) -> Option<&str> {
ListCustomerManagedPolicyReferencesInPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCustomerManagedPolicyReferencesInPermissionSetError {
pub fn new(
kind: ListCustomerManagedPolicyReferencesInPermissionSetErrorKind,
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: ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::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,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::ResourceNotFoundException(
_
)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListCustomerManagedPolicyReferencesInPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::AccessDeniedException(_inner) =>
Some(_inner)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::InternalServerException(_inner) =>
Some(_inner)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::ResourceNotFoundException(_inner) =>
Some(_inner)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::ThrottlingException(_inner) =>
Some(_inner)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::ValidationException(_inner) =>
Some(_inner)
,
ListCustomerManagedPolicyReferencesInPermissionSetErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAccountsForProvisionedPermissionSetError {
pub kind: ListAccountsForProvisionedPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for ListAccountsForProvisionedPermissionSetError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAccountsForProvisionedPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAccountsForProvisionedPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAccountsForProvisionedPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAccountsForProvisionedPermissionSetErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListAccountsForProvisionedPermissionSetErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListAccountsForProvisionedPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListAccountsForProvisionedPermissionSetErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListAccountsForProvisionedPermissionSetErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListAccountsForProvisionedPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAccountsForProvisionedPermissionSetError {
fn code(&self) -> Option<&str> {
ListAccountsForProvisionedPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAccountsForProvisionedPermissionSetError {
pub fn new(
kind: ListAccountsForProvisionedPermissionSetErrorKind,
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: ListAccountsForProvisionedPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAccountsForProvisionedPermissionSetErrorKind::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,
ListAccountsForProvisionedPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountsForProvisionedPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountsForProvisionedPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountsForProvisionedPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountsForProvisionedPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListAccountsForProvisionedPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAccountsForProvisionedPermissionSetErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListAccountsForProvisionedPermissionSetErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListAccountsForProvisionedPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListAccountsForProvisionedPermissionSetErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListAccountsForProvisionedPermissionSetErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListAccountsForProvisionedPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAccountAssignmentsError {
pub kind: ListAccountAssignmentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAccountAssignmentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAccountAssignmentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAccountAssignmentsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAccountAssignmentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAccountAssignmentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListAccountAssignmentsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListAccountAssignmentsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListAccountAssignmentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListAccountAssignmentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListAccountAssignmentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAccountAssignmentsError {
fn code(&self) -> Option<&str> {
ListAccountAssignmentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAccountAssignmentsError {
pub fn new(kind: ListAccountAssignmentsErrorKind, 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: ListAccountAssignmentsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAccountAssignmentsErrorKind::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,
ListAccountAssignmentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListAccountAssignmentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAccountAssignmentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListAccountAssignmentsErrorKind::InternalServerException(_inner) => Some(_inner),
ListAccountAssignmentsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListAccountAssignmentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListAccountAssignmentsErrorKind::ValidationException(_inner) => Some(_inner),
ListAccountAssignmentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAccountAssignmentDeletionStatusError {
pub kind: ListAccountAssignmentDeletionStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAccountAssignmentDeletionStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAccountAssignmentDeletionStatusErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAccountAssignmentDeletionStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAccountAssignmentDeletionStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAccountAssignmentDeletionStatusErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentDeletionStatusErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentDeletionStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentDeletionStatusErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentDeletionStatusErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentDeletionStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAccountAssignmentDeletionStatusError {
fn code(&self) -> Option<&str> {
ListAccountAssignmentDeletionStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAccountAssignmentDeletionStatusError {
pub fn new(
kind: ListAccountAssignmentDeletionStatusErrorKind,
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: ListAccountAssignmentDeletionStatusErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAccountAssignmentDeletionStatusErrorKind::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,
ListAccountAssignmentDeletionStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentDeletionStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentDeletionStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentDeletionStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentDeletionStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListAccountAssignmentDeletionStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAccountAssignmentDeletionStatusErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListAccountAssignmentDeletionStatusErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListAccountAssignmentDeletionStatusErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListAccountAssignmentDeletionStatusErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListAccountAssignmentDeletionStatusErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListAccountAssignmentDeletionStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListAccountAssignmentCreationStatusError {
pub kind: ListAccountAssignmentCreationStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListAccountAssignmentCreationStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListAccountAssignmentCreationStatusErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListAccountAssignmentCreationStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListAccountAssignmentCreationStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListAccountAssignmentCreationStatusErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentCreationStatusErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentCreationStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentCreationStatusErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentCreationStatusErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListAccountAssignmentCreationStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListAccountAssignmentCreationStatusError {
fn code(&self) -> Option<&str> {
ListAccountAssignmentCreationStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListAccountAssignmentCreationStatusError {
pub fn new(
kind: ListAccountAssignmentCreationStatusErrorKind,
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: ListAccountAssignmentCreationStatusErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListAccountAssignmentCreationStatusErrorKind::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,
ListAccountAssignmentCreationStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentCreationStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentCreationStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentCreationStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListAccountAssignmentCreationStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListAccountAssignmentCreationStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListAccountAssignmentCreationStatusErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListAccountAssignmentCreationStatusErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListAccountAssignmentCreationStatusErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
ListAccountAssignmentCreationStatusErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListAccountAssignmentCreationStatusErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListAccountAssignmentCreationStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetPermissionsBoundaryForPermissionSetError {
pub kind: GetPermissionsBoundaryForPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetPermissionsBoundaryForPermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetPermissionsBoundaryForPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetPermissionsBoundaryForPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetPermissionsBoundaryForPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetPermissionsBoundaryForPermissionSetErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetPermissionsBoundaryForPermissionSetErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetPermissionsBoundaryForPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetPermissionsBoundaryForPermissionSetErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
GetPermissionsBoundaryForPermissionSetErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
GetPermissionsBoundaryForPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetPermissionsBoundaryForPermissionSetError {
fn code(&self) -> Option<&str> {
GetPermissionsBoundaryForPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetPermissionsBoundaryForPermissionSetError {
pub fn new(
kind: GetPermissionsBoundaryForPermissionSetErrorKind,
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: GetPermissionsBoundaryForPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetPermissionsBoundaryForPermissionSetErrorKind::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,
GetPermissionsBoundaryForPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetPermissionsBoundaryForPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetPermissionsBoundaryForPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetPermissionsBoundaryForPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetPermissionsBoundaryForPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetPermissionsBoundaryForPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetPermissionsBoundaryForPermissionSetErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
GetPermissionsBoundaryForPermissionSetErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetPermissionsBoundaryForPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetPermissionsBoundaryForPermissionSetErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
GetPermissionsBoundaryForPermissionSetErrorKind::ValidationException(_inner) => {
Some(_inner)
}
GetPermissionsBoundaryForPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetInlinePolicyForPermissionSetError {
pub kind: GetInlinePolicyForPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetInlinePolicyForPermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetInlinePolicyForPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetInlinePolicyForPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetInlinePolicyForPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetInlinePolicyForPermissionSetErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetInlinePolicyForPermissionSetErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetInlinePolicyForPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetInlinePolicyForPermissionSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetInlinePolicyForPermissionSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetInlinePolicyForPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetInlinePolicyForPermissionSetError {
fn code(&self) -> Option<&str> {
GetInlinePolicyForPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetInlinePolicyForPermissionSetError {
pub fn new(
kind: GetInlinePolicyForPermissionSetErrorKind,
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: GetInlinePolicyForPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetInlinePolicyForPermissionSetErrorKind::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,
GetInlinePolicyForPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetInlinePolicyForPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetInlinePolicyForPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetInlinePolicyForPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetInlinePolicyForPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetInlinePolicyForPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetInlinePolicyForPermissionSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetInlinePolicyForPermissionSetErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetInlinePolicyForPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetInlinePolicyForPermissionSetErrorKind::ThrottlingException(_inner) => Some(_inner),
GetInlinePolicyForPermissionSetErrorKind::ValidationException(_inner) => Some(_inner),
GetInlinePolicyForPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DetachManagedPolicyFromPermissionSetError {
pub kind: DetachManagedPolicyFromPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DetachManagedPolicyFromPermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DetachManagedPolicyFromPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DetachManagedPolicyFromPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DetachManagedPolicyFromPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DetachManagedPolicyFromPermissionSetErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DetachManagedPolicyFromPermissionSetErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
DetachManagedPolicyFromPermissionSetErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DetachManagedPolicyFromPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DetachManagedPolicyFromPermissionSetErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DetachManagedPolicyFromPermissionSetErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DetachManagedPolicyFromPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DetachManagedPolicyFromPermissionSetError {
fn code(&self) -> Option<&str> {
DetachManagedPolicyFromPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DetachManagedPolicyFromPermissionSetError {
pub fn new(
kind: DetachManagedPolicyFromPermissionSetErrorKind,
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: DetachManagedPolicyFromPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DetachManagedPolicyFromPermissionSetErrorKind::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,
DetachManagedPolicyFromPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DetachManagedPolicyFromPermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DetachManagedPolicyFromPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DetachManagedPolicyFromPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DetachManagedPolicyFromPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DetachManagedPolicyFromPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DetachManagedPolicyFromPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DetachManagedPolicyFromPermissionSetErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DetachManagedPolicyFromPermissionSetErrorKind::ConflictException(_inner) => {
Some(_inner)
}
DetachManagedPolicyFromPermissionSetErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DetachManagedPolicyFromPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DetachManagedPolicyFromPermissionSetErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DetachManagedPolicyFromPermissionSetErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DetachManagedPolicyFromPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DetachCustomerManagedPolicyReferenceFromPermissionSetError {
pub kind: DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DetachCustomerManagedPolicyReferenceFromPermissionSetError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DetachCustomerManagedPolicyReferenceFromPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::AccessDeniedException(_inner) =>
_inner.fmt(f)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ConflictException(_inner) =>
_inner.fmt(f)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::InternalServerException(_inner) =>
_inner.fmt(f)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ResourceNotFoundException(_inner) =>
_inner.fmt(f)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ThrottlingException(_inner) =>
_inner.fmt(f)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ValidationException(_inner) =>
_inner.fmt(f)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for DetachCustomerManagedPolicyReferenceFromPermissionSetError
{
fn code(&self) -> Option<&str> {
DetachCustomerManagedPolicyReferenceFromPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DetachCustomerManagedPolicyReferenceFromPermissionSetError {
pub fn new(
kind: DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind,
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: DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::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,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::AccessDeniedException(
_
)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::InternalServerException(
_
)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(&self.kind, DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ResourceNotFoundException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DetachCustomerManagedPolicyReferenceFromPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::AccessDeniedException(_inner) =>
Some(_inner)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ConflictException(_inner) =>
Some(_inner)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::InternalServerException(_inner) =>
Some(_inner)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ResourceNotFoundException(_inner) =>
Some(_inner)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ThrottlingException(_inner) =>
Some(_inner)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::ValidationException(_inner) =>
Some(_inner)
,
DetachCustomerManagedPolicyReferenceFromPermissionSetErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribePermissionSetProvisioningStatusError {
pub kind: DescribePermissionSetProvisioningStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribePermissionSetProvisioningStatusError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribePermissionSetProvisioningStatusErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribePermissionSetProvisioningStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribePermissionSetProvisioningStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribePermissionSetProvisioningStatusErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribePermissionSetProvisioningStatusErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DescribePermissionSetProvisioningStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribePermissionSetProvisioningStatusErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DescribePermissionSetProvisioningStatusErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DescribePermissionSetProvisioningStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribePermissionSetProvisioningStatusError {
fn code(&self) -> Option<&str> {
DescribePermissionSetProvisioningStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribePermissionSetProvisioningStatusError {
pub fn new(
kind: DescribePermissionSetProvisioningStatusErrorKind,
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: DescribePermissionSetProvisioningStatusErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribePermissionSetProvisioningStatusErrorKind::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,
DescribePermissionSetProvisioningStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribePermissionSetProvisioningStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribePermissionSetProvisioningStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribePermissionSetProvisioningStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribePermissionSetProvisioningStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribePermissionSetProvisioningStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribePermissionSetProvisioningStatusErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribePermissionSetProvisioningStatusErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DescribePermissionSetProvisioningStatusErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribePermissionSetProvisioningStatusErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DescribePermissionSetProvisioningStatusErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DescribePermissionSetProvisioningStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribePermissionSetError {
pub kind: DescribePermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribePermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribePermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribePermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribePermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribePermissionSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribePermissionSetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribePermissionSetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribePermissionSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribePermissionSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribePermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribePermissionSetError {
fn code(&self) -> Option<&str> {
DescribePermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribePermissionSetError {
pub fn new(kind: DescribePermissionSetErrorKind, 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: DescribePermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribePermissionSetErrorKind::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,
DescribePermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribePermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribePermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribePermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribePermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribePermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribePermissionSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribePermissionSetErrorKind::InternalServerException(_inner) => Some(_inner),
DescribePermissionSetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribePermissionSetErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribePermissionSetErrorKind::ValidationException(_inner) => Some(_inner),
DescribePermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeInstanceAccessControlAttributeConfigurationError {
pub kind: DescribeInstanceAccessControlAttributeConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribeInstanceAccessControlAttributeConfigurationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeInstanceAccessControlAttributeConfigurationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeInstanceAccessControlAttributeConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_inner) =>
_inner.fmt(f)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_inner) =>
_inner.fmt(f)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(_inner) =>
_inner.fmt(f)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_inner) =>
_inner.fmt(f)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_inner) =>
_inner.fmt(f)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for DescribeInstanceAccessControlAttributeConfigurationError
{
fn code(&self) -> Option<&str> {
DescribeInstanceAccessControlAttributeConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeInstanceAccessControlAttributeConfigurationError {
pub fn new(
kind: DescribeInstanceAccessControlAttributeConfigurationErrorKind,
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: DescribeInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeInstanceAccessControlAttributeConfigurationErrorKind::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,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(
_
)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(
_
)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeInstanceAccessControlAttributeConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_inner) =>
Some(_inner)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_inner) =>
Some(_inner)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(_inner) =>
Some(_inner)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_inner) =>
Some(_inner)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_inner) =>
Some(_inner)
,
DescribeInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAccountAssignmentDeletionStatusError {
pub kind: DescribeAccountAssignmentDeletionStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribeAccountAssignmentDeletionStatusError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAccountAssignmentDeletionStatusErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAccountAssignmentDeletionStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAccountAssignmentDeletionStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAccountAssignmentDeletionStatusErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentDeletionStatusErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentDeletionStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentDeletionStatusErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentDeletionStatusErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentDeletionStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAccountAssignmentDeletionStatusError {
fn code(&self) -> Option<&str> {
DescribeAccountAssignmentDeletionStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAccountAssignmentDeletionStatusError {
pub fn new(
kind: DescribeAccountAssignmentDeletionStatusErrorKind,
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: DescribeAccountAssignmentDeletionStatusErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAccountAssignmentDeletionStatusErrorKind::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,
DescribeAccountAssignmentDeletionStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAssignmentDeletionStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAssignmentDeletionStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAssignmentDeletionStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAssignmentDeletionStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeAccountAssignmentDeletionStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAccountAssignmentDeletionStatusErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentDeletionStatusErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentDeletionStatusErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentDeletionStatusErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentDeletionStatusErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentDeletionStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeAccountAssignmentCreationStatusError {
pub kind: DescribeAccountAssignmentCreationStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DescribeAccountAssignmentCreationStatusError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeAccountAssignmentCreationStatusErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeAccountAssignmentCreationStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeAccountAssignmentCreationStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeAccountAssignmentCreationStatusErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentCreationStatusErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentCreationStatusErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentCreationStatusErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentCreationStatusErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DescribeAccountAssignmentCreationStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeAccountAssignmentCreationStatusError {
fn code(&self) -> Option<&str> {
DescribeAccountAssignmentCreationStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeAccountAssignmentCreationStatusError {
pub fn new(
kind: DescribeAccountAssignmentCreationStatusErrorKind,
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: DescribeAccountAssignmentCreationStatusErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeAccountAssignmentCreationStatusErrorKind::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,
DescribeAccountAssignmentCreationStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAssignmentCreationStatusErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAssignmentCreationStatusErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAssignmentCreationStatusErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeAccountAssignmentCreationStatusErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeAccountAssignmentCreationStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeAccountAssignmentCreationStatusErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentCreationStatusErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentCreationStatusErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentCreationStatusErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentCreationStatusErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DescribeAccountAssignmentCreationStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePermissionSetError {
pub kind: DeletePermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeletePermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePermissionSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeletePermissionSetErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeletePermissionSetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeletePermissionSetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeletePermissionSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeletePermissionSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeletePermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePermissionSetError {
fn code(&self) -> Option<&str> {
DeletePermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeletePermissionSetError {
pub fn new(kind: DeletePermissionSetErrorKind, 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: DeletePermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePermissionSetErrorKind::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,
DeletePermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeletePermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeletePermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeletePermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeletePermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeletePermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeletePermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePermissionSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeletePermissionSetErrorKind::ConflictException(_inner) => Some(_inner),
DeletePermissionSetErrorKind::InternalServerException(_inner) => Some(_inner),
DeletePermissionSetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeletePermissionSetErrorKind::ThrottlingException(_inner) => Some(_inner),
DeletePermissionSetErrorKind::ValidationException(_inner) => Some(_inner),
DeletePermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeletePermissionsBoundaryFromPermissionSetError {
pub kind: DeletePermissionsBoundaryFromPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DeletePermissionsBoundaryFromPermissionSetError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeletePermissionsBoundaryFromPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeletePermissionsBoundaryFromPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeletePermissionsBoundaryFromPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeletePermissionsBoundaryFromPermissionSetErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DeletePermissionsBoundaryFromPermissionSetErrorKind::InternalServerException(
_inner,
) => _inner.fmt(f),
DeletePermissionsBoundaryFromPermissionSetErrorKind::ResourceNotFoundException(
_inner,
) => _inner.fmt(f),
DeletePermissionsBoundaryFromPermissionSetErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DeletePermissionsBoundaryFromPermissionSetErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DeletePermissionsBoundaryFromPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeletePermissionsBoundaryFromPermissionSetError {
fn code(&self) -> Option<&str> {
DeletePermissionsBoundaryFromPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeletePermissionsBoundaryFromPermissionSetError {
pub fn new(
kind: DeletePermissionsBoundaryFromPermissionSetErrorKind,
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: DeletePermissionsBoundaryFromPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeletePermissionsBoundaryFromPermissionSetErrorKind::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,
DeletePermissionsBoundaryFromPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeletePermissionsBoundaryFromPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeletePermissionsBoundaryFromPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeletePermissionsBoundaryFromPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeletePermissionsBoundaryFromPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeletePermissionsBoundaryFromPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeletePermissionsBoundaryFromPermissionSetErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DeletePermissionsBoundaryFromPermissionSetErrorKind::InternalServerException(
_inner,
) => Some(_inner),
DeletePermissionsBoundaryFromPermissionSetErrorKind::ResourceNotFoundException(
_inner,
) => Some(_inner),
DeletePermissionsBoundaryFromPermissionSetErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DeletePermissionsBoundaryFromPermissionSetErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DeletePermissionsBoundaryFromPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteInstanceAccessControlAttributeConfigurationError {
pub kind: DeleteInstanceAccessControlAttributeConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for DeleteInstanceAccessControlAttributeConfigurationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteInstanceAccessControlAttributeConfigurationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteInstanceAccessControlAttributeConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_inner) =>
_inner.fmt(f)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ConflictException(_inner) =>
_inner.fmt(f)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_inner) =>
_inner.fmt(f)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(_inner) =>
_inner.fmt(f)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_inner) =>
_inner.fmt(f)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_inner) =>
_inner.fmt(f)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for DeleteInstanceAccessControlAttributeConfigurationError
{
fn code(&self) -> Option<&str> {
DeleteInstanceAccessControlAttributeConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteInstanceAccessControlAttributeConfigurationError {
pub fn new(
kind: DeleteInstanceAccessControlAttributeConfigurationErrorKind,
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: DeleteInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteInstanceAccessControlAttributeConfigurationErrorKind::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,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(
_
)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteInstanceAccessControlAttributeConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_inner) =>
Some(_inner)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ConflictException(_inner) =>
Some(_inner)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_inner) =>
Some(_inner)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(_inner) =>
Some(_inner)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_inner) =>
Some(_inner)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_inner) =>
Some(_inner)
,
DeleteInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteInlinePolicyFromPermissionSetError {
pub kind: DeleteInlinePolicyFromPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteInlinePolicyFromPermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteInlinePolicyFromPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteInlinePolicyFromPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteInlinePolicyFromPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteInlinePolicyFromPermissionSetErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DeleteInlinePolicyFromPermissionSetErrorKind::ConflictException(_inner) => {
_inner.fmt(f)
}
DeleteInlinePolicyFromPermissionSetErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DeleteInlinePolicyFromPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteInlinePolicyFromPermissionSetErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
DeleteInlinePolicyFromPermissionSetErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
DeleteInlinePolicyFromPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteInlinePolicyFromPermissionSetError {
fn code(&self) -> Option<&str> {
DeleteInlinePolicyFromPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteInlinePolicyFromPermissionSetError {
pub fn new(
kind: DeleteInlinePolicyFromPermissionSetErrorKind,
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: DeleteInlinePolicyFromPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteInlinePolicyFromPermissionSetErrorKind::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,
DeleteInlinePolicyFromPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInlinePolicyFromPermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInlinePolicyFromPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInlinePolicyFromPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInlinePolicyFromPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteInlinePolicyFromPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteInlinePolicyFromPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteInlinePolicyFromPermissionSetErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DeleteInlinePolicyFromPermissionSetErrorKind::ConflictException(_inner) => Some(_inner),
DeleteInlinePolicyFromPermissionSetErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DeleteInlinePolicyFromPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteInlinePolicyFromPermissionSetErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
DeleteInlinePolicyFromPermissionSetErrorKind::ValidationException(_inner) => {
Some(_inner)
}
DeleteInlinePolicyFromPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteAccountAssignmentError {
pub kind: DeleteAccountAssignmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteAccountAssignmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteAccountAssignmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteAccountAssignmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteAccountAssignmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteAccountAssignmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteAccountAssignmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteAccountAssignmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteAccountAssignmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteAccountAssignmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteAccountAssignmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteAccountAssignmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteAccountAssignmentError {
fn code(&self) -> Option<&str> {
DeleteAccountAssignmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteAccountAssignmentError {
pub fn new(kind: DeleteAccountAssignmentErrorKind, 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: DeleteAccountAssignmentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteAccountAssignmentErrorKind::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,
DeleteAccountAssignmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAccountAssignmentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAccountAssignmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAccountAssignmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAccountAssignmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteAccountAssignmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteAccountAssignmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteAccountAssignmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteAccountAssignmentErrorKind::ConflictException(_inner) => Some(_inner),
DeleteAccountAssignmentErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteAccountAssignmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteAccountAssignmentErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteAccountAssignmentErrorKind::ValidationException(_inner) => Some(_inner),
DeleteAccountAssignmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePermissionSetError {
pub kind: CreatePermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreatePermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreatePermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreatePermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePermissionSetErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreatePermissionSetErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreatePermissionSetErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreatePermissionSetErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreatePermissionSetErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreatePermissionSetErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreatePermissionSetErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreatePermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePermissionSetError {
fn code(&self) -> Option<&str> {
CreatePermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreatePermissionSetError {
pub fn new(kind: CreatePermissionSetErrorKind, 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: CreatePermissionSetErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePermissionSetErrorKind::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,
CreatePermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreatePermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreatePermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreatePermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreatePermissionSetErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreatePermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreatePermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreatePermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePermissionSetErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreatePermissionSetErrorKind::ConflictException(_inner) => Some(_inner),
CreatePermissionSetErrorKind::InternalServerException(_inner) => Some(_inner),
CreatePermissionSetErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreatePermissionSetErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreatePermissionSetErrorKind::ThrottlingException(_inner) => Some(_inner),
CreatePermissionSetErrorKind::ValidationException(_inner) => Some(_inner),
CreatePermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateInstanceAccessControlAttributeConfigurationError {
pub kind: CreateInstanceAccessControlAttributeConfigurationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for CreateInstanceAccessControlAttributeConfigurationError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateInstanceAccessControlAttributeConfigurationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateInstanceAccessControlAttributeConfigurationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_inner) =>
_inner.fmt(f)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ConflictException(_inner) =>
_inner.fmt(f)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_inner) =>
_inner.fmt(f)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(_inner) =>
_inner.fmt(f)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_inner) =>
_inner.fmt(f)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_inner) =>
_inner.fmt(f)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for CreateInstanceAccessControlAttributeConfigurationError
{
fn code(&self) -> Option<&str> {
CreateInstanceAccessControlAttributeConfigurationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateInstanceAccessControlAttributeConfigurationError {
pub fn new(
kind: CreateInstanceAccessControlAttributeConfigurationErrorKind,
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: CreateInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateInstanceAccessControlAttributeConfigurationErrorKind::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,
CreateInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(
_
)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateInstanceAccessControlAttributeConfigurationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateInstanceAccessControlAttributeConfigurationErrorKind::AccessDeniedException(_inner) =>
Some(_inner)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ConflictException(_inner) =>
Some(_inner)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::InternalServerException(_inner) =>
Some(_inner)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ResourceNotFoundException(_inner) =>
Some(_inner)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ThrottlingException(_inner) =>
Some(_inner)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::ValidationException(_inner) =>
Some(_inner)
,
CreateInstanceAccessControlAttributeConfigurationErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateAccountAssignmentError {
pub kind: CreateAccountAssignmentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateAccountAssignmentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateAccountAssignmentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateAccountAssignmentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateAccountAssignmentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateAccountAssignmentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateAccountAssignmentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateAccountAssignmentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateAccountAssignmentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateAccountAssignmentErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
CreateAccountAssignmentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateAccountAssignmentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateAccountAssignmentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateAccountAssignmentError {
fn code(&self) -> Option<&str> {
CreateAccountAssignmentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateAccountAssignmentError {
pub fn new(kind: CreateAccountAssignmentErrorKind, 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: CreateAccountAssignmentErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateAccountAssignmentErrorKind::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,
CreateAccountAssignmentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccountAssignmentErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccountAssignmentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccountAssignmentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccountAssignmentErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccountAssignmentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateAccountAssignmentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateAccountAssignmentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateAccountAssignmentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateAccountAssignmentErrorKind::ConflictException(_inner) => Some(_inner),
CreateAccountAssignmentErrorKind::InternalServerException(_inner) => Some(_inner),
CreateAccountAssignmentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateAccountAssignmentErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateAccountAssignmentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateAccountAssignmentErrorKind::ValidationException(_inner) => Some(_inner),
CreateAccountAssignmentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AttachManagedPolicyToPermissionSetError {
pub kind: AttachManagedPolicyToPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AttachManagedPolicyToPermissionSetError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AttachManagedPolicyToPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AttachManagedPolicyToPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AttachManagedPolicyToPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AttachManagedPolicyToPermissionSetErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
AttachManagedPolicyToPermissionSetErrorKind::ConflictException(_inner) => _inner.fmt(f),
AttachManagedPolicyToPermissionSetErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
AttachManagedPolicyToPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
AttachManagedPolicyToPermissionSetErrorKind::ServiceQuotaExceededException(_inner) => {
_inner.fmt(f)
}
AttachManagedPolicyToPermissionSetErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
AttachManagedPolicyToPermissionSetErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
AttachManagedPolicyToPermissionSetErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AttachManagedPolicyToPermissionSetError {
fn code(&self) -> Option<&str> {
AttachManagedPolicyToPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AttachManagedPolicyToPermissionSetError {
pub fn new(
kind: AttachManagedPolicyToPermissionSetErrorKind,
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: AttachManagedPolicyToPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AttachManagedPolicyToPermissionSetErrorKind::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,
AttachManagedPolicyToPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AttachManagedPolicyToPermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AttachManagedPolicyToPermissionSetErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AttachManagedPolicyToPermissionSetErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
AttachManagedPolicyToPermissionSetErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AttachManagedPolicyToPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AttachManagedPolicyToPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AttachManagedPolicyToPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AttachManagedPolicyToPermissionSetErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
AttachManagedPolicyToPermissionSetErrorKind::ConflictException(_inner) => Some(_inner),
AttachManagedPolicyToPermissionSetErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
AttachManagedPolicyToPermissionSetErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
AttachManagedPolicyToPermissionSetErrorKind::ServiceQuotaExceededException(_inner) => {
Some(_inner)
}
AttachManagedPolicyToPermissionSetErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
AttachManagedPolicyToPermissionSetErrorKind::ValidationException(_inner) => {
Some(_inner)
}
AttachManagedPolicyToPermissionSetErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AttachCustomerManagedPolicyReferenceToPermissionSetError {
pub kind: AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for AttachCustomerManagedPolicyReferenceToPermissionSetError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AttachCustomerManagedPolicyReferenceToPermissionSetError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::AccessDeniedException(_inner) =>
_inner.fmt(f)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ConflictException(_inner) =>
_inner.fmt(f)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::InternalServerException(_inner) =>
_inner.fmt(f)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ResourceNotFoundException(_inner) =>
_inner.fmt(f)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ServiceQuotaExceededException(_inner) =>
_inner.fmt(f)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ThrottlingException(_inner) =>
_inner.fmt(f)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ValidationException(_inner) =>
_inner.fmt(f)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for AttachCustomerManagedPolicyReferenceToPermissionSetError
{
fn code(&self) -> Option<&str> {
AttachCustomerManagedPolicyReferenceToPermissionSetError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AttachCustomerManagedPolicyReferenceToPermissionSetError {
pub fn new(
kind: AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind,
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: AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::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,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::InternalServerException(
_
)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ResourceNotFoundException(
_
)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(&self.kind, AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ServiceQuotaExceededException(_))
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AttachCustomerManagedPolicyReferenceToPermissionSetError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::AccessDeniedException(_inner) =>
Some(_inner)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ConflictException(_inner) =>
Some(_inner)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::InternalServerException(_inner) =>
Some(_inner)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ResourceNotFoundException(_inner) =>
Some(_inner)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ServiceQuotaExceededException(_inner) =>
Some(_inner)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ThrottlingException(_inner) =>
Some(_inner)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::ValidationException(_inner) =>
Some(_inner)
,
AttachCustomerManagedPolicyReferenceToPermissionSetErrorKind::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 _)
}
}