# 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::WAF # When WAF returns an error response, the Ruby SDK constructs and raises an error. # These errors all extend Aws::WAF::Errors::ServiceError < {Aws::Errors::ServiceError} # # You can rescue all WAF errors using ServiceError: # # begin # # do stuff # rescue Aws::WAF::Errors::ServiceError # # rescues all WAF 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 # * {WAFBadRequestException} # * {WAFDisallowedNameException} # * {WAFEntityMigrationException} # * {WAFInternalErrorException} # * {WAFInvalidAccountException} # * {WAFInvalidOperationException} # * {WAFInvalidParameterException} # * {WAFInvalidPermissionPolicyException} # * {WAFInvalidRegexPatternException} # * {WAFLimitsExceededException} # * {WAFNonEmptyEntityException} # * {WAFNonexistentContainerException} # * {WAFNonexistentItemException} # * {WAFReferencedItemException} # * {WAFServiceLinkedRoleErrorException} # * {WAFStaleDataException} # * {WAFSubscriptionNotFoundException} # * {WAFTagOperationException} # * {WAFTagOperationInternalErrorException} # # 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 WAFBadRequestException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFBadRequestException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFDisallowedNameException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFDisallowedNameException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFEntityMigrationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFEntityMigrationException] 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 migration_error_type @data[:migration_error_type] end # @return [String] def migration_error_reason @data[:migration_error_reason] end end class WAFInternalErrorException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFInternalErrorException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFInvalidAccountException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFInvalidAccountException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end end class WAFInvalidOperationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFInvalidOperationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFInvalidParameterException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFInvalidParameterException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def field @data[:field] end # @return [String] def parameter @data[:parameter] end # @return [String] def reason @data[:reason] end end class WAFInvalidPermissionPolicyException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFInvalidPermissionPolicyException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFInvalidRegexPatternException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFInvalidRegexPatternException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFLimitsExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFLimitsExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFNonEmptyEntityException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFNonEmptyEntityException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFNonexistentContainerException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFNonexistentContainerException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFNonexistentItemException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFNonexistentItemException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFReferencedItemException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFReferencedItemException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFServiceLinkedRoleErrorException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFServiceLinkedRoleErrorException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFStaleDataException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFStaleDataException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFSubscriptionNotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFSubscriptionNotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFTagOperationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFTagOperationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class WAFTagOperationInternalErrorException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::WAF::Types::WAFTagOperationInternalErrorException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end end end