# 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::Snowball # When Snowball returns an error response, the Ruby SDK constructs and raises an error. # These errors all extend Aws::Snowball::Errors::ServiceError < {Aws::Errors::ServiceError} # # You can rescue all Snowball errors using ServiceError: # # begin # # do stuff # rescue Aws::Snowball::Errors::ServiceError # # rescues all Snowball 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 # * {ClusterLimitExceededException} # * {ConflictException} # * {Ec2RequestFailedException} # * {InvalidAddressException} # * {InvalidInputCombinationException} # * {InvalidJobStateException} # * {InvalidNextTokenException} # * {InvalidResourceException} # * {KMSRequestFailedException} # * {ReturnShippingLabelAlreadyExistsException} # * {UnsupportedAddressException} # # 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 ClusterLimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::ClusterLimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ConflictException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::ConflictException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def conflict_resource @data[:conflict_resource] end # @return [String] def message @message || @data[:message] end end class Ec2RequestFailedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::Ec2RequestFailedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidAddressException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::InvalidAddressException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidInputCombinationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::InvalidInputCombinationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidJobStateException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::InvalidJobStateException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidNextTokenException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::InvalidNextTokenException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class InvalidResourceException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::InvalidResourceException] 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 resource_type @data[:resource_type] end end class KMSRequestFailedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::KMSRequestFailedException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class ReturnShippingLabelAlreadyExistsException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::ReturnShippingLabelAlreadyExistsException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnsupportedAddressException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::Snowball::Types::UnsupportedAddressException] 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