lib/aws-sdk-signer/errors.rb in aws-sdk-signer-1.26.0 vs lib/aws-sdk-signer/errors.rb in aws-sdk-signer-1.27.0

- old
+ new

@@ -27,14 +27,17 @@ # See {Seahorse::Client::RequestContext} for more information. # # ## Error Classes # * {AccessDeniedException} # * {BadRequestException} + # * {ConflictException} # * {InternalServiceErrorException} # * {NotFoundException} # * {ResourceNotFoundException} + # * {ServiceLimitExceededException} # * {ThrottlingException} + # * {TooManyRequestsException} # * {ValidationException} # # Additionally, error classes are dynamically generated for service errors based on the error code # if they are not defined above. module Errors @@ -52,10 +55,15 @@ # @return [String] def message @message || @data[:message] end + + # @return [String] + def code + @code || @data[:code] + end end class BadRequestException < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -67,12 +75,37 @@ # @return [String] def message @message || @data[:message] end + + # @return [String] + def code + @code || @data[:code] + end end + class ConflictException < ServiceError + + # @param [Seahorse::Client::RequestContext] context + # @param [String] message + # @param [Aws::Signer::Types::ConflictException] 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 code + @code || @data[:code] + end + end + class InternalServiceErrorException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Signer::Types::InternalServiceErrorException] data @@ -82,10 +115,15 @@ # @return [String] def message @message || @data[:message] end + + # @return [String] + def code + @code || @data[:code] + end end class NotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -97,10 +135,15 @@ # @return [String] def message @message || @data[:message] end + + # @return [String] + def code + @code || @data[:code] + end end class ResourceNotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -112,12 +155,37 @@ # @return [String] def message @message || @data[:message] end + + # @return [String] + def code + @code || @data[:code] + end end + class ServiceLimitExceededException < ServiceError + + # @param [Seahorse::Client::RequestContext] context + # @param [String] message + # @param [Aws::Signer::Types::ServiceLimitExceededException] 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 code + @code || @data[:code] + end + end + class ThrottlingException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Signer::Types::ThrottlingException] data @@ -127,12 +195,37 @@ # @return [String] def message @message || @data[:message] end + + # @return [String] + def code + @code || @data[:code] + end end + class TooManyRequestsException < ServiceError + + # @param [Seahorse::Client::RequestContext] context + # @param [String] message + # @param [Aws::Signer::Types::TooManyRequestsException] 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 code + @code || @data[:code] + end + end + class ValidationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Signer::Types::ValidationException] data @@ -141,9 +234,14 @@ end # @return [String] def message @message || @data[:message] + end + + # @return [String] + def code + @code || @data[:code] end end end end