# frozen_string_literal: true # WARNING ABOUT GENERATED CODE # # This file is generated. See the contributing guide for more information: # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE module Aws::SNS # When SNS returns an error response, the Ruby SDK constructs and raises an error. # These errors all extend Aws::SNS::Errors::ServiceError < {Aws::Errors::ServiceError} # # You can rescue all SNS errors using ServiceError: # # begin # # do stuff # rescue Aws::SNS::Errors::ServiceError # # rescues all SNS API errors # end # # # ## Request Context # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns # information about the request that generated the error. # See {Seahorse::Client::RequestContext} for more information. # # ## Error Classes # * {AuthorizationErrorException} # * {BatchEntryIdsNotDistinctException} # * {BatchRequestTooLongException} # * {ConcurrentAccessException} # * {EmptyBatchRequestException} # * {EndpointDisabledException} # * {FilterPolicyLimitExceededException} # * {InternalErrorException} # * {InvalidBatchEntryIdException} # * {InvalidParameterException} # * {InvalidParameterValueException} # * {InvalidSecurityException} # * {InvalidStateException} # * {KMSAccessDeniedException} # * {KMSDisabledException} # * {KMSInvalidStateException} # * {KMSNotFoundException} # * {KMSOptInRequired} # * {KMSThrottlingException} # * {NotFoundException} # * {OptedOutException} # * {PlatformApplicationDisabledException} # * {ReplayLimitExceededException} # * {ResourceNotFoundException} # * {StaleTagException} # * {SubscriptionLimitExceededException} # * {TagLimitExceededException} # * {TagPolicyException} # * {ThrottledException} # * {TooManyEntriesInBatchRequestException} # * {TopicLimitExceededException} # * {UserErrorException} # * {ValidationException} # * {VerificationException} # # Additionally, error classes are dynamically generated for service errors based on the error code # if they are not defined above. module Errors extend Aws::Errors::DynamicErrors class AuthorizationErrorException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::AuthorizationErrorException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class BatchEntryIdsNotDistinctException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::BatchEntryIdsNotDistinctException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class BatchRequestTooLongException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::BatchRequestTooLongException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ConcurrentAccessException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::ConcurrentAccessException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class EmptyBatchRequestException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::EmptyBatchRequestException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class EndpointDisabledException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::EndpointDisabledException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class FilterPolicyLimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::FilterPolicyLimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InternalErrorException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::InternalErrorException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidBatchEntryIdException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::InvalidBatchEntryIdException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidParameterException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::InvalidParameterException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidParameterValueException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::InvalidParameterValueException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidSecurityException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::InvalidSecurityException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidStateException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::InvalidStateException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class KMSAccessDeniedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::KMSAccessDeniedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class KMSDisabledException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::KMSDisabledException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class KMSInvalidStateException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::KMSInvalidStateException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class KMSNotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::KMSNotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class KMSOptInRequired < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::KMSOptInRequired] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class KMSThrottlingException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::KMSThrottlingException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class NotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::NotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class OptedOutException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::OptedOutException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class PlatformApplicationDisabledException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::PlatformApplicationDisabledException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ReplayLimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::ReplayLimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ResourceNotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::ResourceNotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class StaleTagException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::StaleTagException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class SubscriptionLimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::SubscriptionLimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TagLimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::TagLimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TagPolicyException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::TagPolicyException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ThrottledException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::ThrottledException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TooManyEntriesInBatchRequestException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::TooManyEntriesInBatchRequestException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TopicLimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::TopicLimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UserErrorException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::UserErrorException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ValidationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::ValidationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class VerificationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SNS::Types::VerificationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end # @return [String] def status @data[:status] end end end end