#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateSamplingRuleError {
pub kind: UpdateSamplingRuleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateSamplingRuleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateSamplingRuleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateSamplingRuleErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateSamplingRuleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateSamplingRuleErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateSamplingRuleErrorKind::ThrottledException(_inner) => _inner.fmt(f),
UpdateSamplingRuleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateSamplingRuleError {
fn code(&self) -> Option<&str> {
UpdateSamplingRuleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateSamplingRuleError {
pub fn new(kind: UpdateSamplingRuleErrorKind, 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: UpdateSamplingRuleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateSamplingRuleErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSamplingRuleErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
UpdateSamplingRuleErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for UpdateSamplingRuleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateSamplingRuleErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateSamplingRuleErrorKind::ThrottledException(_inner) => Some(_inner),
UpdateSamplingRuleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottledException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl ThrottledException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottledException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottledException")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottledException {}
pub mod throttled_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::ThrottledException {
crate::error::ThrottledException {
message: self.message,
}
}
}
}
impl ThrottledException {
pub fn builder() -> crate::error::throttled_exception::Builder {
crate::error::throttled_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidRequestException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidRequestException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidRequestException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidRequestException")?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidRequestException {}
pub mod invalid_request_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::InvalidRequestException {
crate::error::InvalidRequestException {
message: self.message,
}
}
}
}
impl InvalidRequestException {
pub fn builder() -> crate::error::invalid_request_exception::Builder {
crate::error::invalid_request_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UpdateGroupError {
pub kind: UpdateGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UpdateGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UpdateGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UpdateGroupErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for UpdateGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
UpdateGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
UpdateGroupErrorKind::ThrottledException(_inner) => _inner.fmt(f),
UpdateGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for UpdateGroupError {
fn code(&self) -> Option<&str> {
UpdateGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl UpdateGroupError {
pub fn new(kind: UpdateGroupErrorKind, 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: UpdateGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: UpdateGroupErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(&self.kind, UpdateGroupErrorKind::InvalidRequestException(_))
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, UpdateGroupErrorKind::ThrottledException(_))
}
}
impl std::error::Error for UpdateGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UpdateGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
UpdateGroupErrorKind::ThrottledException(_inner) => Some(_inner),
UpdateGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct UntagResourceError {
pub kind: UntagResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for UntagResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: UntagResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum UntagResourceErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottledException(crate::error::ThrottledException),
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::InvalidRequestException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
UntagResourceErrorKind::ThrottledException(_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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
UntagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, UntagResourceErrorKind::ThrottledException(_))
}
}
impl std::error::Error for UntagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
UntagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
UntagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
UntagResourceErrorKind::ThrottledException(_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>,
#[allow(missing_docs)] #[doc(hidden)]
pub resource_name: std::option::Option<std::string::String>,
}
impl ResourceNotFoundException {
#[allow(missing_docs)] pub fn resource_name(&self) -> std::option::Option<&str> {
self.resource_name.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_name: 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
}
#[allow(missing_docs)] pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_name = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_name = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundException {
crate::error::ResourceNotFoundException {
message: self.message,
resource_name: self.resource_name,
}
}
}
}
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 {
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottledException(crate::error::ThrottledException),
TooManyTagsException(crate::error::TooManyTagsException),
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::InvalidRequestException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
TagResourceErrorKind::ThrottledException(_inner) => _inner.fmt(f),
TagResourceErrorKind::TooManyTagsException(_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_invalid_request_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::InvalidRequestException(_))
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
TagResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::ThrottledException(_))
}
pub fn is_too_many_tags_exception(&self) -> bool {
matches!(&self.kind, TagResourceErrorKind::TooManyTagsException(_))
}
}
impl std::error::Error for TagResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
TagResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
TagResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
TagResourceErrorKind::ThrottledException(_inner) => Some(_inner),
TagResourceErrorKind::TooManyTagsException(_inner) => Some(_inner),
TagResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct TooManyTagsException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[allow(missing_docs)] #[doc(hidden)]
pub resource_name: std::option::Option<std::string::String>,
}
impl TooManyTagsException {
#[allow(missing_docs)] pub fn resource_name(&self) -> std::option::Option<&str> {
self.resource_name.as_deref()
}
}
impl TooManyTagsException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for TooManyTagsException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "TooManyTagsException")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for TooManyTagsException {}
pub mod too_many_tags_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_name: 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
}
#[allow(missing_docs)] pub fn resource_name(mut self, input: impl Into<std::string::String>) -> Self {
self.resource_name = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_resource_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.resource_name = input;
self
}
pub fn build(self) -> crate::error::TooManyTagsException {
crate::error::TooManyTagsException {
message: self.message,
resource_name: self.resource_name,
}
}
}
}
impl TooManyTagsException {
pub fn builder() -> crate::error::too_many_tags_exception::Builder {
crate::error::too_many_tags_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutTraceSegmentsError {
pub kind: PutTraceSegmentsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutTraceSegmentsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutTraceSegmentsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutTraceSegmentsErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutTraceSegmentsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutTraceSegmentsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutTraceSegmentsErrorKind::ThrottledException(_inner) => _inner.fmt(f),
PutTraceSegmentsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutTraceSegmentsError {
fn code(&self) -> Option<&str> {
PutTraceSegmentsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutTraceSegmentsError {
pub fn new(kind: PutTraceSegmentsErrorKind, 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: PutTraceSegmentsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutTraceSegmentsErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutTraceSegmentsErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, PutTraceSegmentsErrorKind::ThrottledException(_))
}
}
impl std::error::Error for PutTraceSegmentsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutTraceSegmentsErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutTraceSegmentsErrorKind::ThrottledException(_inner) => Some(_inner),
PutTraceSegmentsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutTelemetryRecordsError {
pub kind: PutTelemetryRecordsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutTelemetryRecordsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutTelemetryRecordsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutTelemetryRecordsErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutTelemetryRecordsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutTelemetryRecordsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutTelemetryRecordsErrorKind::ThrottledException(_inner) => _inner.fmt(f),
PutTelemetryRecordsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutTelemetryRecordsError {
fn code(&self) -> Option<&str> {
PutTelemetryRecordsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutTelemetryRecordsError {
pub fn new(kind: PutTelemetryRecordsErrorKind, 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: PutTelemetryRecordsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutTelemetryRecordsErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutTelemetryRecordsErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
PutTelemetryRecordsErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for PutTelemetryRecordsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutTelemetryRecordsErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutTelemetryRecordsErrorKind::ThrottledException(_inner) => Some(_inner),
PutTelemetryRecordsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutResourcePolicyError {
pub kind: PutResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutResourcePolicyErrorKind {
InvalidPolicyRevisionIdException(crate::error::InvalidPolicyRevisionIdException),
LockoutPreventionException(crate::error::LockoutPreventionException),
MalformedPolicyDocumentException(crate::error::MalformedPolicyDocumentException),
PolicyCountLimitExceededException(crate::error::PolicyCountLimitExceededException),
PolicySizeLimitExceededException(crate::error::PolicySizeLimitExceededException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutResourcePolicyErrorKind::InvalidPolicyRevisionIdException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::LockoutPreventionException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::MalformedPolicyDocumentException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::PolicyCountLimitExceededException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::PolicySizeLimitExceededException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::ThrottledException(_inner) => _inner.fmt(f),
PutResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutResourcePolicyError {
fn code(&self) -> Option<&str> {
PutResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutResourcePolicyError {
pub fn new(kind: PutResourcePolicyErrorKind, 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: PutResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutResourcePolicyErrorKind::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_invalid_policy_revision_id_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::InvalidPolicyRevisionIdException(_)
)
}
pub fn is_lockout_prevention_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::LockoutPreventionException(_)
)
}
pub fn is_malformed_policy_document_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::MalformedPolicyDocumentException(_)
)
}
pub fn is_policy_count_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::PolicyCountLimitExceededException(_)
)
}
pub fn is_policy_size_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::PolicySizeLimitExceededException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
PutResourcePolicyErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for PutResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutResourcePolicyErrorKind::InvalidPolicyRevisionIdException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::LockoutPreventionException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::MalformedPolicyDocumentException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::PolicyCountLimitExceededException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::PolicySizeLimitExceededException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::ThrottledException(_inner) => Some(_inner),
PutResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PolicySizeLimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PolicySizeLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PolicySizeLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PolicySizeLimitExceededException")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for PolicySizeLimitExceededException {}
pub mod policy_size_limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::PolicySizeLimitExceededException {
crate::error::PolicySizeLimitExceededException {
message: self.message,
}
}
}
}
impl PolicySizeLimitExceededException {
pub fn builder() -> crate::error::policy_size_limit_exceeded_exception::Builder {
crate::error::policy_size_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct PolicyCountLimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl PolicyCountLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for PolicyCountLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "PolicyCountLimitExceededException")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for PolicyCountLimitExceededException {}
pub mod policy_count_limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::PolicyCountLimitExceededException {
crate::error::PolicyCountLimitExceededException {
message: self.message,
}
}
}
}
impl PolicyCountLimitExceededException {
pub fn builder() -> crate::error::policy_count_limit_exceeded_exception::Builder {
crate::error::policy_count_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct MalformedPolicyDocumentException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl MalformedPolicyDocumentException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for MalformedPolicyDocumentException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "MalformedPolicyDocumentException")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for MalformedPolicyDocumentException {}
pub mod malformed_policy_document_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::MalformedPolicyDocumentException {
crate::error::MalformedPolicyDocumentException {
message: self.message,
}
}
}
}
impl MalformedPolicyDocumentException {
pub fn builder() -> crate::error::malformed_policy_document_exception::Builder {
crate::error::malformed_policy_document_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct LockoutPreventionException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl LockoutPreventionException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for LockoutPreventionException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "LockoutPreventionException")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for LockoutPreventionException {}
pub mod lockout_prevention_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::LockoutPreventionException {
crate::error::LockoutPreventionException {
message: self.message,
}
}
}
}
impl LockoutPreventionException {
pub fn builder() -> crate::error::lockout_prevention_exception::Builder {
crate::error::lockout_prevention_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InvalidPolicyRevisionIdException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl InvalidPolicyRevisionIdException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InvalidPolicyRevisionIdException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InvalidPolicyRevisionIdException")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for InvalidPolicyRevisionIdException {}
pub mod invalid_policy_revision_id_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::InvalidPolicyRevisionIdException {
crate::error::InvalidPolicyRevisionIdException {
message: self.message,
}
}
}
}
impl InvalidPolicyRevisionIdException {
pub fn builder() -> crate::error::invalid_policy_revision_id_exception::Builder {
crate::error::invalid_policy_revision_id_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct PutEncryptionConfigError {
pub kind: PutEncryptionConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for PutEncryptionConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: PutEncryptionConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum PutEncryptionConfigErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for PutEncryptionConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
PutEncryptionConfigErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
PutEncryptionConfigErrorKind::ThrottledException(_inner) => _inner.fmt(f),
PutEncryptionConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for PutEncryptionConfigError {
fn code(&self) -> Option<&str> {
PutEncryptionConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl PutEncryptionConfigError {
pub fn new(kind: PutEncryptionConfigErrorKind, 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: PutEncryptionConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: PutEncryptionConfigErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
PutEncryptionConfigErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
PutEncryptionConfigErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for PutEncryptionConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
PutEncryptionConfigErrorKind::InvalidRequestException(_inner) => Some(_inner),
PutEncryptionConfigErrorKind::ThrottledException(_inner) => Some(_inner),
PutEncryptionConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListTagsForResourceError {
pub kind: ListTagsForResourceErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListTagsForResourceError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListTagsForResourceErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListTagsForResourceErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ResourceNotFoundException(crate::error::ResourceNotFoundException),
ThrottledException(crate::error::ThrottledException),
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::InvalidRequestException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => _inner.fmt(f),
ListTagsForResourceErrorKind::ThrottledException(_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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::InvalidRequestException(_)
)
}
pub fn is_resource_not_found_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ResourceNotFoundException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
ListTagsForResourceErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for ListTagsForResourceError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListTagsForResourceErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ResourceNotFoundException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::ThrottledException(_inner) => Some(_inner),
ListTagsForResourceErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct ListResourcePoliciesError {
pub kind: ListResourcePoliciesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for ListResourcePoliciesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: ListResourcePoliciesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum ListResourcePoliciesErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for ListResourcePoliciesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ListResourcePoliciesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
ListResourcePoliciesErrorKind::ThrottledException(_inner) => _inner.fmt(f),
ListResourcePoliciesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for ListResourcePoliciesError {
fn code(&self) -> Option<&str> {
ListResourcePoliciesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl ListResourcePoliciesError {
pub fn new(kind: ListResourcePoliciesErrorKind, 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: ListResourcePoliciesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: ListResourcePoliciesErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
ListResourcePoliciesErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
ListResourcePoliciesErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for ListResourcePoliciesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
ListResourcePoliciesErrorKind::InvalidRequestException(_inner) => Some(_inner),
ListResourcePoliciesErrorKind::ThrottledException(_inner) => Some(_inner),
ListResourcePoliciesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTraceSummariesError {
pub kind: GetTraceSummariesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTraceSummariesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTraceSummariesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTraceSummariesErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTraceSummariesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTraceSummariesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetTraceSummariesErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetTraceSummariesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTraceSummariesError {
fn code(&self) -> Option<&str> {
GetTraceSummariesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTraceSummariesError {
pub fn new(kind: GetTraceSummariesErrorKind, 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: GetTraceSummariesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTraceSummariesErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetTraceSummariesErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
GetTraceSummariesErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for GetTraceSummariesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTraceSummariesErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetTraceSummariesErrorKind::ThrottledException(_inner) => Some(_inner),
GetTraceSummariesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTraceGraphError {
pub kind: GetTraceGraphErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTraceGraphError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTraceGraphErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTraceGraphErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTraceGraphError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTraceGraphErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetTraceGraphErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetTraceGraphErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTraceGraphError {
fn code(&self) -> Option<&str> {
GetTraceGraphError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTraceGraphError {
pub fn new(kind: GetTraceGraphErrorKind, 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: GetTraceGraphErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTraceGraphErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetTraceGraphErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, GetTraceGraphErrorKind::ThrottledException(_))
}
}
impl std::error::Error for GetTraceGraphError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTraceGraphErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetTraceGraphErrorKind::ThrottledException(_inner) => Some(_inner),
GetTraceGraphErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetTimeSeriesServiceStatisticsError {
pub kind: GetTimeSeriesServiceStatisticsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetTimeSeriesServiceStatisticsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetTimeSeriesServiceStatisticsErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetTimeSeriesServiceStatisticsErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetTimeSeriesServiceStatisticsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetTimeSeriesServiceStatisticsErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
GetTimeSeriesServiceStatisticsErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetTimeSeriesServiceStatisticsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetTimeSeriesServiceStatisticsError {
fn code(&self) -> Option<&str> {
GetTimeSeriesServiceStatisticsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetTimeSeriesServiceStatisticsError {
pub fn new(
kind: GetTimeSeriesServiceStatisticsErrorKind,
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: GetTimeSeriesServiceStatisticsErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetTimeSeriesServiceStatisticsErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetTimeSeriesServiceStatisticsErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
GetTimeSeriesServiceStatisticsErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for GetTimeSeriesServiceStatisticsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetTimeSeriesServiceStatisticsErrorKind::InvalidRequestException(_inner) => {
Some(_inner)
}
GetTimeSeriesServiceStatisticsErrorKind::ThrottledException(_inner) => Some(_inner),
GetTimeSeriesServiceStatisticsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetServiceGraphError {
pub kind: GetServiceGraphErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetServiceGraphError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetServiceGraphErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetServiceGraphErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetServiceGraphError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetServiceGraphErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetServiceGraphErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetServiceGraphErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetServiceGraphError {
fn code(&self) -> Option<&str> {
GetServiceGraphError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetServiceGraphError {
pub fn new(kind: GetServiceGraphErrorKind, 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: GetServiceGraphErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetServiceGraphErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetServiceGraphErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, GetServiceGraphErrorKind::ThrottledException(_))
}
}
impl std::error::Error for GetServiceGraphError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetServiceGraphErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetServiceGraphErrorKind::ThrottledException(_inner) => Some(_inner),
GetServiceGraphErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSamplingTargetsError {
pub kind: GetSamplingTargetsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSamplingTargetsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSamplingTargetsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSamplingTargetsErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSamplingTargetsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSamplingTargetsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetSamplingTargetsErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetSamplingTargetsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSamplingTargetsError {
fn code(&self) -> Option<&str> {
GetSamplingTargetsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSamplingTargetsError {
pub fn new(kind: GetSamplingTargetsErrorKind, 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: GetSamplingTargetsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSamplingTargetsErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetSamplingTargetsErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
GetSamplingTargetsErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for GetSamplingTargetsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSamplingTargetsErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetSamplingTargetsErrorKind::ThrottledException(_inner) => Some(_inner),
GetSamplingTargetsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSamplingStatisticSummariesError {
pub kind: GetSamplingStatisticSummariesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSamplingStatisticSummariesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSamplingStatisticSummariesErrorKind::Unhandled(crate::error::Unhandled::new(
source,
)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSamplingStatisticSummariesErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSamplingStatisticSummariesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSamplingStatisticSummariesErrorKind::InvalidRequestException(_inner) => {
_inner.fmt(f)
}
GetSamplingStatisticSummariesErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetSamplingStatisticSummariesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSamplingStatisticSummariesError {
fn code(&self) -> Option<&str> {
GetSamplingStatisticSummariesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSamplingStatisticSummariesError {
pub fn new(
kind: GetSamplingStatisticSummariesErrorKind,
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: GetSamplingStatisticSummariesErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSamplingStatisticSummariesErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetSamplingStatisticSummariesErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
GetSamplingStatisticSummariesErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for GetSamplingStatisticSummariesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSamplingStatisticSummariesErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetSamplingStatisticSummariesErrorKind::ThrottledException(_inner) => Some(_inner),
GetSamplingStatisticSummariesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetSamplingRulesError {
pub kind: GetSamplingRulesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetSamplingRulesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetSamplingRulesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetSamplingRulesErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetSamplingRulesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetSamplingRulesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetSamplingRulesErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetSamplingRulesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetSamplingRulesError {
fn code(&self) -> Option<&str> {
GetSamplingRulesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetSamplingRulesError {
pub fn new(kind: GetSamplingRulesErrorKind, 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: GetSamplingRulesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetSamplingRulesErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetSamplingRulesErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, GetSamplingRulesErrorKind::ThrottledException(_))
}
}
impl std::error::Error for GetSamplingRulesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetSamplingRulesErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetSamplingRulesErrorKind::ThrottledException(_inner) => Some(_inner),
GetSamplingRulesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetInsightSummariesError {
pub kind: GetInsightSummariesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetInsightSummariesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetInsightSummariesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetInsightSummariesErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetInsightSummariesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetInsightSummariesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetInsightSummariesErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetInsightSummariesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetInsightSummariesError {
fn code(&self) -> Option<&str> {
GetInsightSummariesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetInsightSummariesError {
pub fn new(kind: GetInsightSummariesErrorKind, 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: GetInsightSummariesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetInsightSummariesErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetInsightSummariesErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
GetInsightSummariesErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for GetInsightSummariesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetInsightSummariesErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetInsightSummariesErrorKind::ThrottledException(_inner) => Some(_inner),
GetInsightSummariesErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetInsightImpactGraphError {
pub kind: GetInsightImpactGraphErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetInsightImpactGraphError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetInsightImpactGraphErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetInsightImpactGraphErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetInsightImpactGraphError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetInsightImpactGraphErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetInsightImpactGraphErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetInsightImpactGraphErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetInsightImpactGraphError {
fn code(&self) -> Option<&str> {
GetInsightImpactGraphError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetInsightImpactGraphError {
pub fn new(kind: GetInsightImpactGraphErrorKind, 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: GetInsightImpactGraphErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetInsightImpactGraphErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetInsightImpactGraphErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
GetInsightImpactGraphErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for GetInsightImpactGraphError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetInsightImpactGraphErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetInsightImpactGraphErrorKind::ThrottledException(_inner) => Some(_inner),
GetInsightImpactGraphErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetInsightEventsError {
pub kind: GetInsightEventsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetInsightEventsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetInsightEventsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetInsightEventsErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetInsightEventsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetInsightEventsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetInsightEventsErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetInsightEventsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetInsightEventsError {
fn code(&self) -> Option<&str> {
GetInsightEventsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetInsightEventsError {
pub fn new(kind: GetInsightEventsErrorKind, 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: GetInsightEventsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetInsightEventsErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetInsightEventsErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, GetInsightEventsErrorKind::ThrottledException(_))
}
}
impl std::error::Error for GetInsightEventsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetInsightEventsErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetInsightEventsErrorKind::ThrottledException(_inner) => Some(_inner),
GetInsightEventsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetInsightError {
pub kind: GetInsightErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetInsightError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetInsightErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetInsightErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetInsightError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetInsightErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetInsightErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetInsightErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetInsightError {
fn code(&self) -> Option<&str> {
GetInsightError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetInsightError {
pub fn new(kind: GetInsightErrorKind, 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: GetInsightErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetInsightErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(&self.kind, GetInsightErrorKind::InvalidRequestException(_))
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, GetInsightErrorKind::ThrottledException(_))
}
}
impl std::error::Error for GetInsightError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetInsightErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetInsightErrorKind::ThrottledException(_inner) => Some(_inner),
GetInsightErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetGroupsError {
pub kind: GetGroupsErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetGroupsError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetGroupsErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetGroupsError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetGroupsErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetGroupsErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetGroupsErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetGroupsError {
fn code(&self) -> Option<&str> {
GetGroupsError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetGroupsError {
pub fn new(kind: GetGroupsErrorKind, 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: GetGroupsErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetGroupsErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(&self.kind, GetGroupsErrorKind::InvalidRequestException(_))
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, GetGroupsErrorKind::ThrottledException(_))
}
}
impl std::error::Error for GetGroupsError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetGroupsErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetGroupsErrorKind::ThrottledException(_inner) => Some(_inner),
GetGroupsErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetGroupError {
pub kind: GetGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetGroupErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetGroupErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetGroupError {
fn code(&self) -> Option<&str> {
GetGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetGroupError {
pub fn new(kind: GetGroupErrorKind, 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: GetGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetGroupErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(&self.kind, GetGroupErrorKind::InvalidRequestException(_))
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, GetGroupErrorKind::ThrottledException(_))
}
}
impl std::error::Error for GetGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetGroupErrorKind::ThrottledException(_inner) => Some(_inner),
GetGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetEncryptionConfigError {
pub kind: GetEncryptionConfigErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetEncryptionConfigError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetEncryptionConfigErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetEncryptionConfigErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetEncryptionConfigError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetEncryptionConfigErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
GetEncryptionConfigErrorKind::ThrottledException(_inner) => _inner.fmt(f),
GetEncryptionConfigErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetEncryptionConfigError {
fn code(&self) -> Option<&str> {
GetEncryptionConfigError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl GetEncryptionConfigError {
pub fn new(kind: GetEncryptionConfigErrorKind, 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: GetEncryptionConfigErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetEncryptionConfigErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
GetEncryptionConfigErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
GetEncryptionConfigErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for GetEncryptionConfigError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetEncryptionConfigErrorKind::InvalidRequestException(_inner) => Some(_inner),
GetEncryptionConfigErrorKind::ThrottledException(_inner) => Some(_inner),
GetEncryptionConfigErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteSamplingRuleError {
pub kind: DeleteSamplingRuleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteSamplingRuleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteSamplingRuleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteSamplingRuleErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteSamplingRuleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteSamplingRuleErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteSamplingRuleErrorKind::ThrottledException(_inner) => _inner.fmt(f),
DeleteSamplingRuleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteSamplingRuleError {
fn code(&self) -> Option<&str> {
DeleteSamplingRuleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteSamplingRuleError {
pub fn new(kind: DeleteSamplingRuleErrorKind, 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: DeleteSamplingRuleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteSamplingRuleErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSamplingRuleErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
DeleteSamplingRuleErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for DeleteSamplingRuleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteSamplingRuleErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteSamplingRuleErrorKind::ThrottledException(_inner) => Some(_inner),
DeleteSamplingRuleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteResourcePolicyError {
pub kind: DeleteResourcePolicyErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteResourcePolicyError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteResourcePolicyErrorKind {
InvalidPolicyRevisionIdException(crate::error::InvalidPolicyRevisionIdException),
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteResourcePolicyError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteResourcePolicyErrorKind::InvalidPolicyRevisionIdException(_inner) => {
_inner.fmt(f)
}
DeleteResourcePolicyErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::ThrottledException(_inner) => _inner.fmt(f),
DeleteResourcePolicyErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteResourcePolicyError {
fn code(&self) -> Option<&str> {
DeleteResourcePolicyError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteResourcePolicyError {
pub fn new(kind: DeleteResourcePolicyErrorKind, 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: DeleteResourcePolicyErrorKind::Unhandled(crate::error::Unhandled::new(
err.into(),
)),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteResourcePolicyErrorKind::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_invalid_policy_revision_id_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::InvalidPolicyRevisionIdException(_)
)
}
pub fn is_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
DeleteResourcePolicyErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for DeleteResourcePolicyError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteResourcePolicyErrorKind::InvalidPolicyRevisionIdException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::ThrottledException(_inner) => Some(_inner),
DeleteResourcePolicyErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct DeleteGroupError {
pub kind: DeleteGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for DeleteGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: DeleteGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum DeleteGroupErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for DeleteGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
DeleteGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
DeleteGroupErrorKind::ThrottledException(_inner) => _inner.fmt(f),
DeleteGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for DeleteGroupError {
fn code(&self) -> Option<&str> {
DeleteGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl DeleteGroupError {
pub fn new(kind: DeleteGroupErrorKind, 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: DeleteGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: DeleteGroupErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(&self.kind, DeleteGroupErrorKind::InvalidRequestException(_))
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, DeleteGroupErrorKind::ThrottledException(_))
}
}
impl std::error::Error for DeleteGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
DeleteGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
DeleteGroupErrorKind::ThrottledException(_inner) => Some(_inner),
DeleteGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateSamplingRuleError {
pub kind: CreateSamplingRuleErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateSamplingRuleError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateSamplingRuleErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateSamplingRuleErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
RuleLimitExceededException(crate::error::RuleLimitExceededException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateSamplingRuleError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateSamplingRuleErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateSamplingRuleErrorKind::RuleLimitExceededException(_inner) => _inner.fmt(f),
CreateSamplingRuleErrorKind::ThrottledException(_inner) => _inner.fmt(f),
CreateSamplingRuleErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateSamplingRuleError {
fn code(&self) -> Option<&str> {
CreateSamplingRuleError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateSamplingRuleError {
pub fn new(kind: CreateSamplingRuleErrorKind, 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: CreateSamplingRuleErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateSamplingRuleErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
CreateSamplingRuleErrorKind::InvalidRequestException(_)
)
}
pub fn is_rule_limit_exceeded_exception(&self) -> bool {
matches!(
&self.kind,
CreateSamplingRuleErrorKind::RuleLimitExceededException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(
&self.kind,
CreateSamplingRuleErrorKind::ThrottledException(_)
)
}
}
impl std::error::Error for CreateSamplingRuleError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateSamplingRuleErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateSamplingRuleErrorKind::RuleLimitExceededException(_inner) => Some(_inner),
CreateSamplingRuleErrorKind::ThrottledException(_inner) => Some(_inner),
CreateSamplingRuleErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RuleLimitExceededException {
#[allow(missing_docs)] #[doc(hidden)]
pub message: std::option::Option<std::string::String>,
}
impl RuleLimitExceededException {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RuleLimitExceededException {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RuleLimitExceededException")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for RuleLimitExceededException {}
pub mod rule_limit_exceeded_exception {
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct Builder {
pub(crate) message: std::option::Option<std::string::String>,
}
impl Builder {
#[allow(missing_docs)] pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
#[allow(missing_docs)] pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn build(self) -> crate::error::RuleLimitExceededException {
crate::error::RuleLimitExceededException {
message: self.message,
}
}
}
}
impl RuleLimitExceededException {
pub fn builder() -> crate::error::rule_limit_exceeded_exception::Builder {
crate::error::rule_limit_exceeded_exception::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct CreateGroupError {
pub kind: CreateGroupErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for CreateGroupError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: CreateGroupErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum CreateGroupErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for CreateGroupError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
CreateGroupErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
CreateGroupErrorKind::ThrottledException(_inner) => _inner.fmt(f),
CreateGroupErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for CreateGroupError {
fn code(&self) -> Option<&str> {
CreateGroupError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl CreateGroupError {
pub fn new(kind: CreateGroupErrorKind, meta: aws_smithy_types::Error) -> Self {
Self { kind, meta }
}
pub fn unhandled(err: impl Into<Box<dyn std::error::Error + Send + Sync + 'static>>) -> Self {
Self {
kind: CreateGroupErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: CreateGroupErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(&self.kind, CreateGroupErrorKind::InvalidRequestException(_))
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, CreateGroupErrorKind::ThrottledException(_))
}
}
impl std::error::Error for CreateGroupError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
CreateGroupErrorKind::InvalidRequestException(_inner) => Some(_inner),
CreateGroupErrorKind::ThrottledException(_inner) => Some(_inner),
CreateGroupErrorKind::Unhandled(_inner) => Some(_inner),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct BatchGetTracesError {
pub kind: BatchGetTracesErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for BatchGetTracesError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: BatchGetTracesErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum BatchGetTracesErrorKind {
InvalidRequestException(crate::error::InvalidRequestException),
ThrottledException(crate::error::ThrottledException),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for BatchGetTracesError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
BatchGetTracesErrorKind::InvalidRequestException(_inner) => _inner.fmt(f),
BatchGetTracesErrorKind::ThrottledException(_inner) => _inner.fmt(f),
BatchGetTracesErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for BatchGetTracesError {
fn code(&self) -> Option<&str> {
BatchGetTracesError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
None
}
}
impl BatchGetTracesError {
pub fn new(kind: BatchGetTracesErrorKind, 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: BatchGetTracesErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: BatchGetTracesErrorKind::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_invalid_request_exception(&self) -> bool {
matches!(
&self.kind,
BatchGetTracesErrorKind::InvalidRequestException(_)
)
}
pub fn is_throttled_exception(&self) -> bool {
matches!(&self.kind, BatchGetTracesErrorKind::ThrottledException(_))
}
}
impl std::error::Error for BatchGetTracesError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
BatchGetTracesErrorKind::InvalidRequestException(_inner) => Some(_inner),
BatchGetTracesErrorKind::ThrottledException(_inner) => Some(_inner),
BatchGetTracesErrorKind::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 _)
}
}