#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateConnectivityInfoError {
pub kind: UpdateConnectivityInfoErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateConnectivityInfoError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateConnectivityInfoErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateConnectivityInfoErrorKind {
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateConnectivityInfoError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateConnectivityInfoErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UpdateConnectivityInfoErrorKind::ValidationException(_inner) => _inner.fmt(f),
UpdateConnectivityInfoErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateConnectivityInfoError {
fn code(&self) -> Option<&str> {
UpdateConnectivityInfoError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateConnectivityInfoError {
pub fn new(kind: UpdateConnectivityInfoErrorKind, 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: UpdateConnectivityInfoErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateConnectivityInfoErrorKind::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_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectivityInfoErrorKind::InternalServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
UpdateConnectivityInfoErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for UpdateConnectivityInfoError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateConnectivityInfoErrorKind::InternalServerException(_inner) => Some(_inner),
UpdateConnectivityInfoErrorKind::ValidationException(_inner) => Some(_inner),
UpdateConnectivityInfoErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub reason: std::option::Option<crate::model::ValidationExceptionReason>,
#[doc(hidden)]
pub fields: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl ValidationException {
pub fn reason(&self) -> std::option::Option<&crate::model::ValidationExceptionReason> {
self.reason.as_ref()
}
pub fn fields(&self) -> std::option::Option<&[crate::model::ValidationExceptionField]> {
self.fields.as_deref()
}
}
impl ValidationException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationException {}
pub mod validation_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) reason: std::option::Option<crate::model::ValidationExceptionReason>,
pub(crate) fields:
std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
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 reason(mut self, input: crate::model::ValidationExceptionReason) -> Self {
self.reason = Some(input);
self
}
pub fn set_reason(
mut self,
input: std::option::Option<crate::model::ValidationExceptionReason>,
) -> Self {
self.reason = input;
self
}
pub fn fields(mut self, input: crate::model::ValidationExceptionField) -> Self {
let mut v = self.fields.unwrap_or_default();
v.push(input);
self.fields = Some(v);
self
}
pub fn set_fields(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
) -> Self {
self.fields = input;
self
}
pub fn build(self) -> crate::error::ValidationException {
crate::error::ValidationException {
message: self.message,
reason: self.reason,
fields: self.fields,
}
}
}
}
impl ValidationException {
pub fn builder() -> crate::error::validation_exception::Builder {
crate::error::validation_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalServerException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub retry_after_seconds: i32,
}
impl InternalServerException {
pub fn retry_after_seconds(&self) -> i32 {
self.retry_after_seconds
}
}
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_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
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>,
pub(crate) retry_after_seconds: std::option::Option<i32>,
}
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 retry_after_seconds(mut self, input: i32) -> Self {
self.retry_after_seconds = Some(input);
self
}
pub fn set_retry_after_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.retry_after_seconds = input;
self
}
pub fn build(self) -> crate::error::InternalServerException {
crate::error::InternalServerException {
message: self.message,
retry_after_seconds: self.retry_after_seconds.unwrap_or_default(),
}
}
}
}
impl InternalServerException {
pub fn builder() -> crate::error::internal_server_exception::Builder {
crate::error::internal_server_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UntagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UntagResourceError {
fn code(&self) -> Option<&str> {
UntagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UntagResourceError {
pub fn new(kind: UntagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ValidationException(_inner) => Some(_inner),
UntagResourceErrorKind::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>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
impl ResourceNotFoundException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundException")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundException {}
pub mod resource_not_found_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: 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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
}
}
}
}
impl ResourceNotFoundException {
pub fn builder() -> crate::error::resource_not_found_exception::Builder {
crate::error::resource_not_found_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct TagResourceError {
pub kind: TagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for TagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum TagResourceErrorKind {
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for TagResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
TagResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
TagResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for TagResourceError {
fn code(&self) -> Option<&str> {
TagResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl TagResourceError {
pub fn new(kind: TagResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: TagResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InternalServerException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ValidationException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InternalServerException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ValidationException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ResolveComponentCandidatesError {
pub kind: ResolveComponentCandidatesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ResolveComponentCandidatesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ResolveComponentCandidatesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ResolveComponentCandidatesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ResolveComponentCandidatesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ResolveComponentCandidatesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ResolveComponentCandidatesErrorKind::ConflictException(_inner) => _inner.fmt(f),
ResolveComponentCandidatesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ResolveComponentCandidatesErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ResolveComponentCandidatesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ResolveComponentCandidatesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ResolveComponentCandidatesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ResolveComponentCandidatesError {
fn code(&self) -> Option<&str> {
ResolveComponentCandidatesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ResolveComponentCandidatesError {
pub fn new(kind: ResolveComponentCandidatesErrorKind, 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: ResolveComponentCandidatesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ResolveComponentCandidatesErrorKind::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,
ResolveComponentCandidatesErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
ResolveComponentCandidatesErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ResolveComponentCandidatesErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ResolveComponentCandidatesErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ResolveComponentCandidatesErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ResolveComponentCandidatesErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ResolveComponentCandidatesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ResolveComponentCandidatesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ResolveComponentCandidatesErrorKind::ConflictException(_inner) => Some(_inner),
ResolveComponentCandidatesErrorKind::InternalServerException(_inner) => Some(_inner),
ResolveComponentCandidatesErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ResolveComponentCandidatesErrorKind::ThrottlingException(_inner) => Some(_inner),
ResolveComponentCandidatesErrorKind::ValidationException(_inner) => Some(_inner),
ResolveComponentCandidatesErrorKind::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>,
#[doc(hidden)]
pub quota_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub retry_after_seconds: i32,
}
impl ThrottlingException {
pub fn quota_code(&self) -> std::option::Option<&str> {
self.quota_code.as_deref()
}
pub fn service_code(&self) -> std::option::Option<&str> {
self.service_code.as_deref()
}
pub fn retry_after_seconds(&self) -> i32 {
self.retry_after_seconds
}
}
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_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
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>,
pub(crate) quota_code: std::option::Option<std::string::String>,
pub(crate) service_code: std::option::Option<std::string::String>,
pub(crate) retry_after_seconds: std::option::Option<i32>,
}
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 quota_code(mut self, input: impl Into<std::string::String>) -> Self {
self.quota_code = Some(input.into());
self
}
pub fn set_quota_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.quota_code = input;
self
}
pub fn service_code(mut self, input: impl Into<std::string::String>) -> Self {
self.service_code = Some(input.into());
self
}
pub fn set_service_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_code = input;
self
}
pub fn retry_after_seconds(mut self, input: i32) -> Self {
self.retry_after_seconds = Some(input);
self
}
pub fn set_retry_after_seconds(mut self, input: std::option::Option<i32>) -> Self {
self.retry_after_seconds = input;
self
}
pub fn build(self) -> crate::error::ThrottlingException {
crate::error::ThrottlingException {
message: self.message,
quota_code: self.quota_code,
service_code: self.service_code,
retry_after_seconds: self.retry_after_seconds.unwrap_or_default(),
}
}
}
}
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 ConflictException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
}
impl ConflictException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
}
impl ConflictException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ConflictException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ConflictException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for ConflictException {}
pub mod conflict_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: 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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn build(self) -> crate::error::ConflictException {
crate::error::ConflictException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
}
}
}
}
impl ConflictException {
pub fn builder() -> crate::error::conflict_exception::Builder {
crate::error::conflict_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl AccessDeniedException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedException {}
pub mod access_denied_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedException {
crate::error::AccessDeniedException {
message: self.message,
}
}
}
}
impl AccessDeniedException {
pub fn builder() -> crate::error::access_denied_exception::Builder {
crate::error::access_denied_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListTagsForResourceError {
fn code(&self) -> Option<&str> {
ListTagsForResourceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListTagsForResourceError {
pub fn new(kind: ListTagsForResourceErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InternalServerException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ValidationException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListInstalledComponentsError {
pub kind: ListInstalledComponentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListInstalledComponentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListInstalledComponentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListInstalledComponentsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListInstalledComponentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListInstalledComponentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListInstalledComponentsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListInstalledComponentsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListInstalledComponentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListInstalledComponentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListInstalledComponentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListInstalledComponentsError {
fn code(&self) -> Option<&str> {
ListInstalledComponentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListInstalledComponentsError {
pub fn new(kind: ListInstalledComponentsErrorKind, 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: ListInstalledComponentsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListInstalledComponentsErrorKind::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,
ListInstalledComponentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListInstalledComponentsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListInstalledComponentsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListInstalledComponentsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListInstalledComponentsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListInstalledComponentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListInstalledComponentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListInstalledComponentsErrorKind::InternalServerException(_inner) => Some(_inner),
ListInstalledComponentsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListInstalledComponentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListInstalledComponentsErrorKind::ValidationException(_inner) => Some(_inner),
ListInstalledComponentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListEffectiveDeploymentsError {
pub kind: ListEffectiveDeploymentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListEffectiveDeploymentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListEffectiveDeploymentsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListEffectiveDeploymentsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListEffectiveDeploymentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListEffectiveDeploymentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListEffectiveDeploymentsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListEffectiveDeploymentsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListEffectiveDeploymentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListEffectiveDeploymentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListEffectiveDeploymentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListEffectiveDeploymentsError {
fn code(&self) -> Option<&str> {
ListEffectiveDeploymentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListEffectiveDeploymentsError {
pub fn new(kind: ListEffectiveDeploymentsErrorKind, 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: ListEffectiveDeploymentsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListEffectiveDeploymentsErrorKind::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,
ListEffectiveDeploymentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListEffectiveDeploymentsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListEffectiveDeploymentsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListEffectiveDeploymentsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListEffectiveDeploymentsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListEffectiveDeploymentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListEffectiveDeploymentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListEffectiveDeploymentsErrorKind::InternalServerException(_inner) => Some(_inner),
ListEffectiveDeploymentsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListEffectiveDeploymentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListEffectiveDeploymentsErrorKind::ValidationException(_inner) => Some(_inner),
ListEffectiveDeploymentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListDeploymentsError {
pub kind: ListDeploymentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListDeploymentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListDeploymentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListDeploymentsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListDeploymentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListDeploymentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListDeploymentsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListDeploymentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListDeploymentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListDeploymentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListDeploymentsError {
fn code(&self) -> Option<&str> {
ListDeploymentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListDeploymentsError {
pub fn new(kind: ListDeploymentsErrorKind, 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: ListDeploymentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListDeploymentsErrorKind::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,
ListDeploymentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListDeploymentsErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListDeploymentsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListDeploymentsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListDeploymentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListDeploymentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListDeploymentsErrorKind::InternalServerException(_inner) => Some(_inner),
ListDeploymentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListDeploymentsErrorKind::ValidationException(_inner) => Some(_inner),
ListDeploymentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListCoreDevicesError {
pub kind: ListCoreDevicesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListCoreDevicesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListCoreDevicesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListCoreDevicesErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListCoreDevicesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListCoreDevicesErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListCoreDevicesErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListCoreDevicesErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListCoreDevicesErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListCoreDevicesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListCoreDevicesError {
fn code(&self) -> Option<&str> {
ListCoreDevicesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListCoreDevicesError {
pub fn new(kind: ListCoreDevicesErrorKind, 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: ListCoreDevicesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListCoreDevicesErrorKind::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,
ListCoreDevicesErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListCoreDevicesErrorKind::InternalServerException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListCoreDevicesErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListCoreDevicesErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListCoreDevicesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListCoreDevicesErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListCoreDevicesErrorKind::InternalServerException(_inner) => Some(_inner),
ListCoreDevicesErrorKind::ThrottlingException(_inner) => Some(_inner),
ListCoreDevicesErrorKind::ValidationException(_inner) => Some(_inner),
ListCoreDevicesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListComponentVersionsError {
pub kind: ListComponentVersionsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListComponentVersionsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListComponentVersionsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListComponentVersionsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListComponentVersionsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListComponentVersionsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListComponentVersionsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListComponentVersionsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListComponentVersionsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListComponentVersionsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListComponentVersionsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListComponentVersionsError {
fn code(&self) -> Option<&str> {
ListComponentVersionsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListComponentVersionsError {
pub fn new(kind: ListComponentVersionsErrorKind, 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: ListComponentVersionsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListComponentVersionsErrorKind::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,
ListComponentVersionsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentVersionsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentVersionsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentVersionsErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentVersionsErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListComponentVersionsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListComponentVersionsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListComponentVersionsErrorKind::InternalServerException(_inner) => Some(_inner),
ListComponentVersionsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListComponentVersionsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListComponentVersionsErrorKind::ValidationException(_inner) => Some(_inner),
ListComponentVersionsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListComponentsError {
pub kind: ListComponentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListComponentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListComponentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListComponentsErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListComponentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListComponentsErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::InternalServerException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::ValidationException(_inner) => _inner.fmt(f),
ListComponentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListComponentsError {
fn code(&self) -> Option<&str> {
ListComponentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListComponentsError {
pub fn new(kind: ListComponentsErrorKind, 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: ListComponentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListComponentsErrorKind::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,
ListComponentsErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentsErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListComponentsErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, ListComponentsErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, ListComponentsErrorKind::ValidationException(_))
}
}
impl std::error::Error for ListComponentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListComponentsErrorKind::AccessDeniedException(_inner) => Some(_inner),
ListComponentsErrorKind::InternalServerException(_inner) => Some(_inner),
ListComponentsErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListComponentsErrorKind::ThrottlingException(_inner) => Some(_inner),
ListComponentsErrorKind::ValidationException(_inner) => Some(_inner),
ListComponentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListClientDevicesAssociatedWithCoreDeviceError {
pub kind: ListClientDevicesAssociatedWithCoreDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for ListClientDevicesAssociatedWithCoreDeviceError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListClientDevicesAssociatedWithCoreDeviceErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListClientDevicesAssociatedWithCoreDeviceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListClientDevicesAssociatedWithCoreDeviceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListClientDevicesAssociatedWithCoreDeviceErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
ListClientDevicesAssociatedWithCoreDeviceErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
ListClientDevicesAssociatedWithCoreDeviceErrorKind::ResourceNotFoundException(
_inner,
) => _inner.fmt(f),
ListClientDevicesAssociatedWithCoreDeviceErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
ListClientDevicesAssociatedWithCoreDeviceErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
ListClientDevicesAssociatedWithCoreDeviceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListClientDevicesAssociatedWithCoreDeviceError {
fn code(&self) -> Option<&str> {
ListClientDevicesAssociatedWithCoreDeviceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListClientDevicesAssociatedWithCoreDeviceError {
pub fn new(
kind: ListClientDevicesAssociatedWithCoreDeviceErrorKind,
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: ListClientDevicesAssociatedWithCoreDeviceErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListClientDevicesAssociatedWithCoreDeviceErrorKind::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,
ListClientDevicesAssociatedWithCoreDeviceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
ListClientDevicesAssociatedWithCoreDeviceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListClientDevicesAssociatedWithCoreDeviceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
ListClientDevicesAssociatedWithCoreDeviceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
ListClientDevicesAssociatedWithCoreDeviceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for ListClientDevicesAssociatedWithCoreDeviceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListClientDevicesAssociatedWithCoreDeviceErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
ListClientDevicesAssociatedWithCoreDeviceErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
ListClientDevicesAssociatedWithCoreDeviceErrorKind::ResourceNotFoundException(
_inner,
) => Some(_inner),
ListClientDevicesAssociatedWithCoreDeviceErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
ListClientDevicesAssociatedWithCoreDeviceErrorKind::ValidationException(_inner) => {
Some(_inner)
}
ListClientDevicesAssociatedWithCoreDeviceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetServiceRoleForAccountError {
pub kind: GetServiceRoleForAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetServiceRoleForAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetServiceRoleForAccountErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetServiceRoleForAccountErrorKind {
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetServiceRoleForAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetServiceRoleForAccountErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetServiceRoleForAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetServiceRoleForAccountError {
fn code(&self) -> Option<&str> {
GetServiceRoleForAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetServiceRoleForAccountError {
pub fn new(kind: GetServiceRoleForAccountErrorKind, 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: GetServiceRoleForAccountErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetServiceRoleForAccountErrorKind::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_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceRoleForAccountErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for GetServiceRoleForAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetServiceRoleForAccountErrorKind::InternalServerException(_inner) => Some(_inner),
GetServiceRoleForAccountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetDeploymentError {
pub kind: GetDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetDeploymentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetDeploymentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetDeploymentError {
fn code(&self) -> Option<&str> {
GetDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetDeploymentError {
pub fn new(kind: GetDeploymentErrorKind, 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: GetDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetDeploymentErrorKind::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, GetDeploymentErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetDeploymentErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetDeploymentErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetDeploymentErrorKind::InternalServerException(_inner) => Some(_inner),
GetDeploymentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
GetDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
GetDeploymentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetCoreDeviceError {
pub kind: GetCoreDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetCoreDeviceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetCoreDeviceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetCoreDeviceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetCoreDeviceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetCoreDeviceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetCoreDeviceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetCoreDeviceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetCoreDeviceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetCoreDeviceErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetCoreDeviceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetCoreDeviceError {
fn code(&self) -> Option<&str> {
GetCoreDeviceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetCoreDeviceError {
pub fn new(kind: GetCoreDeviceErrorKind, 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: GetCoreDeviceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetCoreDeviceErrorKind::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, GetCoreDeviceErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreDeviceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetCoreDeviceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetCoreDeviceErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetCoreDeviceErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetCoreDeviceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetCoreDeviceErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetCoreDeviceErrorKind::InternalServerException(_inner) => Some(_inner),
GetCoreDeviceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetCoreDeviceErrorKind::ThrottlingException(_inner) => Some(_inner),
GetCoreDeviceErrorKind::ValidationException(_inner) => Some(_inner),
GetCoreDeviceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetConnectivityInfoError {
pub kind: GetConnectivityInfoErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetConnectivityInfoError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetConnectivityInfoErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetConnectivityInfoErrorKind {
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetConnectivityInfoError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetConnectivityInfoErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetConnectivityInfoErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetConnectivityInfoErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetConnectivityInfoError {
fn code(&self) -> Option<&str> {
GetConnectivityInfoError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetConnectivityInfoError {
pub fn new(kind: GetConnectivityInfoErrorKind, 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: GetConnectivityInfoErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetConnectivityInfoErrorKind::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_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectivityInfoErrorKind::InternalServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetConnectivityInfoErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetConnectivityInfoError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetConnectivityInfoErrorKind::InternalServerException(_inner) => Some(_inner),
GetConnectivityInfoErrorKind::ValidationException(_inner) => Some(_inner),
GetConnectivityInfoErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetComponentVersionArtifactError {
pub kind: GetComponentVersionArtifactErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetComponentVersionArtifactError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetComponentVersionArtifactErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetComponentVersionArtifactErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetComponentVersionArtifactError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetComponentVersionArtifactErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetComponentVersionArtifactErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetComponentVersionArtifactErrorKind::ResourceNotFoundException(_inner) => {
_inner.fmt(f)
}
GetComponentVersionArtifactErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetComponentVersionArtifactErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetComponentVersionArtifactErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetComponentVersionArtifactError {
fn code(&self) -> Option<&str> {
GetComponentVersionArtifactError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetComponentVersionArtifactError {
pub fn new(kind: GetComponentVersionArtifactErrorKind, 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: GetComponentVersionArtifactErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetComponentVersionArtifactErrorKind::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,
GetComponentVersionArtifactErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentVersionArtifactErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentVersionArtifactErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentVersionArtifactErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentVersionArtifactErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for GetComponentVersionArtifactError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetComponentVersionArtifactErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetComponentVersionArtifactErrorKind::InternalServerException(_inner) => Some(_inner),
GetComponentVersionArtifactErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetComponentVersionArtifactErrorKind::ThrottlingException(_inner) => Some(_inner),
GetComponentVersionArtifactErrorKind::ValidationException(_inner) => Some(_inner),
GetComponentVersionArtifactErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetComponentError {
pub kind: GetComponentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetComponentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetComponentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetComponentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetComponentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetComponentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
GetComponentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
GetComponentErrorKind::ValidationException(_inner) => _inner.fmt(f),
GetComponentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetComponentError {
fn code(&self) -> Option<&str> {
GetComponentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetComponentError {
pub fn new(kind: GetComponentErrorKind, 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: GetComponentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetComponentErrorKind::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, GetComponentErrorKind::AccessDeniedException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
GetComponentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, GetComponentErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, GetComponentErrorKind::ValidationException(_))
}
}
impl std::error::Error for GetComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetComponentErrorKind::AccessDeniedException(_inner) => Some(_inner),
GetComponentErrorKind::InternalServerException(_inner) => Some(_inner),
GetComponentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
GetComponentErrorKind::ThrottlingException(_inner) => Some(_inner),
GetComponentErrorKind::ValidationException(_inner) => Some(_inner),
GetComponentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DisassociateServiceRoleFromAccountError {
pub kind: DisassociateServiceRoleFromAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DisassociateServiceRoleFromAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DisassociateServiceRoleFromAccountErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DisassociateServiceRoleFromAccountErrorKind {
InternalServerException(crate::error::InternalServerException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DisassociateServiceRoleFromAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DisassociateServiceRoleFromAccountErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
DisassociateServiceRoleFromAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DisassociateServiceRoleFromAccountError {
fn code(&self) -> Option<&str> {
DisassociateServiceRoleFromAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DisassociateServiceRoleFromAccountError {
pub fn new(
kind: DisassociateServiceRoleFromAccountErrorKind,
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: DisassociateServiceRoleFromAccountErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DisassociateServiceRoleFromAccountErrorKind::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_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DisassociateServiceRoleFromAccountErrorKind::InternalServerException(_)
)
}
}
impl std::error::Error for DisassociateServiceRoleFromAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DisassociateServiceRoleFromAccountErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
DisassociateServiceRoleFromAccountErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DescribeComponentError {
pub kind: DescribeComponentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DescribeComponentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DescribeComponentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DescribeComponentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DescribeComponentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DescribeComponentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DescribeComponentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DescribeComponentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DescribeComponentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DescribeComponentErrorKind::ValidationException(_inner) => _inner.fmt(f),
DescribeComponentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DescribeComponentError {
fn code(&self) -> Option<&str> {
DescribeComponentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DescribeComponentError {
pub fn new(kind: DescribeComponentErrorKind, 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: DescribeComponentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DescribeComponentErrorKind::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,
DescribeComponentErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DescribeComponentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DescribeComponentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DescribeComponentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DescribeComponentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DescribeComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DescribeComponentErrorKind::AccessDeniedException(_inner) => Some(_inner),
DescribeComponentErrorKind::InternalServerException(_inner) => Some(_inner),
DescribeComponentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DescribeComponentErrorKind::ThrottlingException(_inner) => Some(_inner),
DescribeComponentErrorKind::ValidationException(_inner) => Some(_inner),
DescribeComponentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteDeploymentError {
pub kind: DeleteDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteDeploymentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteDeploymentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteDeploymentErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteDeploymentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteDeploymentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteDeploymentError {
fn code(&self) -> Option<&str> {
DeleteDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteDeploymentError {
pub fn new(kind: DeleteDeploymentErrorKind, 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: DeleteDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteDeploymentErrorKind::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,
DeleteDeploymentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteDeploymentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDeploymentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteDeploymentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteDeploymentErrorKind::ConflictException(_inner) => Some(_inner),
DeleteDeploymentErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteDeploymentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
DeleteDeploymentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteCoreDeviceError {
pub kind: DeleteCoreDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteCoreDeviceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteCoreDeviceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteCoreDeviceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteCoreDeviceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteCoreDeviceErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteCoreDeviceErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteCoreDeviceErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteCoreDeviceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteCoreDeviceErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteCoreDeviceErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteCoreDeviceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteCoreDeviceError {
fn code(&self) -> Option<&str> {
DeleteCoreDeviceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteCoreDeviceError {
pub fn new(kind: DeleteCoreDeviceErrorKind, 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: DeleteCoreDeviceErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteCoreDeviceErrorKind::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,
DeleteCoreDeviceErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteCoreDeviceErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreDeviceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreDeviceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreDeviceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
DeleteCoreDeviceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for DeleteCoreDeviceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteCoreDeviceErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteCoreDeviceErrorKind::ConflictException(_inner) => Some(_inner),
DeleteCoreDeviceErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteCoreDeviceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteCoreDeviceErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteCoreDeviceErrorKind::ValidationException(_inner) => Some(_inner),
DeleteCoreDeviceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteComponentError {
pub kind: DeleteComponentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteComponentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteComponentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteComponentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteComponentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteComponentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ConflictException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::ValidationException(_inner) => _inner.fmt(f),
DeleteComponentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteComponentError {
fn code(&self) -> Option<&str> {
DeleteComponentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteComponentError {
pub fn new(kind: DeleteComponentErrorKind, 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: DeleteComponentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteComponentErrorKind::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,
DeleteComponentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, DeleteComponentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
DeleteComponentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
DeleteComponentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(&self.kind, DeleteComponentErrorKind::ThrottlingException(_))
}
pub fn is_validation_exception(&self) -> bool {
matches!(&self.kind, DeleteComponentErrorKind::ValidationException(_))
}
}
impl std::error::Error for DeleteComponentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteComponentErrorKind::AccessDeniedException(_inner) => Some(_inner),
DeleteComponentErrorKind::ConflictException(_inner) => Some(_inner),
DeleteComponentErrorKind::InternalServerException(_inner) => Some(_inner),
DeleteComponentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
DeleteComponentErrorKind::ThrottlingException(_inner) => Some(_inner),
DeleteComponentErrorKind::ValidationException(_inner) => Some(_inner),
DeleteComponentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateDeploymentError {
pub kind: CreateDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateDeploymentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
RequestAlreadyInProgressException(crate::error::RequestAlreadyInProgressException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateDeploymentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::RequestAlreadyInProgressException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateDeploymentError {
fn code(&self) -> Option<&str> {
CreateDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateDeploymentError {
pub fn new(kind: CreateDeploymentErrorKind, 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: CreateDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateDeploymentErrorKind::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,
CreateDeploymentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CreateDeploymentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_request_already_in_progress_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::RequestAlreadyInProgressException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateDeploymentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateDeploymentErrorKind::ConflictException(_inner) => Some(_inner),
CreateDeploymentErrorKind::InternalServerException(_inner) => Some(_inner),
CreateDeploymentErrorKind::RequestAlreadyInProgressException(_inner) => Some(_inner),
CreateDeploymentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CreateDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
CreateDeploymentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RequestAlreadyInProgressException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RequestAlreadyInProgressException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RequestAlreadyInProgressException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RequestAlreadyInProgressException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for RequestAlreadyInProgressException {}
pub mod request_already_in_progress_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::RequestAlreadyInProgressException {
crate::error::RequestAlreadyInProgressException {
message: self.message,
}
}
}
}
impl RequestAlreadyInProgressException {
pub fn builder() -> crate::error::request_already_in_progress_exception::Builder {
crate::error::request_already_in_progress_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateComponentVersionError {
pub kind: CreateComponentVersionErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateComponentVersionError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateComponentVersionErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateComponentVersionErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
RequestAlreadyInProgressException(crate::error::RequestAlreadyInProgressException),
ServiceQuotaExceededException(crate::error::ServiceQuotaExceededException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateComponentVersionError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateComponentVersionErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CreateComponentVersionErrorKind::ConflictException(_inner) => _inner.fmt(f),
CreateComponentVersionErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CreateComponentVersionErrorKind::RequestAlreadyInProgressException(_inner) => {
_inner.fmt(f)
}
CreateComponentVersionErrorKind::ServiceQuotaExceededException(_inner) => _inner.fmt(f),
CreateComponentVersionErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CreateComponentVersionErrorKind::ValidationException(_inner) => _inner.fmt(f),
CreateComponentVersionErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateComponentVersionError {
fn code(&self) -> Option<&str> {
CreateComponentVersionError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateComponentVersionError {
pub fn new(kind: CreateComponentVersionErrorKind, 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: CreateComponentVersionErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateComponentVersionErrorKind::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,
CreateComponentVersionErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentVersionErrorKind::ConflictException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentVersionErrorKind::InternalServerException(_)
)
}
pub fn is_request_already_in_progress_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentVersionErrorKind::RequestAlreadyInProgressException(_)
)
}
pub fn is_service_quota_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentVersionErrorKind::ServiceQuotaExceededException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentVersionErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CreateComponentVersionErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CreateComponentVersionError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateComponentVersionErrorKind::AccessDeniedException(_inner) => Some(_inner),
CreateComponentVersionErrorKind::ConflictException(_inner) => Some(_inner),
CreateComponentVersionErrorKind::InternalServerException(_inner) => Some(_inner),
CreateComponentVersionErrorKind::RequestAlreadyInProgressException(_inner) => {
Some(_inner)
}
CreateComponentVersionErrorKind::ServiceQuotaExceededException(_inner) => Some(_inner),
CreateComponentVersionErrorKind::ThrottlingException(_inner) => Some(_inner),
CreateComponentVersionErrorKind::ValidationException(_inner) => Some(_inner),
CreateComponentVersionErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceQuotaExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub resource_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub quota_code: std::option::Option<std::string::String>,
#[doc(hidden)]
pub service_code: std::option::Option<std::string::String>,
}
impl ServiceQuotaExceededException {
pub fn resource_id(&self) -> std::option::Option<&str> {
self.resource_id.as_deref()
}
pub fn resource_type(&self) -> std::option::Option<&str> {
self.resource_type.as_deref()
}
pub fn quota_code(&self) -> std::option::Option<&str> {
self.quota_code.as_deref()
}
pub fn service_code(&self) -> std::option::Option<&str> {
self.service_code.as_deref()
}
}
impl ServiceQuotaExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceQuotaExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceQuotaExceededException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceQuotaExceededException {}
pub mod service_quota_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
pub(crate) resource_id: std::option::Option<std::string::String>,
pub(crate) resource_type: std::option::Option<std::string::String>,
pub(crate) quota_code: std::option::Option<std::string::String>,
pub(crate) service_code: 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 resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_id = Some(input.into());
self
}
pub fn set_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.resource_id = input;
self
}
pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_type = Some(input.into());
self
}
pub fn set_resource_type(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_type = input;
self
}
pub fn quota_code(mut self, input: impl Into<std::string::String>) -> Self {
self.quota_code = Some(input.into());
self
}
pub fn set_quota_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.quota_code = input;
self
}
pub fn service_code(mut self, input: impl Into<std::string::String>) -> Self {
self.service_code = Some(input.into());
self
}
pub fn set_service_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.service_code = input;
self
}
pub fn build(self) -> crate::error::ServiceQuotaExceededException {
crate::error::ServiceQuotaExceededException {
message: self.message,
resource_id: self.resource_id,
resource_type: self.resource_type,
quota_code: self.quota_code,
service_code: self.service_code,
}
}
}
}
impl ServiceQuotaExceededException {
pub fn builder() -> crate::error::service_quota_exceeded_exception::Builder {
crate::error::service_quota_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CancelDeploymentError {
pub kind: CancelDeploymentErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CancelDeploymentError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CancelDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CancelDeploymentErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
ConflictException(crate::error::ConflictException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CancelDeploymentError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CancelDeploymentErrorKind::AccessDeniedException(_inner) => _inner.fmt(f),
CancelDeploymentErrorKind::ConflictException(_inner) => _inner.fmt(f),
CancelDeploymentErrorKind::InternalServerException(_inner) => _inner.fmt(f),
CancelDeploymentErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
CancelDeploymentErrorKind::ThrottlingException(_inner) => _inner.fmt(f),
CancelDeploymentErrorKind::ValidationException(_inner) => _inner.fmt(f),
CancelDeploymentErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CancelDeploymentError {
fn code(&self) -> Option<&str> {
CancelDeploymentError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CancelDeploymentError {
pub fn new(kind: CancelDeploymentErrorKind, 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: CancelDeploymentErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CancelDeploymentErrorKind::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,
CancelDeploymentErrorKind::AccessDeniedException(_)
)
}
pub fn is_conflict_exception(&self) -> bool {
matches!(&self.kind, CancelDeploymentErrorKind::ConflictException(_))
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
CancelDeploymentErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
CancelDeploymentErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
CancelDeploymentErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
CancelDeploymentErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for CancelDeploymentError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CancelDeploymentErrorKind::AccessDeniedException(_inner) => Some(_inner),
CancelDeploymentErrorKind::ConflictException(_inner) => Some(_inner),
CancelDeploymentErrorKind::InternalServerException(_inner) => Some(_inner),
CancelDeploymentErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
CancelDeploymentErrorKind::ThrottlingException(_inner) => Some(_inner),
CancelDeploymentErrorKind::ValidationException(_inner) => Some(_inner),
CancelDeploymentErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchDisassociateClientDeviceFromCoreDeviceError {
pub kind: BatchDisassociateClientDeviceFromCoreDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for BatchDisassociateClientDeviceFromCoreDeviceError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchDisassociateClientDeviceFromCoreDeviceErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchDisassociateClientDeviceFromCoreDeviceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchDisassociateClientDeviceFromCoreDeviceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::InternalServerException(
_inner,
) => _inner.fmt(f),
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::ResourceNotFoundException(
_inner,
) => _inner.fmt(f),
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::Unhandled(_inner) => {
_inner.fmt(f)
}
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind
for BatchDisassociateClientDeviceFromCoreDeviceError
{
fn code(&self) -> Option<&str> {
BatchDisassociateClientDeviceFromCoreDeviceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchDisassociateClientDeviceFromCoreDeviceError {
pub fn new(
kind: BatchDisassociateClientDeviceFromCoreDeviceErrorKind,
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: BatchDisassociateClientDeviceFromCoreDeviceErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchDisassociateClientDeviceFromCoreDeviceErrorKind::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,
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchDisassociateClientDeviceFromCoreDeviceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::InternalServerException(
_inner,
) => Some(_inner),
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::ResourceNotFoundException(
_inner,
) => Some(_inner),
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::ValidationException(_inner) => {
Some(_inner)
}
BatchDisassociateClientDeviceFromCoreDeviceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchAssociateClientDeviceWithCoreDeviceError {
pub kind: BatchAssociateClientDeviceWithCoreDeviceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError
for BatchAssociateClientDeviceWithCoreDeviceError
{
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchAssociateClientDeviceWithCoreDeviceErrorKind::Unhandled(
crate::error::Unhandled::new(source),
),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchAssociateClientDeviceWithCoreDeviceErrorKind {
AccessDeniedException(crate::error::AccessDeniedException),
InternalServerException(crate::error::InternalServerException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottlingException(crate::error::ThrottlingException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchAssociateClientDeviceWithCoreDeviceError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchAssociateClientDeviceWithCoreDeviceErrorKind::AccessDeniedException(_inner) => {
_inner.fmt(f)
}
BatchAssociateClientDeviceWithCoreDeviceErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
BatchAssociateClientDeviceWithCoreDeviceErrorKind::ResourceNotFoundException(
_inner,
) => _inner.fmt(f),
BatchAssociateClientDeviceWithCoreDeviceErrorKind::ThrottlingException(_inner) => {
_inner.fmt(f)
}
BatchAssociateClientDeviceWithCoreDeviceErrorKind::ValidationException(_inner) => {
_inner.fmt(f)
}
BatchAssociateClientDeviceWithCoreDeviceErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchAssociateClientDeviceWithCoreDeviceError {
fn code(&self) -> Option<&str> {
BatchAssociateClientDeviceWithCoreDeviceError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchAssociateClientDeviceWithCoreDeviceError {
pub fn new(
kind: BatchAssociateClientDeviceWithCoreDeviceErrorKind,
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: BatchAssociateClientDeviceWithCoreDeviceErrorKind::Unhandled(
crate::error::Unhandled::new(err.into()),
),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchAssociateClientDeviceWithCoreDeviceErrorKind::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,
BatchAssociateClientDeviceWithCoreDeviceErrorKind::AccessDeniedException(_)
)
}
pub fn is_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
BatchAssociateClientDeviceWithCoreDeviceErrorKind::InternalServerException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
BatchAssociateClientDeviceWithCoreDeviceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttling_exception(&self) -> bool {
matches!(
&self.kind,
BatchAssociateClientDeviceWithCoreDeviceErrorKind::ThrottlingException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
BatchAssociateClientDeviceWithCoreDeviceErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for BatchAssociateClientDeviceWithCoreDeviceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchAssociateClientDeviceWithCoreDeviceErrorKind::AccessDeniedException(_inner) => {
Some(_inner)
}
BatchAssociateClientDeviceWithCoreDeviceErrorKind::InternalServerException(_inner) => {
Some(_inner)
}
BatchAssociateClientDeviceWithCoreDeviceErrorKind::ResourceNotFoundException(
_inner,
) => Some(_inner),
BatchAssociateClientDeviceWithCoreDeviceErrorKind::ThrottlingException(_inner) => {
Some(_inner)
}
BatchAssociateClientDeviceWithCoreDeviceErrorKind::ValidationException(_inner) => {
Some(_inner)
}
BatchAssociateClientDeviceWithCoreDeviceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct AssociateServiceRoleToAccountError {
pub kind: AssociateServiceRoleToAccountErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for AssociateServiceRoleToAccountError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: AssociateServiceRoleToAccountErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum AssociateServiceRoleToAccountErrorKind {
InternalServerException(crate::error::InternalServerException),
ValidationException(crate::error::ValidationException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for AssociateServiceRoleToAccountError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
AssociateServiceRoleToAccountErrorKind::InternalServerException(_inner) => {
_inner.fmt(f)
}
AssociateServiceRoleToAccountErrorKind::ValidationException(_inner) => _inner.fmt(f),
AssociateServiceRoleToAccountErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for AssociateServiceRoleToAccountError {
fn code(&self) -> Option<&str> {
AssociateServiceRoleToAccountError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl AssociateServiceRoleToAccountError {
pub fn new(
kind: AssociateServiceRoleToAccountErrorKind,
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: AssociateServiceRoleToAccountErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: AssociateServiceRoleToAccountErrorKind::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_internal_server_exception(&self) -> bool {
matches!(
&self.kind,
AssociateServiceRoleToAccountErrorKind::InternalServerException(_)
)
}
pub fn is_validation_exception(&self) -> bool {
matches!(
&self.kind,
AssociateServiceRoleToAccountErrorKind::ValidationException(_)
)
}
}
impl std::error::Error for AssociateServiceRoleToAccountError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
AssociateServiceRoleToAccountErrorKind::InternalServerException(_inner) => Some(_inner),
AssociateServiceRoleToAccountErrorKind::ValidationException(_inner) => Some(_inner),
AssociateServiceRoleToAccountErrorKind::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 _)
}
}