#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateEnrollmentStatusError {
pub kind: UpdateEnrollmentStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateEnrollmentStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateEnrollmentStatusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateEnrollmentStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateEnrollmentStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateEnrollmentStatusErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
UpdateEnrollmentStatusErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateEnrollmentStatusErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
UpdateEnrollmentStatusErrorKind::MissingAuthenticationToken(_inner) => _inner.fmt(f),
UpdateEnrollmentStatusErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
UpdateEnrollmentStatusErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
UpdateEnrollmentStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateEnrollmentStatusError {
fn code(&self) -> Option<&str> {
UpdateEnrollmentStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateEnrollmentStatusError {
pub fn new(kind: UpdateEnrollmentStatusErrorKind, 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: UpdateEnrollmentStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateEnrollmentStatusErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnrollmentStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnrollmentStatusErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnrollmentStatusErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
UpdateEnrollmentStatusErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnrollmentStatusErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
UpdateEnrollmentStatusErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for UpdateEnrollmentStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateEnrollmentStatusErrorKind::AccessDeniedException(_inner) => Some(_inner),
UpdateEnrollmentStatusErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateEnrollmentStatusErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
UpdateEnrollmentStatusErrorKind::MissingAuthenticationToken(_inner) => Some(_inner),
UpdateEnrollmentStatusErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
UpdateEnrollmentStatusErrorKind::ThrottlingException(_inner) => Some(_inner),
UpdateEnrollmentStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottlingException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingException {}
pub mod throttling_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
}
}
}
}
impl ThrottlingException {
pub fn builder() -> crate::error::throttling_exception::Builder {
crate::error::throttling_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUnavailableException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ServiceUnavailableException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUnavailableException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUnavailableException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableException {}
pub mod service_unavailable_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ServiceUnavailableException {
crate::error::ServiceUnavailableException {
message: self.message,
}
}
}
}
impl ServiceUnavailableException {
pub fn builder() -> crate::error::service_unavailable_exception::Builder {
crate::error::service_unavailable_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MissingAuthenticationToken {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MissingAuthenticationToken {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MissingAuthenticationToken {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MissingAuthenticationToken")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for MissingAuthenticationToken {}
pub mod missing_authentication_token {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::MissingAuthenticationToken {
crate::error::MissingAuthenticationToken {
message: self.message,
}
}
}
}
impl MissingAuthenticationToken {
pub fn builder() -> crate::error::missing_authentication_token::Builder {
crate::error::missing_authentication_token::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidParameterValueException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidParameterValueException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidParameterValueException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidParameterValueException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidParameterValueException {}
pub mod invalid_parameter_value_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InvalidParameterValueException {
crate::error::InvalidParameterValueException {
message: self.message,
}
}
}
}
impl InvalidParameterValueException {
pub fn builder() -> crate::error::invalid_parameter_value_exception::Builder {
crate::error::invalid_parameter_value_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InternalServerException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalServerException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalServerException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalServerException {}
pub mod internal_server_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutRecommendationPreferencesError {
pub kind: PutRecommendationPreferencesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutRecommendationPreferencesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutRecommendationPreferencesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutRecommendationPreferencesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutRecommendationPreferencesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutRecommendationPreferencesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
PutRecommendationPreferencesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
PutRecommendationPreferencesErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
PutRecommendationPreferencesErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
PutRecommendationPreferencesErrorKind::OptInRequiredException(_inner) => _inner.fmt(f),
PutRecommendationPreferencesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
PutRecommendationPreferencesErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
PutRecommendationPreferencesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
PutRecommendationPreferencesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutRecommendationPreferencesError {
fn code(&self) -> Option<&str> {
PutRecommendationPreferencesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutRecommendationPreferencesError {
pub fn new(kind: PutRecommendationPreferencesErrorKind, 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: PutRecommendationPreferencesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutRecommendationPreferencesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
PutRecommendationPreferencesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
PutRecommendationPreferencesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
PutRecommendationPreferencesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
PutRecommendationPreferencesErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
PutRecommendationPreferencesErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
PutRecommendationPreferencesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
PutRecommendationPreferencesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
PutRecommendationPreferencesErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for PutRecommendationPreferencesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutRecommendationPreferencesErrorKind::AccessDeniedException(_inner) => Some(_inner),
PutRecommendationPreferencesErrorKind::InternalServerException(_inner) => Some(_inner),
PutRecommendationPreferencesErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
PutRecommendationPreferencesErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
PutRecommendationPreferencesErrorKind::OptInRequiredException(_inner) => Some(_inner),
PutRecommendationPreferencesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
PutRecommendationPreferencesErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
PutRecommendationPreferencesErrorKind::ThrottlingException(_inner) => Some(_inner),
PutRecommendationPreferencesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct OptInRequiredException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl OptInRequiredException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for OptInRequiredException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "OptInRequiredException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for OptInRequiredException {}
pub mod opt_in_required_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::OptInRequiredException {
crate::error::OptInRequiredException {
message: self.message,
}
}
}
}
impl OptInRequiredException {
pub fn builder() -> crate::error::opt_in_required_exception::Builder {
crate::error::opt_in_required_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRecommendationSummariesError {
pub kind: GetRecommendationSummariesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRecommendationSummariesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRecommendationSummariesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRecommendationSummariesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRecommendationSummariesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRecommendationSummariesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetRecommendationSummariesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetRecommendationSummariesErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
GetRecommendationSummariesErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetRecommendationSummariesErrorKind::OptInRequiredException(_inner) => _inner.fmt(f),
GetRecommendationSummariesErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetRecommendationSummariesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetRecommendationSummariesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRecommendationSummariesError {
fn code(&self) -> Option<&str> {
GetRecommendationSummariesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRecommendationSummariesError {
pub fn new(kind: GetRecommendationSummariesErrorKind, 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: GetRecommendationSummariesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRecommendationSummariesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationSummariesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationSummariesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationSummariesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetRecommendationSummariesErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationSummariesErrorKind::OptInRequiredException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationSummariesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationSummariesErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetRecommendationSummariesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRecommendationSummariesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetRecommendationSummariesErrorKind::InternalServerException(_inner) => Some(_inner),
GetRecommendationSummariesErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
GetRecommendationSummariesErrorKind::MissingAuthenticationToken(_inner) => Some(_inner),
GetRecommendationSummariesErrorKind::OptInRequiredException(_inner) => Some(_inner),
GetRecommendationSummariesErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetRecommendationSummariesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetRecommendationSummariesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetRecommendationPreferencesError {
pub kind: GetRecommendationPreferencesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetRecommendationPreferencesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetRecommendationPreferencesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetRecommendationPreferencesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetRecommendationPreferencesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetRecommendationPreferencesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetRecommendationPreferencesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetRecommendationPreferencesErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
GetRecommendationPreferencesErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetRecommendationPreferencesErrorKind::OptInRequiredException(_inner) => _inner.fmt(f),
GetRecommendationPreferencesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetRecommendationPreferencesErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetRecommendationPreferencesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetRecommendationPreferencesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetRecommendationPreferencesError {
fn code(&self) -> Option<&str> {
GetRecommendationPreferencesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetRecommendationPreferencesError {
pub fn new(kind: GetRecommendationPreferencesErrorKind, 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: GetRecommendationPreferencesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetRecommendationPreferencesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationPreferencesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationPreferencesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationPreferencesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetRecommendationPreferencesErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationPreferencesErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationPreferencesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationPreferencesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetRecommendationPreferencesErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetRecommendationPreferencesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetRecommendationPreferencesErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetRecommendationPreferencesErrorKind::InternalServerException(_inner) => Some(_inner),
GetRecommendationPreferencesErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
GetRecommendationPreferencesErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
GetRecommendationPreferencesErrorKind::OptInRequiredException(_inner) => Some(_inner),
GetRecommendationPreferencesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetRecommendationPreferencesErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetRecommendationPreferencesErrorKind::ThrottlingException(_inner) => Some(_inner),
GetRecommendationPreferencesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetLambdaFunctionRecommendationsError {
pub kind: GetLambdaFunctionRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetLambdaFunctionRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetLambdaFunctionRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetLambdaFunctionRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetLambdaFunctionRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetLambdaFunctionRecommendationsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetLambdaFunctionRecommendationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetLambdaFunctionRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
GetLambdaFunctionRecommendationsErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
GetLambdaFunctionRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetLambdaFunctionRecommendationsErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
GetLambdaFunctionRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetLambdaFunctionRecommendationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetLambdaFunctionRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetLambdaFunctionRecommendationsError {
fn code(&self) -> Option<&str> {
GetLambdaFunctionRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetLambdaFunctionRecommendationsError {
pub fn new(
kind: GetLambdaFunctionRecommendationsErrorKind,
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: GetLambdaFunctionRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetLambdaFunctionRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetLambdaFunctionRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetLambdaFunctionRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetLambdaFunctionRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
GetLambdaFunctionRecommendationsErrorKind::LimitExceededException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetLambdaFunctionRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetLambdaFunctionRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetLambdaFunctionRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetLambdaFunctionRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetLambdaFunctionRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetLambdaFunctionRecommendationsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
GetLambdaFunctionRecommendationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetLambdaFunctionRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
GetLambdaFunctionRecommendationsErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
GetLambdaFunctionRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
GetLambdaFunctionRecommendationsErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
GetLambdaFunctionRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetLambdaFunctionRecommendationsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetLambdaFunctionRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LimitExceededException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for LimitExceededException {}
pub mod limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::LimitExceededException {
crate::error::LimitExceededException {
message: self.message,
}
}
}
}
impl LimitExceededException {
pub fn builder() -> crate::error::limit_exceeded_exception::Builder {
crate::error::limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEnrollmentStatusesForOrganizationError {
pub kind: GetEnrollmentStatusesForOrganizationErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEnrollmentStatusesForOrganizationError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEnrollmentStatusesForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEnrollmentStatusesForOrganizationErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEnrollmentStatusesForOrganizationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEnrollmentStatusesForOrganizationErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetEnrollmentStatusesForOrganizationErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetEnrollmentStatusesForOrganizationErrorKind::InvalidParameterValueException(
_inner,
) => _inner.fmt(f),
GetEnrollmentStatusesForOrganizationErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetEnrollmentStatusesForOrganizationErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetEnrollmentStatusesForOrganizationErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
GetEnrollmentStatusesForOrganizationErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEnrollmentStatusesForOrganizationError {
fn code(&self) -> Option<&str> {
GetEnrollmentStatusesForOrganizationError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEnrollmentStatusesForOrganizationError {
pub fn new(
kind: GetEnrollmentStatusesForOrganizationErrorKind,
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: GetEnrollmentStatusesForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEnrollmentStatusesForOrganizationErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusesForOrganizationErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusesForOrganizationErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusesForOrganizationErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusesForOrganizationErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusesForOrganizationErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusesForOrganizationErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetEnrollmentStatusesForOrganizationError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEnrollmentStatusesForOrganizationErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
GetEnrollmentStatusesForOrganizationErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetEnrollmentStatusesForOrganizationErrorKind::InvalidParameterValueException(
_inner,
) => Some(_inner),
GetEnrollmentStatusesForOrganizationErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
GetEnrollmentStatusesForOrganizationErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetEnrollmentStatusesForOrganizationErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
GetEnrollmentStatusesForOrganizationErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEnrollmentStatusError {
pub kind: GetEnrollmentStatusErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEnrollmentStatusError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEnrollmentStatusErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEnrollmentStatusErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEnrollmentStatusError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEnrollmentStatusErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEnrollmentStatusErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEnrollmentStatusErrorKind::InvalidParameterValueException(_inner) => _inner.fmt(f),
GetEnrollmentStatusErrorKind::MissingAuthenticationToken(_inner) => _inner.fmt(f),
GetEnrollmentStatusErrorKind::ServiceUnavailableException(_inner) => _inner.fmt(f),
GetEnrollmentStatusErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEnrollmentStatusErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEnrollmentStatusError {
fn code(&self) -> Option<&str> {
GetEnrollmentStatusError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEnrollmentStatusError {
pub fn new(kind: GetEnrollmentStatusErrorKind, 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: GetEnrollmentStatusErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEnrollmentStatusErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEnrollmentStatusErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetEnrollmentStatusError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEnrollmentStatusErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEnrollmentStatusErrorKind::InternalServerException(_inner) => Some(_inner),
GetEnrollmentStatusErrorKind::InvalidParameterValueException(_inner) => Some(_inner),
GetEnrollmentStatusErrorKind::MissingAuthenticationToken(_inner) => Some(_inner),
GetEnrollmentStatusErrorKind::ServiceUnavailableException(_inner) => Some(_inner),
GetEnrollmentStatusErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEnrollmentStatusErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEffectiveRecommendationPreferencesError {
pub kind: GetEffectiveRecommendationPreferencesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEffectiveRecommendationPreferencesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEffectiveRecommendationPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEffectiveRecommendationPreferencesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEffectiveRecommendationPreferencesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEffectiveRecommendationPreferencesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetEffectiveRecommendationPreferencesErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetEffectiveRecommendationPreferencesErrorKind::InvalidParameterValueException(
_inner,
) => _inner.fmt(f),
GetEffectiveRecommendationPreferencesErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetEffectiveRecommendationPreferencesErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
GetEffectiveRecommendationPreferencesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetEffectiveRecommendationPreferencesErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetEffectiveRecommendationPreferencesErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
GetEffectiveRecommendationPreferencesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEffectiveRecommendationPreferencesError {
fn code(&self) -> Option<&str> {
GetEffectiveRecommendationPreferencesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEffectiveRecommendationPreferencesError {
pub fn new(
kind: GetEffectiveRecommendationPreferencesErrorKind,
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: GetEffectiveRecommendationPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEffectiveRecommendationPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEffectiveRecommendationPreferencesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEffectiveRecommendationPreferencesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetEffectiveRecommendationPreferencesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetEffectiveRecommendationPreferencesErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetEffectiveRecommendationPreferencesErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEffectiveRecommendationPreferencesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetEffectiveRecommendationPreferencesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEffectiveRecommendationPreferencesErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetEffectiveRecommendationPreferencesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEffectiveRecommendationPreferencesErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
GetEffectiveRecommendationPreferencesErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetEffectiveRecommendationPreferencesErrorKind::InvalidParameterValueException(
_inner,
) => Some(_inner),
GetEffectiveRecommendationPreferencesErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
GetEffectiveRecommendationPreferencesErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
GetEffectiveRecommendationPreferencesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetEffectiveRecommendationPreferencesErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetEffectiveRecommendationPreferencesErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
GetEffectiveRecommendationPreferencesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetECSServiceRecommendationsError {
pub kind: GetECSServiceRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetECSServiceRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetECSServiceRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetECSServiceRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetECSServiceRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetECSServiceRecommendationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetECSServiceRecommendationsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetECSServiceRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
GetECSServiceRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetECSServiceRecommendationsErrorKind::OptInRequiredException(_inner) => _inner.fmt(f),
GetECSServiceRecommendationsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetECSServiceRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetECSServiceRecommendationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetECSServiceRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetECSServiceRecommendationsError {
fn code(&self) -> Option<&str> {
GetECSServiceRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetECSServiceRecommendationsError {
pub fn new(kind: GetECSServiceRecommendationsErrorKind, 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: GetECSServiceRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetECSServiceRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetECSServiceRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetECSServiceRecommendationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetECSServiceRecommendationsErrorKind::InternalServerException(_inner) => Some(_inner),
GetECSServiceRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
GetECSServiceRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
GetECSServiceRecommendationsErrorKind::OptInRequiredException(_inner) => Some(_inner),
GetECSServiceRecommendationsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetECSServiceRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetECSServiceRecommendationsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetECSServiceRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetECSServiceRecommendationProjectedMetricsError {
pub kind: GetECSServiceRecommendationProjectedMetricsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for GetECSServiceRecommendationProjectedMetricsError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetECSServiceRecommendationProjectedMetricsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetECSServiceRecommendationProjectedMetricsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetECSServiceRecommendationProjectedMetricsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetECSServiceRecommendationProjectedMetricsErrorKind::AccessDeniedException(_inner) =>
_inner.fmt(f)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::InternalServerException(_inner) =>
_inner.fmt(f)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::InvalidParameterValueException(_inner) =>
_inner.fmt(f)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::MissingAuthenticationToken(_inner) =>
_inner.fmt(f)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::OptInRequiredException(_inner) =>
_inner.fmt(f)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::ResourceNotFoundException(_inner) =>
_inner.fmt(f)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::ServiceUnavailableException(_inner) =>
_inner.fmt(f)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::ThrottlingException(_inner) =>
_inner.fmt(f)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for GetECSServiceRecommendationProjectedMetricsError
{
fn code(&self) -> Option<&str> {
GetECSServiceRecommendationProjectedMetricsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetECSServiceRecommendationProjectedMetricsError {
pub fn new(
kind: GetECSServiceRecommendationProjectedMetricsErrorKind,
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: GetECSServiceRecommendationProjectedMetricsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetECSServiceRecommendationProjectedMetricsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationProjectedMetricsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationProjectedMetricsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationProjectedMetricsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationProjectedMetricsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationProjectedMetricsErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationProjectedMetricsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationProjectedMetricsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetECSServiceRecommendationProjectedMetricsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetECSServiceRecommendationProjectedMetricsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetECSServiceRecommendationProjectedMetricsErrorKind::AccessDeniedException(_inner) =>
Some(_inner)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::InternalServerException(_inner) =>
Some(_inner)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::InvalidParameterValueException(_inner) =>
Some(_inner)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::MissingAuthenticationToken(_inner) =>
Some(_inner)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::OptInRequiredException(_inner) =>
Some(_inner)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::ResourceNotFoundException(_inner) =>
Some(_inner)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::ServiceUnavailableException(_inner) =>
Some(_inner)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::ThrottlingException(_inner) =>
Some(_inner)
,
GetECSServiceRecommendationProjectedMetricsErrorKind::Unhandled(_inner) => {
Some(_inner)
}
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEC2RecommendationProjectedMetricsError {
pub kind: GetEC2RecommendationProjectedMetricsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEC2RecommendationProjectedMetricsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEC2RecommendationProjectedMetricsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEC2RecommendationProjectedMetricsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEC2RecommendationProjectedMetricsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEC2RecommendationProjectedMetricsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetEC2RecommendationProjectedMetricsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetEC2RecommendationProjectedMetricsErrorKind::InvalidParameterValueException(
_inner,
) => _inner.fmt(f),
GetEC2RecommendationProjectedMetricsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetEC2RecommendationProjectedMetricsErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
GetEC2RecommendationProjectedMetricsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetEC2RecommendationProjectedMetricsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetEC2RecommendationProjectedMetricsErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
GetEC2RecommendationProjectedMetricsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEC2RecommendationProjectedMetricsError {
fn code(&self) -> Option<&str> {
GetEC2RecommendationProjectedMetricsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEC2RecommendationProjectedMetricsError {
pub fn new(
kind: GetEC2RecommendationProjectedMetricsErrorKind,
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: GetEC2RecommendationProjectedMetricsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEC2RecommendationProjectedMetricsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2RecommendationProjectedMetricsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2RecommendationProjectedMetricsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2RecommendationProjectedMetricsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetEC2RecommendationProjectedMetricsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2RecommendationProjectedMetricsErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2RecommendationProjectedMetricsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2RecommendationProjectedMetricsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2RecommendationProjectedMetricsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetEC2RecommendationProjectedMetricsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEC2RecommendationProjectedMetricsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
GetEC2RecommendationProjectedMetricsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetEC2RecommendationProjectedMetricsErrorKind::InvalidParameterValueException(
_inner,
) => Some(_inner),
GetEC2RecommendationProjectedMetricsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
GetEC2RecommendationProjectedMetricsErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
GetEC2RecommendationProjectedMetricsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetEC2RecommendationProjectedMetricsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetEC2RecommendationProjectedMetricsErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
GetEC2RecommendationProjectedMetricsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEC2InstanceRecommendationsError {
pub kind: GetEC2InstanceRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEC2InstanceRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEC2InstanceRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEC2InstanceRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEC2InstanceRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEC2InstanceRecommendationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEC2InstanceRecommendationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetEC2InstanceRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
GetEC2InstanceRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetEC2InstanceRecommendationsErrorKind::OptInRequiredException(_inner) => _inner.fmt(f),
GetEC2InstanceRecommendationsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetEC2InstanceRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetEC2InstanceRecommendationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEC2InstanceRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEC2InstanceRecommendationsError {
fn code(&self) -> Option<&str> {
GetEC2InstanceRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEC2InstanceRecommendationsError {
pub fn new(
kind: GetEC2InstanceRecommendationsErrorKind,
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: GetEC2InstanceRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEC2InstanceRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2InstanceRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2InstanceRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2InstanceRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetEC2InstanceRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2InstanceRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2InstanceRecommendationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2InstanceRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEC2InstanceRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetEC2InstanceRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEC2InstanceRecommendationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEC2InstanceRecommendationsErrorKind::InternalServerException(_inner) => Some(_inner),
GetEC2InstanceRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
GetEC2InstanceRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
GetEC2InstanceRecommendationsErrorKind::OptInRequiredException(_inner) => Some(_inner),
GetEC2InstanceRecommendationsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetEC2InstanceRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetEC2InstanceRecommendationsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEC2InstanceRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEBSVolumeRecommendationsError {
pub kind: GetEBSVolumeRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEBSVolumeRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEBSVolumeRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEBSVolumeRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEBSVolumeRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEBSVolumeRecommendationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetEBSVolumeRecommendationsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetEBSVolumeRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
GetEBSVolumeRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetEBSVolumeRecommendationsErrorKind::OptInRequiredException(_inner) => _inner.fmt(f),
GetEBSVolumeRecommendationsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetEBSVolumeRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetEBSVolumeRecommendationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetEBSVolumeRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEBSVolumeRecommendationsError {
fn code(&self) -> Option<&str> {
GetEBSVolumeRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEBSVolumeRecommendationsError {
pub fn new(kind: GetEBSVolumeRecommendationsErrorKind, 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: GetEBSVolumeRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEBSVolumeRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetEBSVolumeRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetEBSVolumeRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetEBSVolumeRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetEBSVolumeRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetEBSVolumeRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetEBSVolumeRecommendationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetEBSVolumeRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetEBSVolumeRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetEBSVolumeRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEBSVolumeRecommendationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetEBSVolumeRecommendationsErrorKind::InternalServerException(_inner) => Some(_inner),
GetEBSVolumeRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
GetEBSVolumeRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
GetEBSVolumeRecommendationsErrorKind::OptInRequiredException(_inner) => Some(_inner),
GetEBSVolumeRecommendationsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetEBSVolumeRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetEBSVolumeRecommendationsErrorKind::ThrottlingException(_inner) => Some(_inner),
GetEBSVolumeRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAutoScalingGroupRecommendationsError {
pub kind: GetAutoScalingGroupRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetAutoScalingGroupRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetAutoScalingGroupRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAutoScalingGroupRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetAutoScalingGroupRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAutoScalingGroupRecommendationsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
GetAutoScalingGroupRecommendationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
GetAutoScalingGroupRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
GetAutoScalingGroupRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
GetAutoScalingGroupRecommendationsErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
GetAutoScalingGroupRecommendationsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetAutoScalingGroupRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
GetAutoScalingGroupRecommendationsErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
GetAutoScalingGroupRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAutoScalingGroupRecommendationsError {
fn code(&self) -> Option<&str> {
GetAutoScalingGroupRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetAutoScalingGroupRecommendationsError {
pub fn new(
kind: GetAutoScalingGroupRecommendationsErrorKind,
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: GetAutoScalingGroupRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAutoScalingGroupRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
GetAutoScalingGroupRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetAutoScalingGroupRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
GetAutoScalingGroupRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
GetAutoScalingGroupRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
GetAutoScalingGroupRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetAutoScalingGroupRecommendationsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
GetAutoScalingGroupRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetAutoScalingGroupRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for GetAutoScalingGroupRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAutoScalingGroupRecommendationsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
GetAutoScalingGroupRecommendationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
GetAutoScalingGroupRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
GetAutoScalingGroupRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
GetAutoScalingGroupRecommendationsErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
GetAutoScalingGroupRecommendationsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
GetAutoScalingGroupRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
GetAutoScalingGroupRecommendationsErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
GetAutoScalingGroupRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExportLambdaFunctionRecommendationsError {
pub kind: ExportLambdaFunctionRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExportLambdaFunctionRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExportLambdaFunctionRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExportLambdaFunctionRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExportLambdaFunctionRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExportLambdaFunctionRecommendationsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ExportLambdaFunctionRecommendationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ExportLambdaFunctionRecommendationsErrorKind::InvalidParameterValueException(
_inner,
) => _inner.fmt(f),
ExportLambdaFunctionRecommendationsErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
ExportLambdaFunctionRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
ExportLambdaFunctionRecommendationsErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
ExportLambdaFunctionRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ExportLambdaFunctionRecommendationsErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ExportLambdaFunctionRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExportLambdaFunctionRecommendationsError {
fn code(&self) -> Option<&str> {
ExportLambdaFunctionRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExportLambdaFunctionRecommendationsError {
pub fn new(
kind: ExportLambdaFunctionRecommendationsErrorKind,
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: ExportLambdaFunctionRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExportLambdaFunctionRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ExportLambdaFunctionRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ExportLambdaFunctionRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ExportLambdaFunctionRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ExportLambdaFunctionRecommendationsErrorKind::LimitExceededException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
ExportLambdaFunctionRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
ExportLambdaFunctionRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ExportLambdaFunctionRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ExportLambdaFunctionRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ExportLambdaFunctionRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExportLambdaFunctionRecommendationsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ExportLambdaFunctionRecommendationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ExportLambdaFunctionRecommendationsErrorKind::InvalidParameterValueException(
_inner,
) => Some(_inner),
ExportLambdaFunctionRecommendationsErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
ExportLambdaFunctionRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
ExportLambdaFunctionRecommendationsErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
ExportLambdaFunctionRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
ExportLambdaFunctionRecommendationsErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ExportLambdaFunctionRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExportECSServiceRecommendationsError {
pub kind: ExportECSServiceRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExportECSServiceRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExportECSServiceRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExportECSServiceRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExportECSServiceRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExportECSServiceRecommendationsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ExportECSServiceRecommendationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ExportECSServiceRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
ExportECSServiceRecommendationsErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
ExportECSServiceRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
ExportECSServiceRecommendationsErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
ExportECSServiceRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ExportECSServiceRecommendationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ExportECSServiceRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExportECSServiceRecommendationsError {
fn code(&self) -> Option<&str> {
ExportECSServiceRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExportECSServiceRecommendationsError {
pub fn new(
kind: ExportECSServiceRecommendationsErrorKind,
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: ExportECSServiceRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExportECSServiceRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ExportECSServiceRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ExportECSServiceRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ExportECSServiceRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ExportECSServiceRecommendationsErrorKind::LimitExceededException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
ExportECSServiceRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
ExportECSServiceRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ExportECSServiceRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ExportECSServiceRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ExportECSServiceRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExportECSServiceRecommendationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ExportECSServiceRecommendationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ExportECSServiceRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
ExportECSServiceRecommendationsErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
ExportECSServiceRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
ExportECSServiceRecommendationsErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
ExportECSServiceRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
ExportECSServiceRecommendationsErrorKind::ThrottlingException(_inner) => Some(_inner),
ExportECSServiceRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExportEC2InstanceRecommendationsError {
pub kind: ExportEC2InstanceRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExportEC2InstanceRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExportEC2InstanceRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExportEC2InstanceRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExportEC2InstanceRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExportEC2InstanceRecommendationsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ExportEC2InstanceRecommendationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ExportEC2InstanceRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
ExportEC2InstanceRecommendationsErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
ExportEC2InstanceRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
ExportEC2InstanceRecommendationsErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
ExportEC2InstanceRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ExportEC2InstanceRecommendationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ExportEC2InstanceRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExportEC2InstanceRecommendationsError {
fn code(&self) -> Option<&str> {
ExportEC2InstanceRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExportEC2InstanceRecommendationsError {
pub fn new(
kind: ExportEC2InstanceRecommendationsErrorKind,
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: ExportEC2InstanceRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExportEC2InstanceRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ExportEC2InstanceRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ExportEC2InstanceRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ExportEC2InstanceRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ExportEC2InstanceRecommendationsErrorKind::LimitExceededException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
ExportEC2InstanceRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
ExportEC2InstanceRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ExportEC2InstanceRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ExportEC2InstanceRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ExportEC2InstanceRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExportEC2InstanceRecommendationsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ExportEC2InstanceRecommendationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ExportEC2InstanceRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
ExportEC2InstanceRecommendationsErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
ExportEC2InstanceRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
ExportEC2InstanceRecommendationsErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
ExportEC2InstanceRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
ExportEC2InstanceRecommendationsErrorKind::ThrottlingException(_inner) => Some(_inner),
ExportEC2InstanceRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExportEBSVolumeRecommendationsError {
pub kind: ExportEBSVolumeRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExportEBSVolumeRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExportEBSVolumeRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExportEBSVolumeRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExportEBSVolumeRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExportEBSVolumeRecommendationsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ExportEBSVolumeRecommendationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ExportEBSVolumeRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
ExportEBSVolumeRecommendationsErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
ExportEBSVolumeRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
ExportEBSVolumeRecommendationsErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
ExportEBSVolumeRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ExportEBSVolumeRecommendationsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ExportEBSVolumeRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExportEBSVolumeRecommendationsError {
fn code(&self) -> Option<&str> {
ExportEBSVolumeRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExportEBSVolumeRecommendationsError {
pub fn new(
kind: ExportEBSVolumeRecommendationsErrorKind,
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: ExportEBSVolumeRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExportEBSVolumeRecommendationsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ExportEBSVolumeRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ExportEBSVolumeRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ExportEBSVolumeRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ExportEBSVolumeRecommendationsErrorKind::LimitExceededException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
ExportEBSVolumeRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
ExportEBSVolumeRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ExportEBSVolumeRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ExportEBSVolumeRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ExportEBSVolumeRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExportEBSVolumeRecommendationsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ExportEBSVolumeRecommendationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ExportEBSVolumeRecommendationsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
ExportEBSVolumeRecommendationsErrorKind::LimitExceededException(_inner) => Some(_inner),
ExportEBSVolumeRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
ExportEBSVolumeRecommendationsErrorKind::OptInRequiredException(_inner) => Some(_inner),
ExportEBSVolumeRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
ExportEBSVolumeRecommendationsErrorKind::ThrottlingException(_inner) => Some(_inner),
ExportEBSVolumeRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ExportAutoScalingGroupRecommendationsError {
pub kind: ExportAutoScalingGroupRecommendationsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ExportAutoScalingGroupRecommendationsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ExportAutoScalingGroupRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ExportAutoScalingGroupRecommendationsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
LimitExceededException(crate::error::LimitExceededException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ExportAutoScalingGroupRecommendationsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ExportAutoScalingGroupRecommendationsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ExportAutoScalingGroupRecommendationsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ExportAutoScalingGroupRecommendationsErrorKind::InvalidParameterValueException(
_inner,
) => _inner.fmt(f),
ExportAutoScalingGroupRecommendationsErrorKind::LimitExceededException(_inner) => {
_inner.fmt(f)
}
ExportAutoScalingGroupRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
ExportAutoScalingGroupRecommendationsErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
ExportAutoScalingGroupRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
ExportAutoScalingGroupRecommendationsErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ExportAutoScalingGroupRecommendationsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ExportAutoScalingGroupRecommendationsError {
fn code(&self) -> Option<&str> {
ExportAutoScalingGroupRecommendationsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ExportAutoScalingGroupRecommendationsError {
pub fn new(
kind: ExportAutoScalingGroupRecommendationsErrorKind,
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: ExportAutoScalingGroupRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ExportAutoScalingGroupRecommendationsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
ExportAutoScalingGroupRecommendationsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ExportAutoScalingGroupRecommendationsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
ExportAutoScalingGroupRecommendationsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
ExportAutoScalingGroupRecommendationsErrorKind::LimitExceededException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
ExportAutoScalingGroupRecommendationsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
ExportAutoScalingGroupRecommendationsErrorKind::OptInRequiredException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
ExportAutoScalingGroupRecommendationsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ExportAutoScalingGroupRecommendationsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for ExportAutoScalingGroupRecommendationsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ExportAutoScalingGroupRecommendationsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ExportAutoScalingGroupRecommendationsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ExportAutoScalingGroupRecommendationsErrorKind::InvalidParameterValueException(
_inner,
) => Some(_inner),
ExportAutoScalingGroupRecommendationsErrorKind::LimitExceededException(_inner) => {
Some(_inner)
}
ExportAutoScalingGroupRecommendationsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
ExportAutoScalingGroupRecommendationsErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
ExportAutoScalingGroupRecommendationsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
ExportAutoScalingGroupRecommendationsErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ExportAutoScalingGroupRecommendationsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeRecommendationExportJobsError {
pub kind: DescribeRecommendationExportJobsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeRecommendationExportJobsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeRecommendationExportJobsErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeRecommendationExportJobsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeRecommendationExportJobsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeRecommendationExportJobsErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DescribeRecommendationExportJobsErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DescribeRecommendationExportJobsErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DescribeRecommendationExportJobsErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
DescribeRecommendationExportJobsErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
DescribeRecommendationExportJobsErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DescribeRecommendationExportJobsErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
DescribeRecommendationExportJobsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeRecommendationExportJobsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeRecommendationExportJobsError {
fn code(&self) -> Option<&str> {
DescribeRecommendationExportJobsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeRecommendationExportJobsError {
pub fn new(
kind: DescribeRecommendationExportJobsErrorKind,
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: DescribeRecommendationExportJobsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeRecommendationExportJobsErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRecommendationExportJobsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRecommendationExportJobsErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRecommendationExportJobsErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
DescribeRecommendationExportJobsErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRecommendationExportJobsErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRecommendationExportJobsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRecommendationExportJobsErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeRecommendationExportJobsErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DescribeRecommendationExportJobsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeRecommendationExportJobsErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
DescribeRecommendationExportJobsErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DescribeRecommendationExportJobsErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DescribeRecommendationExportJobsErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
DescribeRecommendationExportJobsErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
DescribeRecommendationExportJobsErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DescribeRecommendationExportJobsErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
DescribeRecommendationExportJobsErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeRecommendationExportJobsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteRecommendationPreferencesError {
pub kind: DeleteRecommendationPreferencesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteRecommendationPreferencesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteRecommendationPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteRecommendationPreferencesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
InvalidParameterValueException(crate::error::InvalidParameterValueException),
MissingAuthenticationToken(crate::error::MissingAuthenticationToken),
OptInRequiredException(crate::error::OptInRequiredException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ServiceUnavailableException(crate::error::ServiceUnavailableException),
ThrottlingException(crate::error::ThrottlingException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteRecommendationPreferencesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteRecommendationPreferencesErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
DeleteRecommendationPreferencesErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DeleteRecommendationPreferencesErrorKind::InvalidParameterValueException(_inner) => {
_inner.fmt(f)
}
DeleteRecommendationPreferencesErrorKind::MissingAuthenticationToken(_inner) => {
_inner.fmt(f)
}
DeleteRecommendationPreferencesErrorKind::OptInRequiredException(_inner) => {
_inner.fmt(f)
}
DeleteRecommendationPreferencesErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
DeleteRecommendationPreferencesErrorKind::ServiceUnavailableException(_inner) => {
_inner.fmt(f)
}
DeleteRecommendationPreferencesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteRecommendationPreferencesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteRecommendationPreferencesError {
fn code(&self) -> Option<&str> {
DeleteRecommendationPreferencesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteRecommendationPreferencesError {
pub fn new(
kind: DeleteRecommendationPreferencesErrorKind,
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: DeleteRecommendationPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteRecommendationPreferencesErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRecommendationPreferencesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRecommendationPreferencesErrorKind::InternalServerException(_)
)
}
pub fn is_invalid_parameter_value_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRecommendationPreferencesErrorKind::InvalidParameterValueException(_)
)
}
pub fn is_missing_authentication_token(&self) -> bool {
matches!(
&self.kind,
DeleteRecommendationPreferencesErrorKind::MissingAuthenticationToken(_)
)
}
pub fn is_opt_in_required_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRecommendationPreferencesErrorKind::OptInRequiredException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRecommendationPreferencesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_service_unavailable_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRecommendationPreferencesErrorKind::ServiceUnavailableException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteRecommendationPreferencesErrorKind::ThrottlingException(_)
)
}
}
impl std::error::Error for DeleteRecommendationPreferencesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteRecommendationPreferencesErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteRecommendationPreferencesErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DeleteRecommendationPreferencesErrorKind::InvalidParameterValueException(_inner) => {
Some(_inner)
}
DeleteRecommendationPreferencesErrorKind::MissingAuthenticationToken(_inner) => {
Some(_inner)
}
DeleteRecommendationPreferencesErrorKind::OptInRequiredException(_inner) => {
Some(_inner)
}
DeleteRecommendationPreferencesErrorKind::ResourceNotFoundException(_inner) => {
Some(_inner)
}
DeleteRecommendationPreferencesErrorKind::ServiceUnavailableException(_inner) => {
Some(_inner)
}
DeleteRecommendationPreferencesErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteRecommendationPreferencesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[derive(Debug)]
pub struct Unhandled {
source: Box<dyn std::error::Error + Send + Sync + 'static>,
}
impl Unhandled {
#[allow(unused)]
pub(crate) fn new(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self { source }
}
}
impl std::fmt::Display for Unhandled {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "unhandled error")
}
}
impl std::error::Error for Unhandled {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
Some(self.source.as_ref() as _)
}
}