#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CompleteGroupAvatarUploadError {
pub kind: CompleteGroupAvatarUploadErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CompleteGroupAvatarUploadErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CompleteGroupAvatarUploadError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CompleteGroupAvatarUploadErrorKind::InternalError(_inner) => _inner.fmt(f),
CompleteGroupAvatarUploadErrorKind::RateLimitError(_inner) => _inner.fmt(f),
CompleteGroupAvatarUploadErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
CompleteGroupAvatarUploadErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
CompleteGroupAvatarUploadErrorKind::NotFoundError(_inner) => _inner.fmt(f),
CompleteGroupAvatarUploadErrorKind::BadRequestError(_inner) => _inner.fmt(f),
CompleteGroupAvatarUploadErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CompleteGroupAvatarUploadError {
fn code(&self) -> Option<&str> {
CompleteGroupAvatarUploadError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CompleteGroupAvatarUploadErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
CompleteGroupAvatarUploadErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CompleteGroupAvatarUploadError {
pub fn new(kind: CompleteGroupAvatarUploadErrorKind, 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: CompleteGroupAvatarUploadErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CompleteGroupAvatarUploadErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(
&self.kind,
CompleteGroupAvatarUploadErrorKind::InternalError(_)
)
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(
&self.kind,
CompleteGroupAvatarUploadErrorKind::RateLimitError(_)
)
}
pub fn is_forbidden_error(&self) -> bool {
matches!(
&self.kind,
CompleteGroupAvatarUploadErrorKind::ForbiddenError(_)
)
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
CompleteGroupAvatarUploadErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(
&self.kind,
CompleteGroupAvatarUploadErrorKind::NotFoundError(_)
)
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
CompleteGroupAvatarUploadErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for CompleteGroupAvatarUploadError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CompleteGroupAvatarUploadErrorKind::InternalError(_inner) => Some(_inner),
CompleteGroupAvatarUploadErrorKind::RateLimitError(_inner) => Some(_inner),
CompleteGroupAvatarUploadErrorKind::ForbiddenError(_inner) => Some(_inner),
CompleteGroupAvatarUploadErrorKind::UnauthorizedError(_inner) => Some(_inner),
CompleteGroupAvatarUploadErrorKind::NotFoundError(_inner) => Some(_inner),
CompleteGroupAvatarUploadErrorKind::BadRequestError(_inner) => Some(_inner),
CompleteGroupAvatarUploadErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ConsumeGroupInviteError {
pub kind: ConsumeGroupInviteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ConsumeGroupInviteErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ConsumeGroupInviteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ConsumeGroupInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
ConsumeGroupInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
ConsumeGroupInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
ConsumeGroupInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
ConsumeGroupInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
ConsumeGroupInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
ConsumeGroupInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ConsumeGroupInviteError {
fn code(&self) -> Option<&str> {
ConsumeGroupInviteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ConsumeGroupInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
ConsumeGroupInviteErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ConsumeGroupInviteError {
pub fn new(kind: ConsumeGroupInviteErrorKind, 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: ConsumeGroupInviteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ConsumeGroupInviteErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, ConsumeGroupInviteErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, ConsumeGroupInviteErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, ConsumeGroupInviteErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
ConsumeGroupInviteErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, ConsumeGroupInviteErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, ConsumeGroupInviteErrorKind::BadRequestError(_))
}
}
impl std::error::Error for ConsumeGroupInviteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ConsumeGroupInviteErrorKind::InternalError(_inner) => Some(_inner),
ConsumeGroupInviteErrorKind::RateLimitError(_inner) => Some(_inner),
ConsumeGroupInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
ConsumeGroupInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
ConsumeGroupInviteErrorKind::NotFoundError(_inner) => Some(_inner),
ConsumeGroupInviteErrorKind::BadRequestError(_inner) => Some(_inner),
ConsumeGroupInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateGroupError {
pub kind: CreateGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateGroupErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateGroupErrorKind::InternalError(_inner) => _inner.fmt(f),
CreateGroupErrorKind::RateLimitError(_inner) => _inner.fmt(f),
CreateGroupErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
CreateGroupErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
CreateGroupErrorKind::NotFoundError(_inner) => _inner.fmt(f),
CreateGroupErrorKind::BadRequestError(_inner) => _inner.fmt(f),
CreateGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateGroupError {
fn code(&self) -> Option<&str> {
CreateGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateGroupErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
CreateGroupErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl CreateGroupError {
pub fn new(kind: CreateGroupErrorKind, 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: CreateGroupErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateGroupErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, CreateGroupErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, CreateGroupErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, CreateGroupErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, CreateGroupErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, CreateGroupErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, CreateGroupErrorKind::BadRequestError(_))
}
}
impl std::error::Error for CreateGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateGroupErrorKind::InternalError(_inner) => Some(_inner),
CreateGroupErrorKind::RateLimitError(_inner) => Some(_inner),
CreateGroupErrorKind::ForbiddenError(_inner) => Some(_inner),
CreateGroupErrorKind::UnauthorizedError(_inner) => Some(_inner),
CreateGroupErrorKind::NotFoundError(_inner) => Some(_inner),
CreateGroupErrorKind::BadRequestError(_inner) => Some(_inner),
CreateGroupErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateGroupInviteError {
pub kind: CreateGroupInviteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateGroupInviteErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateGroupInviteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateGroupInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
CreateGroupInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
CreateGroupInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
CreateGroupInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
CreateGroupInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
CreateGroupInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
CreateGroupInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateGroupInviteError {
fn code(&self) -> Option<&str> {
CreateGroupInviteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateGroupInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
CreateGroupInviteErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateGroupInviteError {
pub fn new(kind: CreateGroupInviteErrorKind, 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: CreateGroupInviteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateGroupInviteErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, CreateGroupInviteErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, CreateGroupInviteErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, CreateGroupInviteErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, CreateGroupInviteErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, CreateGroupInviteErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, CreateGroupInviteErrorKind::BadRequestError(_))
}
}
impl std::error::Error for CreateGroupInviteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateGroupInviteErrorKind::InternalError(_inner) => Some(_inner),
CreateGroupInviteErrorKind::RateLimitError(_inner) => Some(_inner),
CreateGroupInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
CreateGroupInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
CreateGroupInviteErrorKind::NotFoundError(_inner) => Some(_inner),
CreateGroupInviteErrorKind::BadRequestError(_inner) => Some(_inner),
CreateGroupInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateGroupJoinRequestError {
pub kind: CreateGroupJoinRequestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateGroupJoinRequestErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for CreateGroupJoinRequestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateGroupJoinRequestErrorKind::InternalError(_inner) => _inner.fmt(f),
CreateGroupJoinRequestErrorKind::RateLimitError(_inner) => _inner.fmt(f),
CreateGroupJoinRequestErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
CreateGroupJoinRequestErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
CreateGroupJoinRequestErrorKind::NotFoundError(_inner) => _inner.fmt(f),
CreateGroupJoinRequestErrorKind::BadRequestError(_inner) => _inner.fmt(f),
CreateGroupJoinRequestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateGroupJoinRequestError {
fn code(&self) -> Option<&str> {
CreateGroupJoinRequestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreateGroupJoinRequestErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
CreateGroupJoinRequestErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreateGroupJoinRequestError {
pub fn new(kind: CreateGroupJoinRequestErrorKind, 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: CreateGroupJoinRequestErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateGroupJoinRequestErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(
&self.kind,
CreateGroupJoinRequestErrorKind::InternalError(_)
)
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(
&self.kind,
CreateGroupJoinRequestErrorKind::RateLimitError(_)
)
}
pub fn is_forbidden_error(&self) -> bool {
matches!(
&self.kind,
CreateGroupJoinRequestErrorKind::ForbiddenError(_)
)
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
CreateGroupJoinRequestErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(
&self.kind,
CreateGroupJoinRequestErrorKind::NotFoundError(_)
)
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
CreateGroupJoinRequestErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for CreateGroupJoinRequestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateGroupJoinRequestErrorKind::InternalError(_inner) => Some(_inner),
CreateGroupJoinRequestErrorKind::RateLimitError(_inner) => Some(_inner),
CreateGroupJoinRequestErrorKind::ForbiddenError(_inner) => Some(_inner),
CreateGroupJoinRequestErrorKind::UnauthorizedError(_inner) => Some(_inner),
CreateGroupJoinRequestErrorKind::NotFoundError(_inner) => Some(_inner),
CreateGroupJoinRequestErrorKind::BadRequestError(_inner) => Some(_inner),
CreateGroupJoinRequestErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetGroupInviteError {
pub kind: GetGroupInviteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetGroupInviteErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetGroupInviteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetGroupInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
GetGroupInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetGroupInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetGroupInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetGroupInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetGroupInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetGroupInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetGroupInviteError {
fn code(&self) -> Option<&str> {
GetGroupInviteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetGroupInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
GetGroupInviteErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetGroupInviteError {
pub fn new(kind: GetGroupInviteErrorKind, 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: GetGroupInviteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetGroupInviteErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, GetGroupInviteErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetGroupInviteErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetGroupInviteErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, GetGroupInviteErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetGroupInviteErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetGroupInviteErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetGroupInviteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetGroupInviteErrorKind::InternalError(_inner) => Some(_inner),
GetGroupInviteErrorKind::RateLimitError(_inner) => Some(_inner),
GetGroupInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
GetGroupInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetGroupInviteErrorKind::NotFoundError(_inner) => Some(_inner),
GetGroupInviteErrorKind::BadRequestError(_inner) => Some(_inner),
GetGroupInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetGroupProfileError {
pub kind: GetGroupProfileErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetGroupProfileErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetGroupProfileError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetGroupProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
GetGroupProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetGroupProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetGroupProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetGroupProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetGroupProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetGroupProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetGroupProfileError {
fn code(&self) -> Option<&str> {
GetGroupProfileError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetGroupProfileErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
GetGroupProfileErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetGroupProfileError {
pub fn new(kind: GetGroupProfileErrorKind, 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: GetGroupProfileErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetGroupProfileErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, GetGroupProfileErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetGroupProfileErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetGroupProfileErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, GetGroupProfileErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetGroupProfileErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetGroupProfileErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetGroupProfileError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetGroupProfileErrorKind::InternalError(_inner) => Some(_inner),
GetGroupProfileErrorKind::RateLimitError(_inner) => Some(_inner),
GetGroupProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
GetGroupProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetGroupProfileErrorKind::NotFoundError(_inner) => Some(_inner),
GetGroupProfileErrorKind::BadRequestError(_inner) => Some(_inner),
GetGroupProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetGroupSummaryError {
pub kind: GetGroupSummaryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetGroupSummaryErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for GetGroupSummaryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetGroupSummaryErrorKind::InternalError(_inner) => _inner.fmt(f),
GetGroupSummaryErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetGroupSummaryErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetGroupSummaryErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetGroupSummaryErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetGroupSummaryErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetGroupSummaryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetGroupSummaryError {
fn code(&self) -> Option<&str> {
GetGroupSummaryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetGroupSummaryErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
GetGroupSummaryErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetGroupSummaryError {
pub fn new(kind: GetGroupSummaryErrorKind, 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: GetGroupSummaryErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetGroupSummaryErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, GetGroupSummaryErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetGroupSummaryErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetGroupSummaryErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, GetGroupSummaryErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetGroupSummaryErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetGroupSummaryErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetGroupSummaryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetGroupSummaryErrorKind::InternalError(_inner) => Some(_inner),
GetGroupSummaryErrorKind::RateLimitError(_inner) => Some(_inner),
GetGroupSummaryErrorKind::ForbiddenError(_inner) => Some(_inner),
GetGroupSummaryErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetGroupSummaryErrorKind::NotFoundError(_inner) => Some(_inner),
GetGroupSummaryErrorKind::BadRequestError(_inner) => Some(_inner),
GetGroupSummaryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct JoinGroupError {
pub kind: JoinGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum JoinGroupErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for JoinGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
JoinGroupErrorKind::InternalError(_inner) => _inner.fmt(f),
JoinGroupErrorKind::RateLimitError(_inner) => _inner.fmt(f),
JoinGroupErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
JoinGroupErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
JoinGroupErrorKind::NotFoundError(_inner) => _inner.fmt(f),
JoinGroupErrorKind::BadRequestError(_inner) => _inner.fmt(f),
JoinGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for JoinGroupError {
fn code(&self) -> Option<&str> {
JoinGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
JoinGroupErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
JoinGroupErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl JoinGroupError {
pub fn new(kind: JoinGroupErrorKind, 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: JoinGroupErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: JoinGroupErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, JoinGroupErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, JoinGroupErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, JoinGroupErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, JoinGroupErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, JoinGroupErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, JoinGroupErrorKind::BadRequestError(_))
}
}
impl std::error::Error for JoinGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
JoinGroupErrorKind::InternalError(_inner) => Some(_inner),
JoinGroupErrorKind::RateLimitError(_inner) => Some(_inner),
JoinGroupErrorKind::ForbiddenError(_inner) => Some(_inner),
JoinGroupErrorKind::UnauthorizedError(_inner) => Some(_inner),
JoinGroupErrorKind::NotFoundError(_inner) => Some(_inner),
JoinGroupErrorKind::BadRequestError(_inner) => Some(_inner),
JoinGroupErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct LeaveGroupError {
pub kind: LeaveGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum LeaveGroupErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for LeaveGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
LeaveGroupErrorKind::InternalError(_inner) => _inner.fmt(f),
LeaveGroupErrorKind::RateLimitError(_inner) => _inner.fmt(f),
LeaveGroupErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
LeaveGroupErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
LeaveGroupErrorKind::NotFoundError(_inner) => _inner.fmt(f),
LeaveGroupErrorKind::BadRequestError(_inner) => _inner.fmt(f),
LeaveGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for LeaveGroupError {
fn code(&self) -> Option<&str> {
LeaveGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
LeaveGroupErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
LeaveGroupErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl LeaveGroupError {
pub fn new(kind: LeaveGroupErrorKind, 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: LeaveGroupErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: LeaveGroupErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, LeaveGroupErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, LeaveGroupErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, LeaveGroupErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, LeaveGroupErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, LeaveGroupErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, LeaveGroupErrorKind::BadRequestError(_))
}
}
impl std::error::Error for LeaveGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
LeaveGroupErrorKind::InternalError(_inner) => Some(_inner),
LeaveGroupErrorKind::RateLimitError(_inner) => Some(_inner),
LeaveGroupErrorKind::ForbiddenError(_inner) => Some(_inner),
LeaveGroupErrorKind::UnauthorizedError(_inner) => Some(_inner),
LeaveGroupErrorKind::NotFoundError(_inner) => Some(_inner),
LeaveGroupErrorKind::BadRequestError(_inner) => Some(_inner),
LeaveGroupErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListSuggestedGroupsError {
pub kind: ListSuggestedGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListSuggestedGroupsErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ListSuggestedGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListSuggestedGroupsErrorKind::InternalError(_inner) => _inner.fmt(f),
ListSuggestedGroupsErrorKind::RateLimitError(_inner) => _inner.fmt(f),
ListSuggestedGroupsErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
ListSuggestedGroupsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
ListSuggestedGroupsErrorKind::NotFoundError(_inner) => _inner.fmt(f),
ListSuggestedGroupsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
ListSuggestedGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListSuggestedGroupsError {
fn code(&self) -> Option<&str> {
ListSuggestedGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ListSuggestedGroupsErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
ListSuggestedGroupsErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ListSuggestedGroupsError {
pub fn new(kind: ListSuggestedGroupsErrorKind, 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: ListSuggestedGroupsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListSuggestedGroupsErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, ListSuggestedGroupsErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, ListSuggestedGroupsErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, ListSuggestedGroupsErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
ListSuggestedGroupsErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, ListSuggestedGroupsErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, ListSuggestedGroupsErrorKind::BadRequestError(_))
}
}
impl std::error::Error for ListSuggestedGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListSuggestedGroupsErrorKind::InternalError(_inner) => Some(_inner),
ListSuggestedGroupsErrorKind::RateLimitError(_inner) => Some(_inner),
ListSuggestedGroupsErrorKind::ForbiddenError(_inner) => Some(_inner),
ListSuggestedGroupsErrorKind::UnauthorizedError(_inner) => Some(_inner),
ListSuggestedGroupsErrorKind::NotFoundError(_inner) => Some(_inner),
ListSuggestedGroupsErrorKind::BadRequestError(_inner) => Some(_inner),
ListSuggestedGroupsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PrepareGroupAvatarUploadError {
pub kind: PrepareGroupAvatarUploadErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PrepareGroupAvatarUploadErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for PrepareGroupAvatarUploadError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PrepareGroupAvatarUploadErrorKind::InternalError(_inner) => _inner.fmt(f),
PrepareGroupAvatarUploadErrorKind::RateLimitError(_inner) => _inner.fmt(f),
PrepareGroupAvatarUploadErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
PrepareGroupAvatarUploadErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
PrepareGroupAvatarUploadErrorKind::NotFoundError(_inner) => _inner.fmt(f),
PrepareGroupAvatarUploadErrorKind::BadRequestError(_inner) => _inner.fmt(f),
PrepareGroupAvatarUploadErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PrepareGroupAvatarUploadError {
fn code(&self) -> Option<&str> {
PrepareGroupAvatarUploadError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
PrepareGroupAvatarUploadErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
PrepareGroupAvatarUploadErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl PrepareGroupAvatarUploadError {
pub fn new(kind: PrepareGroupAvatarUploadErrorKind, 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: PrepareGroupAvatarUploadErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PrepareGroupAvatarUploadErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(
&self.kind,
PrepareGroupAvatarUploadErrorKind::InternalError(_)
)
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(
&self.kind,
PrepareGroupAvatarUploadErrorKind::RateLimitError(_)
)
}
pub fn is_forbidden_error(&self) -> bool {
matches!(
&self.kind,
PrepareGroupAvatarUploadErrorKind::ForbiddenError(_)
)
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
PrepareGroupAvatarUploadErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(
&self.kind,
PrepareGroupAvatarUploadErrorKind::NotFoundError(_)
)
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
PrepareGroupAvatarUploadErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for PrepareGroupAvatarUploadError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PrepareGroupAvatarUploadErrorKind::InternalError(_inner) => Some(_inner),
PrepareGroupAvatarUploadErrorKind::RateLimitError(_inner) => Some(_inner),
PrepareGroupAvatarUploadErrorKind::ForbiddenError(_inner) => Some(_inner),
PrepareGroupAvatarUploadErrorKind::UnauthorizedError(_inner) => Some(_inner),
PrepareGroupAvatarUploadErrorKind::NotFoundError(_inner) => Some(_inner),
PrepareGroupAvatarUploadErrorKind::BadRequestError(_inner) => Some(_inner),
PrepareGroupAvatarUploadErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ResolveGroupJoinRequestError {
pub kind: ResolveGroupJoinRequestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ResolveGroupJoinRequestErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ResolveGroupJoinRequestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ResolveGroupJoinRequestErrorKind::InternalError(_inner) => _inner.fmt(f),
ResolveGroupJoinRequestErrorKind::RateLimitError(_inner) => _inner.fmt(f),
ResolveGroupJoinRequestErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
ResolveGroupJoinRequestErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
ResolveGroupJoinRequestErrorKind::NotFoundError(_inner) => _inner.fmt(f),
ResolveGroupJoinRequestErrorKind::BadRequestError(_inner) => _inner.fmt(f),
ResolveGroupJoinRequestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ResolveGroupJoinRequestError {
fn code(&self) -> Option<&str> {
ResolveGroupJoinRequestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ResolveGroupJoinRequestErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
ResolveGroupJoinRequestErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ResolveGroupJoinRequestError {
pub fn new(kind: ResolveGroupJoinRequestErrorKind, 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: ResolveGroupJoinRequestErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ResolveGroupJoinRequestErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(
&self.kind,
ResolveGroupJoinRequestErrorKind::InternalError(_)
)
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(
&self.kind,
ResolveGroupJoinRequestErrorKind::RateLimitError(_)
)
}
pub fn is_forbidden_error(&self) -> bool {
matches!(
&self.kind,
ResolveGroupJoinRequestErrorKind::ForbiddenError(_)
)
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
ResolveGroupJoinRequestErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(
&self.kind,
ResolveGroupJoinRequestErrorKind::NotFoundError(_)
)
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
ResolveGroupJoinRequestErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for ResolveGroupJoinRequestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ResolveGroupJoinRequestErrorKind::InternalError(_inner) => Some(_inner),
ResolveGroupJoinRequestErrorKind::RateLimitError(_inner) => Some(_inner),
ResolveGroupJoinRequestErrorKind::ForbiddenError(_inner) => Some(_inner),
ResolveGroupJoinRequestErrorKind::UnauthorizedError(_inner) => Some(_inner),
ResolveGroupJoinRequestErrorKind::NotFoundError(_inner) => Some(_inner),
ResolveGroupJoinRequestErrorKind::BadRequestError(_inner) => Some(_inner),
ResolveGroupJoinRequestErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SearchGroupsError {
pub kind: SearchGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SearchGroupsErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for SearchGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SearchGroupsErrorKind::InternalError(_inner) => _inner.fmt(f),
SearchGroupsErrorKind::RateLimitError(_inner) => _inner.fmt(f),
SearchGroupsErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
SearchGroupsErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
SearchGroupsErrorKind::NotFoundError(_inner) => _inner.fmt(f),
SearchGroupsErrorKind::BadRequestError(_inner) => _inner.fmt(f),
SearchGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SearchGroupsError {
fn code(&self) -> Option<&str> {
SearchGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SearchGroupsErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
SearchGroupsErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl SearchGroupsError {
pub fn new(kind: SearchGroupsErrorKind, 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: SearchGroupsErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SearchGroupsErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, SearchGroupsErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, SearchGroupsErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, SearchGroupsErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, SearchGroupsErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, SearchGroupsErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, SearchGroupsErrorKind::BadRequestError(_))
}
}
impl std::error::Error for SearchGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SearchGroupsErrorKind::InternalError(_inner) => Some(_inner),
SearchGroupsErrorKind::RateLimitError(_inner) => Some(_inner),
SearchGroupsErrorKind::ForbiddenError(_inner) => Some(_inner),
SearchGroupsErrorKind::UnauthorizedError(_inner) => Some(_inner),
SearchGroupsErrorKind::NotFoundError(_inner) => Some(_inner),
SearchGroupsErrorKind::BadRequestError(_inner) => Some(_inner),
SearchGroupsErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TransferGroupOwnershipError {
pub kind: TransferGroupOwnershipErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TransferGroupOwnershipErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for TransferGroupOwnershipError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TransferGroupOwnershipErrorKind::InternalError(_inner) => _inner.fmt(f),
TransferGroupOwnershipErrorKind::RateLimitError(_inner) => _inner.fmt(f),
TransferGroupOwnershipErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
TransferGroupOwnershipErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
TransferGroupOwnershipErrorKind::NotFoundError(_inner) => _inner.fmt(f),
TransferGroupOwnershipErrorKind::BadRequestError(_inner) => _inner.fmt(f),
TransferGroupOwnershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TransferGroupOwnershipError {
fn code(&self) -> Option<&str> {
TransferGroupOwnershipError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
TransferGroupOwnershipErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
TransferGroupOwnershipErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl TransferGroupOwnershipError {
pub fn new(kind: TransferGroupOwnershipErrorKind, 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: TransferGroupOwnershipErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TransferGroupOwnershipErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(
&self.kind,
TransferGroupOwnershipErrorKind::InternalError(_)
)
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(
&self.kind,
TransferGroupOwnershipErrorKind::RateLimitError(_)
)
}
pub fn is_forbidden_error(&self) -> bool {
matches!(
&self.kind,
TransferGroupOwnershipErrorKind::ForbiddenError(_)
)
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
TransferGroupOwnershipErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(
&self.kind,
TransferGroupOwnershipErrorKind::NotFoundError(_)
)
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
TransferGroupOwnershipErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for TransferGroupOwnershipError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TransferGroupOwnershipErrorKind::InternalError(_inner) => Some(_inner),
TransferGroupOwnershipErrorKind::RateLimitError(_inner) => Some(_inner),
TransferGroupOwnershipErrorKind::ForbiddenError(_inner) => Some(_inner),
TransferGroupOwnershipErrorKind::UnauthorizedError(_inner) => Some(_inner),
TransferGroupOwnershipErrorKind::NotFoundError(_inner) => Some(_inner),
TransferGroupOwnershipErrorKind::BadRequestError(_inner) => Some(_inner),
TransferGroupOwnershipErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateGroupProfileError {
pub kind: UpdateGroupProfileErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateGroupProfileErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for UpdateGroupProfileError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateGroupProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
UpdateGroupProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
UpdateGroupProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
UpdateGroupProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
UpdateGroupProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
UpdateGroupProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
UpdateGroupProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateGroupProfileError {
fn code(&self) -> Option<&str> {
UpdateGroupProfileError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
UpdateGroupProfileErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
UpdateGroupProfileErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl UpdateGroupProfileError {
pub fn new(kind: UpdateGroupProfileErrorKind, 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: UpdateGroupProfileErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateGroupProfileErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, UpdateGroupProfileErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, UpdateGroupProfileErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, UpdateGroupProfileErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
UpdateGroupProfileErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, UpdateGroupProfileErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, UpdateGroupProfileErrorKind::BadRequestError(_))
}
}
impl std::error::Error for UpdateGroupProfileError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateGroupProfileErrorKind::InternalError(_inner) => Some(_inner),
UpdateGroupProfileErrorKind::RateLimitError(_inner) => Some(_inner),
UpdateGroupProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
UpdateGroupProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
UpdateGroupProfileErrorKind::NotFoundError(_inner) => Some(_inner),
UpdateGroupProfileErrorKind::BadRequestError(_inner) => Some(_inner),
UpdateGroupProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ValidateGroupProfileError {
pub kind: ValidateGroupProfileErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ValidateGroupProfileErrorKind {
InternalError(crate::error::InternalError),
RateLimitError(crate::error::RateLimitError),
ForbiddenError(crate::error::ForbiddenError),
UnauthorizedError(crate::error::UnauthorizedError),
NotFoundError(crate::error::NotFoundError),
BadRequestError(crate::error::BadRequestError),
Unhandled(Box<dyn std::error::Error + Send + Sync + 'static>),
}
impl std::fmt::Display for ValidateGroupProfileError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ValidateGroupProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
ValidateGroupProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
ValidateGroupProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
ValidateGroupProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
ValidateGroupProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
ValidateGroupProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
ValidateGroupProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ValidateGroupProfileError {
fn code(&self) -> Option<&str> {
ValidateGroupProfileError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
ValidateGroupProfileErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
ValidateGroupProfileErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl ValidateGroupProfileError {
pub fn new(kind: ValidateGroupProfileErrorKind, 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: ValidateGroupProfileErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ValidateGroupProfileErrorKind::Unhandled(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_internal_error(&self) -> bool {
matches!(&self.kind, ValidateGroupProfileErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, ValidateGroupProfileErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, ValidateGroupProfileErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
ValidateGroupProfileErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, ValidateGroupProfileErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
ValidateGroupProfileErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for ValidateGroupProfileError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ValidateGroupProfileErrorKind::InternalError(_inner) => Some(_inner),
ValidateGroupProfileErrorKind::RateLimitError(_inner) => Some(_inner),
ValidateGroupProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
ValidateGroupProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
ValidateGroupProfileErrorKind::NotFoundError(_inner) => Some(_inner),
ValidateGroupProfileErrorKind::BadRequestError(_inner) => Some(_inner),
ValidateGroupProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct BadRequestError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl BadRequestError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for BadRequestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("BadRequestError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl BadRequestError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadRequestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadRequestError")?;
if let Some(inner_1) = &self.message {
write!(f, ": {}", inner_1)?;
}
Ok(())
}
}
impl std::error::Error for BadRequestError {}
pub mod bad_request_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::BadRequestError {
crate::error::BadRequestError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl BadRequestError {
pub fn builder() -> crate::error::bad_request_error::Builder {
crate::error::bad_request_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct NotFoundError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl NotFoundError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for NotFoundError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("NotFoundError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl NotFoundError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NotFoundError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NotFoundError")?;
if let Some(inner_2) = &self.message {
write!(f, ": {}", inner_2)?;
}
Ok(())
}
}
impl std::error::Error for NotFoundError {}
pub mod not_found_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::NotFoundError {
crate::error::NotFoundError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl NotFoundError {
pub fn builder() -> crate::error::not_found_error::Builder {
crate::error::not_found_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct UnauthorizedError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl UnauthorizedError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for UnauthorizedError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("UnauthorizedError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl UnauthorizedError {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ClientError
}
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnauthorizedError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnauthorizedError")?;
if let Some(inner_3) = &self.message {
write!(f, ": {}", inner_3)?;
}
Ok(())
}
}
impl std::error::Error for UnauthorizedError {}
pub mod unauthorized_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::UnauthorizedError {
crate::error::UnauthorizedError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl UnauthorizedError {
pub fn builder() -> crate::error::unauthorized_error::Builder {
crate::error::unauthorized_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ForbiddenError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl ForbiddenError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for ForbiddenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("ForbiddenError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl ForbiddenError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ForbiddenError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ForbiddenError")?;
if let Some(inner_4) = &self.message {
write!(f, ": {}", inner_4)?;
}
Ok(())
}
}
impl std::error::Error for ForbiddenError {}
pub mod forbidden_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::ForbiddenError {
crate::error::ForbiddenError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl ForbiddenError {
pub fn builder() -> crate::error::forbidden_error::Builder {
crate::error::forbidden_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RateLimitError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl RateLimitError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for RateLimitError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("RateLimitError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl RateLimitError {
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RateLimitError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RateLimitError")?;
if let Some(inner_5) = &self.message {
write!(f, ": {}", inner_5)?;
}
Ok(())
}
}
impl std::error::Error for RateLimitError {}
pub mod rate_limit_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::RateLimitError {
crate::error::RateLimitError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl RateLimitError {
pub fn builder() -> crate::error::rate_limit_error::Builder {
crate::error::rate_limit_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InternalError {
#[allow(missing_docs)] pub code: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub message: std::option::Option<std::string::String>,
pub metadata: std::option::Option<aws_smithy_types::Document>,
}
impl InternalError {
#[allow(missing_docs)] pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
pub fn metadata(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.metadata.as_ref()
}
}
impl std::fmt::Debug for InternalError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("InternalError");
formatter.field("code", &self.code);
formatter.field("message", &self.message);
formatter.field("metadata", &self.metadata);
formatter.finish()
}
}
impl InternalError {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ServerError
}
pub fn message(&self) -> Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalError")?;
if let Some(inner_6) = &self.message {
write!(f, ": {}", inner_6)?;
}
Ok(())
}
}
impl std::error::Error for InternalError {}
pub mod internal_error {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) code: std::option::Option<std::string::String>,
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) metadata: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
#[allow(missing_docs)] pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn metadata(mut self, input: aws_smithy_types::Document) -> Self {
self.metadata = Some(input);
self
}
pub fn set_metadata(
mut self,
input: std::option::Option<aws_smithy_types::Document>,
) -> Self {
self.metadata = input;
self
}
pub fn build(self) -> crate::error::InternalError {
crate::error::InternalError {
code: self.code,
message: self.message,
metadata: self.metadata,
}
}
}
}
impl InternalError {
pub fn builder() -> crate::error::internal_error::Builder {
crate::error::internal_error::Builder::default()
}
}