#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePartyError {
pub kind: CreatePartyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePartyErrorKind {
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 CreatePartyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePartyErrorKind::InternalError(_inner) => _inner.fmt(f),
CreatePartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
CreatePartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
CreatePartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
CreatePartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
CreatePartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
CreatePartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePartyError {
fn code(&self) -> Option<&str> {
CreatePartyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreatePartyErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
CreatePartyErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl CreatePartyError {
pub fn new(kind: CreatePartyErrorKind, 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: CreatePartyErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePartyErrorKind::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, CreatePartyErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, CreatePartyErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, CreatePartyErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, CreatePartyErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, CreatePartyErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, CreatePartyErrorKind::BadRequestError(_))
}
}
impl std::error::Error for CreatePartyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePartyErrorKind::InternalError(_inner) => Some(_inner),
CreatePartyErrorKind::RateLimitError(_inner) => Some(_inner),
CreatePartyErrorKind::ForbiddenError(_inner) => Some(_inner),
CreatePartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
CreatePartyErrorKind::NotFoundError(_inner) => Some(_inner),
CreatePartyErrorKind::BadRequestError(_inner) => Some(_inner),
CreatePartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreatePartyInviteError {
pub kind: CreatePartyInviteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreatePartyInviteErrorKind {
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 CreatePartyInviteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreatePartyInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
CreatePartyInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
CreatePartyInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
CreatePartyInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
CreatePartyInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
CreatePartyInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
CreatePartyInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreatePartyInviteError {
fn code(&self) -> Option<&str> {
CreatePartyInviteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
CreatePartyInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
CreatePartyInviteErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl CreatePartyInviteError {
pub fn new(kind: CreatePartyInviteErrorKind, 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: CreatePartyInviteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreatePartyInviteErrorKind::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, CreatePartyInviteErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, CreatePartyInviteErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, CreatePartyInviteErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, CreatePartyInviteErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, CreatePartyInviteErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, CreatePartyInviteErrorKind::BadRequestError(_))
}
}
impl std::error::Error for CreatePartyInviteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreatePartyInviteErrorKind::InternalError(_inner) => Some(_inner),
CreatePartyInviteErrorKind::RateLimitError(_inner) => Some(_inner),
CreatePartyInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
CreatePartyInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
CreatePartyInviteErrorKind::NotFoundError(_inner) => Some(_inner),
CreatePartyInviteErrorKind::BadRequestError(_inner) => Some(_inner),
CreatePartyInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetPartyFromInviteError {
pub kind: GetPartyFromInviteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetPartyFromInviteErrorKind {
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 GetPartyFromInviteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetPartyFromInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
GetPartyFromInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetPartyFromInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetPartyFromInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetPartyFromInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetPartyFromInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetPartyFromInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetPartyFromInviteError {
fn code(&self) -> Option<&str> {
GetPartyFromInviteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetPartyFromInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
GetPartyFromInviteErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetPartyFromInviteError {
pub fn new(kind: GetPartyFromInviteErrorKind, 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: GetPartyFromInviteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetPartyFromInviteErrorKind::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, GetPartyFromInviteErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetPartyFromInviteErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetPartyFromInviteErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
GetPartyFromInviteErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetPartyFromInviteErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetPartyFromInviteErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetPartyFromInviteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetPartyFromInviteErrorKind::InternalError(_inner) => Some(_inner),
GetPartyFromInviteErrorKind::RateLimitError(_inner) => Some(_inner),
GetPartyFromInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
GetPartyFromInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetPartyFromInviteErrorKind::NotFoundError(_inner) => Some(_inner),
GetPartyFromInviteErrorKind::BadRequestError(_inner) => Some(_inner),
GetPartyFromInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetPartyProfileError {
pub kind: GetPartyProfileErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetPartyProfileErrorKind {
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 GetPartyProfileError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetPartyProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
GetPartyProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetPartyProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetPartyProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetPartyProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetPartyProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetPartyProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetPartyProfileError {
fn code(&self) -> Option<&str> {
GetPartyProfileError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetPartyProfileErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
GetPartyProfileErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetPartyProfileError {
pub fn new(kind: GetPartyProfileErrorKind, 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: GetPartyProfileErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetPartyProfileErrorKind::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, GetPartyProfileErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetPartyProfileErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetPartyProfileErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, GetPartyProfileErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetPartyProfileErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetPartyProfileErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetPartyProfileError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetPartyProfileErrorKind::InternalError(_inner) => Some(_inner),
GetPartyProfileErrorKind::RateLimitError(_inner) => Some(_inner),
GetPartyProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
GetPartyProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetPartyProfileErrorKind::NotFoundError(_inner) => Some(_inner),
GetPartyProfileErrorKind::BadRequestError(_inner) => Some(_inner),
GetPartyProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetPartySelfProfileError {
pub kind: GetPartySelfProfileErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetPartySelfProfileErrorKind {
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 GetPartySelfProfileError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetPartySelfProfileErrorKind::InternalError(_inner) => _inner.fmt(f),
GetPartySelfProfileErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetPartySelfProfileErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetPartySelfProfileErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetPartySelfProfileErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetPartySelfProfileErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetPartySelfProfileErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetPartySelfProfileError {
fn code(&self) -> Option<&str> {
GetPartySelfProfileError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetPartySelfProfileErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
GetPartySelfProfileErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetPartySelfProfileError {
pub fn new(kind: GetPartySelfProfileErrorKind, 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: GetPartySelfProfileErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetPartySelfProfileErrorKind::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, GetPartySelfProfileErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetPartySelfProfileErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetPartySelfProfileErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
GetPartySelfProfileErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetPartySelfProfileErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetPartySelfProfileErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetPartySelfProfileError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetPartySelfProfileErrorKind::InternalError(_inner) => Some(_inner),
GetPartySelfProfileErrorKind::RateLimitError(_inner) => Some(_inner),
GetPartySelfProfileErrorKind::ForbiddenError(_inner) => Some(_inner),
GetPartySelfProfileErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetPartySelfProfileErrorKind::NotFoundError(_inner) => Some(_inner),
GetPartySelfProfileErrorKind::BadRequestError(_inner) => Some(_inner),
GetPartySelfProfileErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetPartySelfSummaryError {
pub kind: GetPartySelfSummaryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetPartySelfSummaryErrorKind {
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 GetPartySelfSummaryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetPartySelfSummaryErrorKind::InternalError(_inner) => _inner.fmt(f),
GetPartySelfSummaryErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetPartySelfSummaryErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetPartySelfSummaryErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetPartySelfSummaryErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetPartySelfSummaryErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetPartySelfSummaryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetPartySelfSummaryError {
fn code(&self) -> Option<&str> {
GetPartySelfSummaryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetPartySelfSummaryErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
GetPartySelfSummaryErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetPartySelfSummaryError {
pub fn new(kind: GetPartySelfSummaryErrorKind, 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: GetPartySelfSummaryErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetPartySelfSummaryErrorKind::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, GetPartySelfSummaryErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetPartySelfSummaryErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetPartySelfSummaryErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
GetPartySelfSummaryErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetPartySelfSummaryErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetPartySelfSummaryErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetPartySelfSummaryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetPartySelfSummaryErrorKind::InternalError(_inner) => Some(_inner),
GetPartySelfSummaryErrorKind::RateLimitError(_inner) => Some(_inner),
GetPartySelfSummaryErrorKind::ForbiddenError(_inner) => Some(_inner),
GetPartySelfSummaryErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetPartySelfSummaryErrorKind::NotFoundError(_inner) => Some(_inner),
GetPartySelfSummaryErrorKind::BadRequestError(_inner) => Some(_inner),
GetPartySelfSummaryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetPartySummaryError {
pub kind: GetPartySummaryErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetPartySummaryErrorKind {
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 GetPartySummaryError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetPartySummaryErrorKind::InternalError(_inner) => _inner.fmt(f),
GetPartySummaryErrorKind::RateLimitError(_inner) => _inner.fmt(f),
GetPartySummaryErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
GetPartySummaryErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetPartySummaryErrorKind::NotFoundError(_inner) => _inner.fmt(f),
GetPartySummaryErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetPartySummaryErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetPartySummaryError {
fn code(&self) -> Option<&str> {
GetPartySummaryError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetPartySummaryErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
GetPartySummaryErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl GetPartySummaryError {
pub fn new(kind: GetPartySummaryErrorKind, 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: GetPartySummaryErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetPartySummaryErrorKind::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, GetPartySummaryErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, GetPartySummaryErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, GetPartySummaryErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, GetPartySummaryErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, GetPartySummaryErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetPartySummaryErrorKind::BadRequestError(_))
}
}
impl std::error::Error for GetPartySummaryError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetPartySummaryErrorKind::InternalError(_inner) => Some(_inner),
GetPartySummaryErrorKind::RateLimitError(_inner) => Some(_inner),
GetPartySummaryErrorKind::ForbiddenError(_inner) => Some(_inner),
GetPartySummaryErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetPartySummaryErrorKind::NotFoundError(_inner) => Some(_inner),
GetPartySummaryErrorKind::BadRequestError(_inner) => Some(_inner),
GetPartySummaryErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct JoinPartyError {
pub kind: JoinPartyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum JoinPartyErrorKind {
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 JoinPartyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
JoinPartyErrorKind::InternalError(_inner) => _inner.fmt(f),
JoinPartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
JoinPartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
JoinPartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
JoinPartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
JoinPartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
JoinPartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for JoinPartyError {
fn code(&self) -> Option<&str> {
JoinPartyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
JoinPartyErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
JoinPartyErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl JoinPartyError {
pub fn new(kind: JoinPartyErrorKind, 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: JoinPartyErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: JoinPartyErrorKind::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, JoinPartyErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, JoinPartyErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, JoinPartyErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, JoinPartyErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, JoinPartyErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, JoinPartyErrorKind::BadRequestError(_))
}
}
impl std::error::Error for JoinPartyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
JoinPartyErrorKind::InternalError(_inner) => Some(_inner),
JoinPartyErrorKind::RateLimitError(_inner) => Some(_inner),
JoinPartyErrorKind::ForbiddenError(_inner) => Some(_inner),
JoinPartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
JoinPartyErrorKind::NotFoundError(_inner) => Some(_inner),
JoinPartyErrorKind::BadRequestError(_inner) => Some(_inner),
JoinPartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct KickMemberError {
pub kind: KickMemberErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum KickMemberErrorKind {
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 KickMemberError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
KickMemberErrorKind::InternalError(_inner) => _inner.fmt(f),
KickMemberErrorKind::RateLimitError(_inner) => _inner.fmt(f),
KickMemberErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
KickMemberErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
KickMemberErrorKind::NotFoundError(_inner) => _inner.fmt(f),
KickMemberErrorKind::BadRequestError(_inner) => _inner.fmt(f),
KickMemberErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for KickMemberError {
fn code(&self) -> Option<&str> {
KickMemberError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
KickMemberErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
KickMemberErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl KickMemberError {
pub fn new(kind: KickMemberErrorKind, 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: KickMemberErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: KickMemberErrorKind::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, KickMemberErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, KickMemberErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, KickMemberErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, KickMemberErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, KickMemberErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, KickMemberErrorKind::BadRequestError(_))
}
}
impl std::error::Error for KickMemberError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
KickMemberErrorKind::InternalError(_inner) => Some(_inner),
KickMemberErrorKind::RateLimitError(_inner) => Some(_inner),
KickMemberErrorKind::ForbiddenError(_inner) => Some(_inner),
KickMemberErrorKind::UnauthorizedError(_inner) => Some(_inner),
KickMemberErrorKind::NotFoundError(_inner) => Some(_inner),
KickMemberErrorKind::BadRequestError(_inner) => Some(_inner),
KickMemberErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct LeavePartyError {
pub kind: LeavePartyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum LeavePartyErrorKind {
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 LeavePartyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
LeavePartyErrorKind::InternalError(_inner) => _inner.fmt(f),
LeavePartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
LeavePartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
LeavePartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
LeavePartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
LeavePartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
LeavePartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for LeavePartyError {
fn code(&self) -> Option<&str> {
LeavePartyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
LeavePartyErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
LeavePartyErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl LeavePartyError {
pub fn new(kind: LeavePartyErrorKind, 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: LeavePartyErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: LeavePartyErrorKind::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, LeavePartyErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, LeavePartyErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, LeavePartyErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, LeavePartyErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, LeavePartyErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, LeavePartyErrorKind::BadRequestError(_))
}
}
impl std::error::Error for LeavePartyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
LeavePartyErrorKind::InternalError(_inner) => Some(_inner),
LeavePartyErrorKind::RateLimitError(_inner) => Some(_inner),
LeavePartyErrorKind::ForbiddenError(_inner) => Some(_inner),
LeavePartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
LeavePartyErrorKind::NotFoundError(_inner) => Some(_inner),
LeavePartyErrorKind::BadRequestError(_inner) => Some(_inner),
LeavePartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RevokePartyInviteError {
pub kind: RevokePartyInviteErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RevokePartyInviteErrorKind {
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 RevokePartyInviteError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RevokePartyInviteErrorKind::InternalError(_inner) => _inner.fmt(f),
RevokePartyInviteErrorKind::RateLimitError(_inner) => _inner.fmt(f),
RevokePartyInviteErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
RevokePartyInviteErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
RevokePartyInviteErrorKind::NotFoundError(_inner) => _inner.fmt(f),
RevokePartyInviteErrorKind::BadRequestError(_inner) => _inner.fmt(f),
RevokePartyInviteErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RevokePartyInviteError {
fn code(&self) -> Option<&str> {
RevokePartyInviteError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
RevokePartyInviteErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
RevokePartyInviteErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl RevokePartyInviteError {
pub fn new(kind: RevokePartyInviteErrorKind, 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: RevokePartyInviteErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RevokePartyInviteErrorKind::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, RevokePartyInviteErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, RevokePartyInviteErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, RevokePartyInviteErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, RevokePartyInviteErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, RevokePartyInviteErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, RevokePartyInviteErrorKind::BadRequestError(_))
}
}
impl std::error::Error for RevokePartyInviteError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RevokePartyInviteErrorKind::InternalError(_inner) => Some(_inner),
RevokePartyInviteErrorKind::RateLimitError(_inner) => Some(_inner),
RevokePartyInviteErrorKind::ForbiddenError(_inner) => Some(_inner),
RevokePartyInviteErrorKind::UnauthorizedError(_inner) => Some(_inner),
RevokePartyInviteErrorKind::NotFoundError(_inner) => Some(_inner),
RevokePartyInviteErrorKind::BadRequestError(_inner) => Some(_inner),
RevokePartyInviteErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SendJoinRequestError {
pub kind: SendJoinRequestErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SendJoinRequestErrorKind {
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 SendJoinRequestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SendJoinRequestErrorKind::InternalError(_inner) => _inner.fmt(f),
SendJoinRequestErrorKind::RateLimitError(_inner) => _inner.fmt(f),
SendJoinRequestErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
SendJoinRequestErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
SendJoinRequestErrorKind::NotFoundError(_inner) => _inner.fmt(f),
SendJoinRequestErrorKind::BadRequestError(_inner) => _inner.fmt(f),
SendJoinRequestErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SendJoinRequestError {
fn code(&self) -> Option<&str> {
SendJoinRequestError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SendJoinRequestErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
SendJoinRequestErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SendJoinRequestError {
pub fn new(kind: SendJoinRequestErrorKind, 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: SendJoinRequestErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SendJoinRequestErrorKind::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, SendJoinRequestErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, SendJoinRequestErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, SendJoinRequestErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, SendJoinRequestErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, SendJoinRequestErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, SendJoinRequestErrorKind::BadRequestError(_))
}
}
impl std::error::Error for SendJoinRequestError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SendJoinRequestErrorKind::InternalError(_inner) => Some(_inner),
SendJoinRequestErrorKind::RateLimitError(_inner) => Some(_inner),
SendJoinRequestErrorKind::ForbiddenError(_inner) => Some(_inner),
SendJoinRequestErrorKind::UnauthorizedError(_inner) => Some(_inner),
SendJoinRequestErrorKind::NotFoundError(_inner) => Some(_inner),
SendJoinRequestErrorKind::BadRequestError(_inner) => Some(_inner),
SendJoinRequestErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetPartyPublicityError {
pub kind: SetPartyPublicityErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetPartyPublicityErrorKind {
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 SetPartyPublicityError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetPartyPublicityErrorKind::InternalError(_inner) => _inner.fmt(f),
SetPartyPublicityErrorKind::RateLimitError(_inner) => _inner.fmt(f),
SetPartyPublicityErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
SetPartyPublicityErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
SetPartyPublicityErrorKind::NotFoundError(_inner) => _inner.fmt(f),
SetPartyPublicityErrorKind::BadRequestError(_inner) => _inner.fmt(f),
SetPartyPublicityErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetPartyPublicityError {
fn code(&self) -> Option<&str> {
SetPartyPublicityError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SetPartyPublicityErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
SetPartyPublicityErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl SetPartyPublicityError {
pub fn new(kind: SetPartyPublicityErrorKind, 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: SetPartyPublicityErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetPartyPublicityErrorKind::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, SetPartyPublicityErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, SetPartyPublicityErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, SetPartyPublicityErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, SetPartyPublicityErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, SetPartyPublicityErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, SetPartyPublicityErrorKind::BadRequestError(_))
}
}
impl std::error::Error for SetPartyPublicityError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetPartyPublicityErrorKind::InternalError(_inner) => Some(_inner),
SetPartyPublicityErrorKind::RateLimitError(_inner) => Some(_inner),
SetPartyPublicityErrorKind::ForbiddenError(_inner) => Some(_inner),
SetPartyPublicityErrorKind::UnauthorizedError(_inner) => Some(_inner),
SetPartyPublicityErrorKind::NotFoundError(_inner) => Some(_inner),
SetPartyPublicityErrorKind::BadRequestError(_inner) => Some(_inner),
SetPartyPublicityErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TransferPartyOwnershipError {
pub kind: TransferPartyOwnershipErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TransferPartyOwnershipErrorKind {
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 TransferPartyOwnershipError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TransferPartyOwnershipErrorKind::InternalError(_inner) => _inner.fmt(f),
TransferPartyOwnershipErrorKind::RateLimitError(_inner) => _inner.fmt(f),
TransferPartyOwnershipErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
TransferPartyOwnershipErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
TransferPartyOwnershipErrorKind::NotFoundError(_inner) => _inner.fmt(f),
TransferPartyOwnershipErrorKind::BadRequestError(_inner) => _inner.fmt(f),
TransferPartyOwnershipErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TransferPartyOwnershipError {
fn code(&self) -> Option<&str> {
TransferPartyOwnershipError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
TransferPartyOwnershipErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
TransferPartyOwnershipErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl TransferPartyOwnershipError {
pub fn new(kind: TransferPartyOwnershipErrorKind, 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: TransferPartyOwnershipErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TransferPartyOwnershipErrorKind::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,
TransferPartyOwnershipErrorKind::InternalError(_)
)
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(
&self.kind,
TransferPartyOwnershipErrorKind::RateLimitError(_)
)
}
pub fn is_forbidden_error(&self) -> bool {
matches!(
&self.kind,
TransferPartyOwnershipErrorKind::ForbiddenError(_)
)
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
TransferPartyOwnershipErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(
&self.kind,
TransferPartyOwnershipErrorKind::NotFoundError(_)
)
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
TransferPartyOwnershipErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for TransferPartyOwnershipError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TransferPartyOwnershipErrorKind::InternalError(_inner) => Some(_inner),
TransferPartyOwnershipErrorKind::RateLimitError(_inner) => Some(_inner),
TransferPartyOwnershipErrorKind::ForbiddenError(_inner) => Some(_inner),
TransferPartyOwnershipErrorKind::UnauthorizedError(_inner) => Some(_inner),
TransferPartyOwnershipErrorKind::NotFoundError(_inner) => Some(_inner),
TransferPartyOwnershipErrorKind::BadRequestError(_inner) => Some(_inner),
TransferPartyOwnershipErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct FindMatchmakerLobbyForPartyError {
pub kind: FindMatchmakerLobbyForPartyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum FindMatchmakerLobbyForPartyErrorKind {
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 FindMatchmakerLobbyForPartyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
FindMatchmakerLobbyForPartyErrorKind::InternalError(_inner) => _inner.fmt(f),
FindMatchmakerLobbyForPartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
FindMatchmakerLobbyForPartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
FindMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
FindMatchmakerLobbyForPartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
FindMatchmakerLobbyForPartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
FindMatchmakerLobbyForPartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for FindMatchmakerLobbyForPartyError {
fn code(&self) -> Option<&str> {
FindMatchmakerLobbyForPartyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
FindMatchmakerLobbyForPartyErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
FindMatchmakerLobbyForPartyErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl FindMatchmakerLobbyForPartyError {
pub fn new(kind: FindMatchmakerLobbyForPartyErrorKind, 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: FindMatchmakerLobbyForPartyErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: FindMatchmakerLobbyForPartyErrorKind::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,
FindMatchmakerLobbyForPartyErrorKind::InternalError(_)
)
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(
&self.kind,
FindMatchmakerLobbyForPartyErrorKind::RateLimitError(_)
)
}
pub fn is_forbidden_error(&self) -> bool {
matches!(
&self.kind,
FindMatchmakerLobbyForPartyErrorKind::ForbiddenError(_)
)
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
FindMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(
&self.kind,
FindMatchmakerLobbyForPartyErrorKind::NotFoundError(_)
)
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
FindMatchmakerLobbyForPartyErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for FindMatchmakerLobbyForPartyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
FindMatchmakerLobbyForPartyErrorKind::InternalError(_inner) => Some(_inner),
FindMatchmakerLobbyForPartyErrorKind::RateLimitError(_inner) => Some(_inner),
FindMatchmakerLobbyForPartyErrorKind::ForbiddenError(_inner) => Some(_inner),
FindMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
FindMatchmakerLobbyForPartyErrorKind::NotFoundError(_inner) => Some(_inner),
FindMatchmakerLobbyForPartyErrorKind::BadRequestError(_inner) => Some(_inner),
FindMatchmakerLobbyForPartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct JoinMatchmakerLobbyForPartyError {
pub kind: JoinMatchmakerLobbyForPartyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum JoinMatchmakerLobbyForPartyErrorKind {
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 JoinMatchmakerLobbyForPartyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
JoinMatchmakerLobbyForPartyErrorKind::InternalError(_inner) => _inner.fmt(f),
JoinMatchmakerLobbyForPartyErrorKind::RateLimitError(_inner) => _inner.fmt(f),
JoinMatchmakerLobbyForPartyErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
JoinMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
JoinMatchmakerLobbyForPartyErrorKind::NotFoundError(_inner) => _inner.fmt(f),
JoinMatchmakerLobbyForPartyErrorKind::BadRequestError(_inner) => _inner.fmt(f),
JoinMatchmakerLobbyForPartyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for JoinMatchmakerLobbyForPartyError {
fn code(&self) -> Option<&str> {
JoinMatchmakerLobbyForPartyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
JoinMatchmakerLobbyForPartyErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
JoinMatchmakerLobbyForPartyErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl JoinMatchmakerLobbyForPartyError {
pub fn new(kind: JoinMatchmakerLobbyForPartyErrorKind, 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: JoinMatchmakerLobbyForPartyErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: JoinMatchmakerLobbyForPartyErrorKind::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,
JoinMatchmakerLobbyForPartyErrorKind::InternalError(_)
)
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(
&self.kind,
JoinMatchmakerLobbyForPartyErrorKind::RateLimitError(_)
)
}
pub fn is_forbidden_error(&self) -> bool {
matches!(
&self.kind,
JoinMatchmakerLobbyForPartyErrorKind::ForbiddenError(_)
)
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
JoinMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(
&self.kind,
JoinMatchmakerLobbyForPartyErrorKind::NotFoundError(_)
)
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
JoinMatchmakerLobbyForPartyErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for JoinMatchmakerLobbyForPartyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
JoinMatchmakerLobbyForPartyErrorKind::InternalError(_inner) => Some(_inner),
JoinMatchmakerLobbyForPartyErrorKind::RateLimitError(_inner) => Some(_inner),
JoinMatchmakerLobbyForPartyErrorKind::ForbiddenError(_inner) => Some(_inner),
JoinMatchmakerLobbyForPartyErrorKind::UnauthorizedError(_inner) => Some(_inner),
JoinMatchmakerLobbyForPartyErrorKind::NotFoundError(_inner) => Some(_inner),
JoinMatchmakerLobbyForPartyErrorKind::BadRequestError(_inner) => Some(_inner),
JoinMatchmakerLobbyForPartyErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct RequestMatchmakerPlayerError {
pub kind: RequestMatchmakerPlayerErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum RequestMatchmakerPlayerErrorKind {
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 RequestMatchmakerPlayerError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
RequestMatchmakerPlayerErrorKind::InternalError(_inner) => _inner.fmt(f),
RequestMatchmakerPlayerErrorKind::RateLimitError(_inner) => _inner.fmt(f),
RequestMatchmakerPlayerErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
RequestMatchmakerPlayerErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
RequestMatchmakerPlayerErrorKind::NotFoundError(_inner) => _inner.fmt(f),
RequestMatchmakerPlayerErrorKind::BadRequestError(_inner) => _inner.fmt(f),
RequestMatchmakerPlayerErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for RequestMatchmakerPlayerError {
fn code(&self) -> Option<&str> {
RequestMatchmakerPlayerError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
RequestMatchmakerPlayerErrorKind::InternalError(inner) => {
Some(inner.retryable_error_kind())
}
RequestMatchmakerPlayerErrorKind::UnauthorizedError(inner) => {
Some(inner.retryable_error_kind())
}
_ => None,
}
}
}
impl RequestMatchmakerPlayerError {
pub fn new(kind: RequestMatchmakerPlayerErrorKind, 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: RequestMatchmakerPlayerErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: RequestMatchmakerPlayerErrorKind::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,
RequestMatchmakerPlayerErrorKind::InternalError(_)
)
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(
&self.kind,
RequestMatchmakerPlayerErrorKind::RateLimitError(_)
)
}
pub fn is_forbidden_error(&self) -> bool {
matches!(
&self.kind,
RequestMatchmakerPlayerErrorKind::ForbiddenError(_)
)
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(
&self.kind,
RequestMatchmakerPlayerErrorKind::UnauthorizedError(_)
)
}
pub fn is_not_found_error(&self) -> bool {
matches!(
&self.kind,
RequestMatchmakerPlayerErrorKind::NotFoundError(_)
)
}
pub fn is_bad_request_error(&self) -> bool {
matches!(
&self.kind,
RequestMatchmakerPlayerErrorKind::BadRequestError(_)
)
}
}
impl std::error::Error for RequestMatchmakerPlayerError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
RequestMatchmakerPlayerErrorKind::InternalError(_inner) => Some(_inner),
RequestMatchmakerPlayerErrorKind::RateLimitError(_inner) => Some(_inner),
RequestMatchmakerPlayerErrorKind::ForbiddenError(_inner) => Some(_inner),
RequestMatchmakerPlayerErrorKind::UnauthorizedError(_inner) => Some(_inner),
RequestMatchmakerPlayerErrorKind::NotFoundError(_inner) => Some(_inner),
RequestMatchmakerPlayerErrorKind::BadRequestError(_inner) => Some(_inner),
RequestMatchmakerPlayerErrorKind::Unhandled(_inner) => Some(_inner.as_ref()),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct SetPartyToIdleError {
pub kind: SetPartyToIdleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum SetPartyToIdleErrorKind {
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 SetPartyToIdleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
SetPartyToIdleErrorKind::InternalError(_inner) => _inner.fmt(f),
SetPartyToIdleErrorKind::RateLimitError(_inner) => _inner.fmt(f),
SetPartyToIdleErrorKind::ForbiddenError(_inner) => _inner.fmt(f),
SetPartyToIdleErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
SetPartyToIdleErrorKind::NotFoundError(_inner) => _inner.fmt(f),
SetPartyToIdleErrorKind::BadRequestError(_inner) => _inner.fmt(f),
SetPartyToIdleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for SetPartyToIdleError {
fn code(&self) -> Option<&str> {
SetPartyToIdleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
SetPartyToIdleErrorKind::InternalError(inner) => Some(inner.retryable_error_kind()),
SetPartyToIdleErrorKind::UnauthorizedError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl SetPartyToIdleError {
pub fn new(kind: SetPartyToIdleErrorKind, 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: SetPartyToIdleErrorKind::Unhandled(err.into()),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: SetPartyToIdleErrorKind::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, SetPartyToIdleErrorKind::InternalError(_))
}
pub fn is_rate_limit_error(&self) -> bool {
matches!(&self.kind, SetPartyToIdleErrorKind::RateLimitError(_))
}
pub fn is_forbidden_error(&self) -> bool {
matches!(&self.kind, SetPartyToIdleErrorKind::ForbiddenError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, SetPartyToIdleErrorKind::UnauthorizedError(_))
}
pub fn is_not_found_error(&self) -> bool {
matches!(&self.kind, SetPartyToIdleErrorKind::NotFoundError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, SetPartyToIdleErrorKind::BadRequestError(_))
}
}
impl std::error::Error for SetPartyToIdleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
SetPartyToIdleErrorKind::InternalError(_inner) => Some(_inner),
SetPartyToIdleErrorKind::RateLimitError(_inner) => Some(_inner),
SetPartyToIdleErrorKind::ForbiddenError(_inner) => Some(_inner),
SetPartyToIdleErrorKind::UnauthorizedError(_inner) => Some(_inner),
SetPartyToIdleErrorKind::NotFoundError(_inner) => Some(_inner),
SetPartyToIdleErrorKind::BadRequestError(_inner) => Some(_inner),
SetPartyToIdleErrorKind::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()
}
}