# 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::CostExplorer # When CostExplorer returns an error response, the Ruby SDK constructs and raises an error. # These errors all extend Aws::CostExplorer::Errors::ServiceError < {Aws::Errors::ServiceError} # # You can rescue all CostExplorer errors using ServiceError: # # begin # # do stuff # rescue Aws::CostExplorer::Errors::ServiceError # # rescues all CostExplorer 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 # * {BillExpirationException} # * {DataUnavailableException} # * {InvalidNextTokenException} # * {LimitExceededException} # * {RequestChangedException} # * {ResourceNotFoundException} # * {ServiceQuotaExceededException} # * {TooManyTagsException} # * {UnknownMonitorException} # * {UnknownSubscriptionException} # * {UnresolvableUsageUnitException} # # 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 BillExpirationException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CostExplorer::Types::BillExpirationException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class DataUnavailableException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CostExplorer::Types::DataUnavailableException] 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::CostExplorer::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 LimitExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CostExplorer::Types::LimitExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class RequestChangedException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CostExplorer::Types::RequestChangedException] 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::CostExplorer::Types::ResourceNotFoundException] 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_name @data[:resource_name] end end class ServiceQuotaExceededException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CostExplorer::Types::ServiceQuotaExceededException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class TooManyTagsException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CostExplorer::Types::TooManyTagsException] 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_name @data[:resource_name] end end class UnknownMonitorException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CostExplorer::Types::UnknownMonitorException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnknownSubscriptionException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CostExplorer::Types::UnknownSubscriptionException] data def initialize(context, message, data = Aws::EmptyStructure.new) super(context, message, data) end # @return [String] def message @message || @data[:message] end end class UnresolvableUsageUnitException < ServiceError # @param [Seahorse::Client::RequestContext] context # @param [String] message # @param [Aws::CostExplorer::Types::UnresolvableUsageUnitException] 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