#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ValidationError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub field_list: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl ValidationError {
pub fn field_list(&self) -> std::option::Option<&[crate::model::ValidationExceptionField]> {
self.field_list.as_deref()
}
}
impl ValidationError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ValidationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ValidationError [ValidationException]")?;
if let Some(inner_1) = &self.message {
{
write!(f, ": {}", inner_1)?;
}
}
Ok(())
}
}
impl std::error::Error for ValidationError {}
pub mod validation_error {
#[non_exhaustive]
#[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) field_list:
std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn field_list(mut self, input: crate::model::ValidationExceptionField) -> Self {
let mut v = self.field_list.unwrap_or_default();
v.push(input);
self.field_list = Some(v);
self
}
pub fn set_field_list(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::ValidationExceptionField>>,
) -> Self {
self.field_list = input;
self
}
pub fn build(self) -> crate::error::ValidationError {
crate::error::ValidationError {
message: self.message,
field_list: self.field_list,
}
}
}
}
impl ValidationError {
pub fn builder() -> crate::error::validation_error::Builder {
crate::error::validation_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnsupportedMediaTypeError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl UnsupportedMediaTypeError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl UnsupportedMediaTypeError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnsupportedMediaTypeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"UnsupportedMediaTypeError [UnsupportedMediaTypeException]"
)?;
if let Some(inner_2) = &self.message {
{
write!(f, ": {}", inner_2)?;
}
}
Ok(())
}
}
impl std::error::Error for UnsupportedMediaTypeError {}
pub mod unsupported_media_type_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::UnsupportedMediaTypeError {
crate::error::UnsupportedMediaTypeError {
message: self.message,
code: self.code,
}
}
}
}
impl UnsupportedMediaTypeError {
pub fn builder() -> crate::error::unsupported_media_type_error::Builder {
crate::error::unsupported_media_type_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnmappedError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl UnmappedError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl UnmappedError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnmappedError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnmappedError [UnmappedException]")?;
if let Some(inner_3) = &self.message {
{
write!(f, ": {}", inner_3)?;
}
}
Ok(())
}
}
impl std::error::Error for UnmappedError {}
pub mod unmapped_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::UnmappedError {
crate::error::UnmappedError {
message: self.message,
code: self.code,
}
}
}
}
impl UnmappedError {
pub fn builder() -> crate::error::unmapped_error::Builder {
crate::error::unmapped_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnknownOperationError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl UnknownOperationError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl UnknownOperationError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnknownOperationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnknownOperationError [UnknownOperationException]")?;
if let Some(inner_4) = &self.message {
{
write!(f, ": {}", inner_4)?;
}
}
Ok(())
}
}
impl std::error::Error for UnknownOperationError {}
pub mod unknown_operation_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::UnknownOperationError {
crate::error::UnknownOperationError {
message: self.message,
code: self.code,
}
}
}
}
impl UnknownOperationError {
pub fn builder() -> crate::error::unknown_operation_error::Builder {
crate::error::unknown_operation_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct UnauthorizedError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl UnauthorizedError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl UnauthorizedError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for UnauthorizedError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "UnauthorizedError [UnauthorizedException]")?;
if let Some(inner_5) = &self.message {
{
write!(f, ": {}", inner_5)?;
}
}
Ok(())
}
}
impl std::error::Error for UnauthorizedError {}
pub mod unauthorized_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::UnauthorizedError {
crate::error::UnauthorizedError {
message: self.message,
code: self.code,
}
}
}
}
impl UnauthorizedError {
pub fn builder() -> crate::error::unauthorized_error::Builder {
crate::error::unauthorized_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ThrottlingError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl ThrottlingError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl ThrottlingError {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ThrottlingError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ThrottlingError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ThrottlingError [ThrottlingException]")?;
if let Some(inner_6) = &self.message {
{
write!(f, ": {}", inner_6)?;
}
}
Ok(())
}
}
impl std::error::Error for ThrottlingError {}
pub mod throttling_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::ThrottlingError {
crate::error::ThrottlingError {
message: self.message,
code: self.code,
}
}
}
}
impl ThrottlingError {
pub fn builder() -> crate::error::throttling_error::Builder {
crate::error::throttling_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ServiceUnavailableError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl ServiceUnavailableError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl ServiceUnavailableError {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ServerError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ServiceUnavailableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ServiceUnavailableError [ServiceUnavailableException]")?;
if let Some(inner_7) = &self.message {
{
write!(f, ": {}", inner_7)?;
}
}
Ok(())
}
}
impl std::error::Error for ServiceUnavailableError {}
pub mod service_unavailable_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::ServiceUnavailableError {
crate::error::ServiceUnavailableError {
message: self.message,
code: self.code,
}
}
}
}
impl ServiceUnavailableError {
pub fn builder() -> crate::error::service_unavailable_error::Builder {
crate::error::service_unavailable_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct SerializationError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl SerializationError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl SerializationError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for SerializationError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "SerializationError [SerializationException]")?;
if let Some(inner_8) = &self.message {
{
write!(f, ": {}", inner_8)?;
}
}
Ok(())
}
}
impl std::error::Error for SerializationError {}
pub mod serialization_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::SerializationError {
crate::error::SerializationError {
message: self.message,
code: self.code,
}
}
}
}
impl SerializationError {
pub fn builder() -> crate::error::serialization_error::Builder {
crate::error::serialization_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceNotFoundError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl ResourceNotFoundError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl ResourceNotFoundError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceNotFoundError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceNotFoundError [ResourceNotFoundException]")?;
if let Some(inner_9) = &self.message {
{
write!(f, ": {}", inner_9)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceNotFoundError {}
pub mod resource_not_found_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::ResourceNotFoundError {
crate::error::ResourceNotFoundError {
message: self.message,
code: self.code,
}
}
}
}
impl ResourceNotFoundError {
pub fn builder() -> crate::error::resource_not_found_error::Builder {
crate::error::resource_not_found_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct ResourceConflictError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl ResourceConflictError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl ResourceConflictError {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ClientError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for ResourceConflictError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "ResourceConflictError [ResourceConflictException]")?;
if let Some(inner_10) = &self.message {
{
write!(f, ": {}", inner_10)?;
}
}
Ok(())
}
}
impl std::error::Error for ResourceConflictError {}
pub mod resource_conflict_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::ResourceConflictError {
crate::error::ResourceConflictError {
message: self.message,
code: self.code,
}
}
}
}
impl ResourceConflictError {
pub fn builder() -> crate::error::resource_conflict_error::Builder {
crate::error::resource_conflict_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct RequestTooLargeError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl RequestTooLargeError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl RequestTooLargeError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for RequestTooLargeError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "RequestTooLargeError [RequestTooLargeException]")?;
if let Some(inner_11) = &self.message {
{
write!(f, ": {}", inner_11)?;
}
}
Ok(())
}
}
impl std::error::Error for RequestTooLargeError {}
pub mod request_too_large_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::RequestTooLargeError {
crate::error::RequestTooLargeError {
message: self.message,
code: self.code,
}
}
}
}
impl RequestTooLargeError {
pub fn builder() -> crate::error::request_too_large_error::Builder {
crate::error::request_too_large_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct QuotaExceededError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl QuotaExceededError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl QuotaExceededError {
pub fn retryable_error_kind(&self) -> aws_smithy_types::retry::ErrorKind {
aws_smithy_types::retry::ErrorKind::ThrottlingError
}
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for QuotaExceededError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "QuotaExceededError [QuotaExceededException]")?;
if let Some(inner_12) = &self.message {
{
write!(f, ": {}", inner_12)?;
}
}
Ok(())
}
}
impl std::error::Error for QuotaExceededError {}
pub mod quota_exceeded_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::QuotaExceededError {
crate::error::QuotaExceededError {
message: self.message,
code: self.code,
}
}
}
}
impl QuotaExceededError {
pub fn builder() -> crate::error::quota_exceeded_error::Builder {
crate::error::quota_exceeded_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct NotAcceptableError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl NotAcceptableError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl NotAcceptableError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for NotAcceptableError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "NotAcceptableError [NotAcceptableException]")?;
if let Some(inner_13) = &self.message {
{
write!(f, ": {}", inner_13)?;
}
}
Ok(())
}
}
impl std::error::Error for NotAcceptableError {}
pub mod not_acceptable_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::NotAcceptableError {
crate::error::NotAcceptableError {
message: self.message,
code: self.code,
}
}
}
}
impl NotAcceptableError {
pub fn builder() -> crate::error::not_acceptable_error::Builder {
crate::error::not_acceptable_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct InternalFailureError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl InternalFailureError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl InternalFailureError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for InternalFailureError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "InternalFailureError [InternalFailureException]")?;
if let Some(inner_14) = &self.message {
{
write!(f, ": {}", inner_14)?;
}
}
Ok(())
}
}
impl std::error::Error for InternalFailureError {}
pub mod internal_failure_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::InternalFailureError {
crate::error::InternalFailureError {
message: self.message,
code: self.code,
}
}
}
}
impl InternalFailureError {
pub fn builder() -> crate::error::internal_failure_error::Builder {
crate::error::internal_failure_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct GatewayTimeoutError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl GatewayTimeoutError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl GatewayTimeoutError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for GatewayTimeoutError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "GatewayTimeoutError [GatewayTimeoutException]")?;
if let Some(inner_15) = &self.message {
{
write!(f, ": {}", inner_15)?;
}
}
Ok(())
}
}
impl std::error::Error for GatewayTimeoutError {}
pub mod gateway_timeout_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::GatewayTimeoutError {
crate::error::GatewayTimeoutError {
message: self.message,
code: self.code,
}
}
}
}
impl GatewayTimeoutError {
pub fn builder() -> crate::error::gateway_timeout_error::Builder {
crate::error::gateway_timeout_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BadRequestError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl BadRequestError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl BadRequestError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for BadRequestError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "BadRequestError [BadRequestException]")?;
if let Some(inner_16) = &self.message {
{
write!(f, ": {}", inner_16)?;
}
}
Ok(())
}
}
impl std::error::Error for BadRequestError {}
pub mod bad_request_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::BadRequestError {
crate::error::BadRequestError {
message: self.message,
code: self.code,
}
}
}
}
impl BadRequestError {
pub fn builder() -> crate::error::bad_request_error::Builder {
crate::error::bad_request_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct AccessDeniedError {
#[doc(hidden)]
pub message: std::option::Option<std::string::String>,
#[doc(hidden)]
pub code: std::option::Option<std::string::String>,
}
impl AccessDeniedError {
pub fn code(&self) -> std::option::Option<&str> {
self.code.as_deref()
}
}
impl AccessDeniedError {
pub fn message(&self) -> std::option::Option<&str> {
self.message.as_deref()
}
}
impl std::fmt::Display for AccessDeniedError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "AccessDeniedError [AccessDeniedException]")?;
if let Some(inner_17) = &self.message {
{
write!(f, ": {}", inner_17)?;
}
}
Ok(())
}
}
impl std::error::Error for AccessDeniedError {}
pub mod access_denied_error {
#[non_exhaustive]
#[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) code: std::option::Option<std::string::String>,
}
impl Builder {
pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
self.message = Some(input.into());
self
}
pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
self.message = input;
self
}
pub fn code(mut self, input: impl Into<std::string::String>) -> Self {
self.code = Some(input.into());
self
}
pub fn set_code(mut self, input: std::option::Option<std::string::String>) -> Self {
self.code = input;
self
}
pub fn build(self) -> crate::error::AccessDeniedError {
crate::error::AccessDeniedError {
message: self.message,
code: self.code,
}
}
}
}
impl AccessDeniedError {
pub fn builder() -> crate::error::access_denied_error::Builder {
crate::error::access_denied_error::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub struct GetAwsAccessError {
pub kind: GetAwsAccessErrorKind,
pub(crate) meta: aws_smithy_types::Error,
}
impl aws_smithy_http::result::CreateUnhandledError for GetAwsAccessError {
fn create_unhandled_error(source: Box<dyn std::error::Error + Send + Sync + 'static>) -> Self {
Self {
kind: GetAwsAccessErrorKind::Unhandled(crate::error::Unhandled::new(source)),
meta: Default::default(),
}
}
}
#[non_exhaustive]
#[derive(std::fmt::Debug)]
pub enum GetAwsAccessErrorKind {
AccessDeniedError(crate::error::AccessDeniedError),
BadRequestError(crate::error::BadRequestError),
GatewayTimeoutError(crate::error::GatewayTimeoutError),
InternalFailureError(crate::error::InternalFailureError),
NotAcceptableError(crate::error::NotAcceptableError),
QuotaExceededError(crate::error::QuotaExceededError),
RequestTooLargeError(crate::error::RequestTooLargeError),
ResourceConflictError(crate::error::ResourceConflictError),
ResourceNotFoundError(crate::error::ResourceNotFoundError),
SerializationError(crate::error::SerializationError),
ServiceUnavailableError(crate::error::ServiceUnavailableError),
ThrottlingError(crate::error::ThrottlingError),
UnauthorizedError(crate::error::UnauthorizedError),
UnknownOperationError(crate::error::UnknownOperationError),
UnmappedError(crate::error::UnmappedError),
UnsupportedMediaTypeError(crate::error::UnsupportedMediaTypeError),
ValidationError(crate::error::ValidationError),
Unhandled(crate::error::Unhandled),
}
impl std::fmt::Display for GetAwsAccessError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
GetAwsAccessErrorKind::AccessDeniedError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::BadRequestError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::GatewayTimeoutError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::InternalFailureError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::NotAcceptableError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::QuotaExceededError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::RequestTooLargeError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::ResourceConflictError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::ResourceNotFoundError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::SerializationError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::ServiceUnavailableError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::ThrottlingError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::UnauthorizedError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::UnknownOperationError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::UnmappedError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::UnsupportedMediaTypeError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::ValidationError(_inner) => _inner.fmt(f),
GetAwsAccessErrorKind::Unhandled(_inner) => _inner.fmt(f),
}
}
}
impl aws_smithy_types::retry::ProvideErrorKind for GetAwsAccessError {
fn code(&self) -> Option<&str> {
GetAwsAccessError::code(self)
}
fn retryable_error_kind(&self) -> Option<aws_smithy_types::retry::ErrorKind> {
match &self.kind {
GetAwsAccessErrorKind::QuotaExceededError(inner) => Some(inner.retryable_error_kind()),
GetAwsAccessErrorKind::ResourceConflictError(inner) => {
Some(inner.retryable_error_kind())
}
GetAwsAccessErrorKind::ServiceUnavailableError(inner) => {
Some(inner.retryable_error_kind())
}
GetAwsAccessErrorKind::ThrottlingError(inner) => Some(inner.retryable_error_kind()),
_ => None,
}
}
}
impl GetAwsAccessError {
pub fn new(kind: GetAwsAccessErrorKind, 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: GetAwsAccessErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
meta: Default::default(),
}
}
pub fn generic(err: aws_smithy_types::Error) -> Self {
Self {
meta: err.clone(),
kind: GetAwsAccessErrorKind::Unhandled(crate::error::Unhandled::new(err.into())),
}
}
pub fn message(&self) -> Option<&str> {
self.meta.message()
}
pub fn meta(&self) -> &aws_smithy_types::Error {
&self.meta
}
pub fn request_id(&self) -> Option<&str> {
self.meta.request_id()
}
pub fn code(&self) -> Option<&str> {
self.meta.code()
}
pub fn is_access_denied_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::AccessDeniedError(_))
}
pub fn is_bad_request_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::BadRequestError(_))
}
pub fn is_gateway_timeout_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::GatewayTimeoutError(_))
}
pub fn is_internal_failure_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::InternalFailureError(_))
}
pub fn is_not_acceptable_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::NotAcceptableError(_))
}
pub fn is_quota_exceeded_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::QuotaExceededError(_))
}
pub fn is_request_too_large_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::RequestTooLargeError(_))
}
pub fn is_resource_conflict_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::ResourceConflictError(_))
}
pub fn is_resource_not_found_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::ResourceNotFoundError(_))
}
pub fn is_serialization_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::SerializationError(_))
}
pub fn is_service_unavailable_error(&self) -> bool {
matches!(
&self.kind,
GetAwsAccessErrorKind::ServiceUnavailableError(_)
)
}
pub fn is_throttling_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::ThrottlingError(_))
}
pub fn is_unauthorized_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::UnauthorizedError(_))
}
pub fn is_unknown_operation_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::UnknownOperationError(_))
}
pub fn is_unmapped_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::UnmappedError(_))
}
pub fn is_unsupported_media_type_error(&self) -> bool {
matches!(
&self.kind,
GetAwsAccessErrorKind::UnsupportedMediaTypeError(_)
)
}
pub fn is_validation_error(&self) -> bool {
matches!(&self.kind, GetAwsAccessErrorKind::ValidationError(_))
}
}
impl std::error::Error for GetAwsAccessError {
fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
match &self.kind {
GetAwsAccessErrorKind::AccessDeniedError(_inner) => Some(_inner),
GetAwsAccessErrorKind::BadRequestError(_inner) => Some(_inner),
GetAwsAccessErrorKind::GatewayTimeoutError(_inner) => Some(_inner),
GetAwsAccessErrorKind::InternalFailureError(_inner) => Some(_inner),
GetAwsAccessErrorKind::NotAcceptableError(_inner) => Some(_inner),
GetAwsAccessErrorKind::QuotaExceededError(_inner) => Some(_inner),
GetAwsAccessErrorKind::RequestTooLargeError(_inner) => Some(_inner),
GetAwsAccessErrorKind::ResourceConflictError(_inner) => Some(_inner),
GetAwsAccessErrorKind::ResourceNotFoundError(_inner) => Some(_inner),
GetAwsAccessErrorKind::SerializationError(_inner) => Some(_inner),
GetAwsAccessErrorKind::ServiceUnavailableError(_inner) => Some(_inner),
GetAwsAccessErrorKind::ThrottlingError(_inner) => Some(_inner),
GetAwsAccessErrorKind::UnauthorizedError(_inner) => Some(_inner),
GetAwsAccessErrorKind::UnknownOperationError(_inner) => Some(_inner),
GetAwsAccessErrorKind::UnmappedError(_inner) => Some(_inner),
GetAwsAccessErrorKind::UnsupportedMediaTypeError(_inner) => Some(_inner),
GetAwsAccessErrorKind::ValidationError(_inner) => Some(_inner),
GetAwsAccessErrorKind::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 _)
}
}