# 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/master/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE module Aws::SMS # When SMS returns an error response, the Ruby SDK constructs and raises an error. # These errors all extend Aws::SMS::Errors::ServiceError < {Aws::Errors::ServiceError} # # You can rescue all SMS errors using ServiceError: # # begin # # do stuff # rescue Aws::SMS::Errors::ServiceError # # rescues all SMS 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 # * {DryRunOperationException} # * {InternalError} # * {InvalidParameterException} # * {MissingRequiredParameterException} # * {NoConnectorsAvailableException} # * {OperationNotPermittedException} # * {ReplicationJobAlreadyExistsException} # * {ReplicationJobNotFoundException} # * {ReplicationRunLimitExceededException} # * {ServerCannotBeReplicatedException} # * {TemporarilyUnavailableException} # * {UnauthorizedOperationException} # # 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 DryRunOperationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::DryRunOperationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InternalError < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::InternalError] 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::SMS::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 MissingRequiredParameterException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::MissingRequiredParameterException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class NoConnectorsAvailableException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::NoConnectorsAvailableException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class OperationNotPermittedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::OperationNotPermittedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ReplicationJobAlreadyExistsException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::ReplicationJobAlreadyExistsException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ReplicationJobNotFoundException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::ReplicationJobNotFoundException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ReplicationRunLimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::ReplicationRunLimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ServerCannotBeReplicatedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::ServerCannotBeReplicatedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TemporarilyUnavailableException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::TemporarilyUnavailableException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end end class UnauthorizedOperationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::SMS::Types::UnauthorizedOperationException] 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