{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CloudSearch.Types
(
defaultService,
_BaseException,
_DisabledOperationException,
_InternalException,
_InvalidTypeException,
_LimitExceededException,
_ResourceAlreadyExistsException,
_ResourceNotFoundException,
_ValidationException,
AlgorithmicStemming (..),
AnalysisSchemeLanguage (..),
IndexFieldType (..),
OptionState (..),
PartitionInstanceType (..),
SuggesterFuzzyMatching (..),
TLSSecurityPolicy (..),
AccessPoliciesStatus (..),
newAccessPoliciesStatus,
accessPoliciesStatus_options,
accessPoliciesStatus_status,
AnalysisOptions (..),
newAnalysisOptions,
analysisOptions_algorithmicStemming,
analysisOptions_japaneseTokenizationDictionary,
analysisOptions_stemmingDictionary,
analysisOptions_stopwords,
analysisOptions_synonyms,
AnalysisScheme (..),
newAnalysisScheme,
analysisScheme_analysisOptions,
analysisScheme_analysisSchemeName,
analysisScheme_analysisSchemeLanguage,
AnalysisSchemeStatus (..),
newAnalysisSchemeStatus,
analysisSchemeStatus_options,
analysisSchemeStatus_status,
AvailabilityOptionsStatus (..),
newAvailabilityOptionsStatus,
availabilityOptionsStatus_options,
availabilityOptionsStatus_status,
DateArrayOptions (..),
newDateArrayOptions,
dateArrayOptions_defaultValue,
dateArrayOptions_facetEnabled,
dateArrayOptions_returnEnabled,
dateArrayOptions_searchEnabled,
dateArrayOptions_sourceFields,
DateOptions (..),
newDateOptions,
dateOptions_defaultValue,
dateOptions_facetEnabled,
dateOptions_returnEnabled,
dateOptions_searchEnabled,
dateOptions_sortEnabled,
dateOptions_sourceField,
DocumentSuggesterOptions (..),
newDocumentSuggesterOptions,
documentSuggesterOptions_fuzzyMatching,
documentSuggesterOptions_sortExpression,
documentSuggesterOptions_sourceField,
DomainEndpointOptions (..),
newDomainEndpointOptions,
domainEndpointOptions_enforceHTTPS,
domainEndpointOptions_tLSSecurityPolicy,
DomainEndpointOptionsStatus (..),
newDomainEndpointOptionsStatus,
domainEndpointOptionsStatus_options,
domainEndpointOptionsStatus_status,
DomainStatus (..),
newDomainStatus,
domainStatus_arn,
domainStatus_created,
domainStatus_deleted,
domainStatus_docService,
domainStatus_limits,
domainStatus_processing,
domainStatus_searchInstanceCount,
domainStatus_searchInstanceType,
domainStatus_searchPartitionCount,
domainStatus_searchService,
domainStatus_domainId,
domainStatus_domainName,
domainStatus_requiresIndexDocuments,
DoubleArrayOptions (..),
newDoubleArrayOptions,
doubleArrayOptions_defaultValue,
doubleArrayOptions_facetEnabled,
doubleArrayOptions_returnEnabled,
doubleArrayOptions_searchEnabled,
doubleArrayOptions_sourceFields,
DoubleOptions (..),
newDoubleOptions,
doubleOptions_defaultValue,
doubleOptions_facetEnabled,
doubleOptions_returnEnabled,
doubleOptions_searchEnabled,
doubleOptions_sortEnabled,
doubleOptions_sourceField,
Expression (..),
newExpression,
expression_expressionName,
expression_expressionValue,
ExpressionStatus (..),
newExpressionStatus,
expressionStatus_options,
expressionStatus_status,
IndexField (..),
newIndexField,
indexField_dateArrayOptions,
indexField_dateOptions,
indexField_doubleArrayOptions,
indexField_doubleOptions,
indexField_intArrayOptions,
indexField_intOptions,
indexField_latLonOptions,
indexField_literalArrayOptions,
indexField_literalOptions,
indexField_textArrayOptions,
indexField_textOptions,
indexField_indexFieldName,
indexField_indexFieldType,
IndexFieldStatus (..),
newIndexFieldStatus,
indexFieldStatus_options,
indexFieldStatus_status,
IntArrayOptions (..),
newIntArrayOptions,
intArrayOptions_defaultValue,
intArrayOptions_facetEnabled,
intArrayOptions_returnEnabled,
intArrayOptions_searchEnabled,
intArrayOptions_sourceFields,
IntOptions (..),
newIntOptions,
intOptions_defaultValue,
intOptions_facetEnabled,
intOptions_returnEnabled,
intOptions_searchEnabled,
intOptions_sortEnabled,
intOptions_sourceField,
LatLonOptions (..),
newLatLonOptions,
latLonOptions_defaultValue,
latLonOptions_facetEnabled,
latLonOptions_returnEnabled,
latLonOptions_searchEnabled,
latLonOptions_sortEnabled,
latLonOptions_sourceField,
Limits (..),
newLimits,
limits_maximumReplicationCount,
limits_maximumPartitionCount,
LiteralArrayOptions (..),
newLiteralArrayOptions,
literalArrayOptions_defaultValue,
literalArrayOptions_facetEnabled,
literalArrayOptions_returnEnabled,
literalArrayOptions_searchEnabled,
literalArrayOptions_sourceFields,
LiteralOptions (..),
newLiteralOptions,
literalOptions_defaultValue,
literalOptions_facetEnabled,
literalOptions_returnEnabled,
literalOptions_searchEnabled,
literalOptions_sortEnabled,
literalOptions_sourceField,
OptionStatus (..),
newOptionStatus,
optionStatus_pendingDeletion,
optionStatus_updateVersion,
optionStatus_creationDate,
optionStatus_updateDate,
optionStatus_state,
ScalingParameters (..),
newScalingParameters,
scalingParameters_desiredInstanceType,
scalingParameters_desiredPartitionCount,
scalingParameters_desiredReplicationCount,
ScalingParametersStatus (..),
newScalingParametersStatus,
scalingParametersStatus_options,
scalingParametersStatus_status,
ServiceEndpoint (..),
newServiceEndpoint,
serviceEndpoint_endpoint,
Suggester (..),
newSuggester,
suggester_suggesterName,
suggester_documentSuggesterOptions,
SuggesterStatus (..),
newSuggesterStatus,
suggesterStatus_options,
suggesterStatus_status,
TextArrayOptions (..),
newTextArrayOptions,
textArrayOptions_analysisScheme,
textArrayOptions_defaultValue,
textArrayOptions_highlightEnabled,
textArrayOptions_returnEnabled,
textArrayOptions_sourceFields,
TextOptions (..),
newTextOptions,
textOptions_analysisScheme,
textOptions_defaultValue,
textOptions_highlightEnabled,
textOptions_returnEnabled,
textOptions_sortEnabled,
textOptions_sourceField,
)
where
import Amazonka.CloudSearch.Types.AccessPoliciesStatus
import Amazonka.CloudSearch.Types.AlgorithmicStemming
import Amazonka.CloudSearch.Types.AnalysisOptions
import Amazonka.CloudSearch.Types.AnalysisScheme
import Amazonka.CloudSearch.Types.AnalysisSchemeLanguage
import Amazonka.CloudSearch.Types.AnalysisSchemeStatus
import Amazonka.CloudSearch.Types.AvailabilityOptionsStatus
import Amazonka.CloudSearch.Types.DateArrayOptions
import Amazonka.CloudSearch.Types.DateOptions
import Amazonka.CloudSearch.Types.DocumentSuggesterOptions
import Amazonka.CloudSearch.Types.DomainEndpointOptions
import Amazonka.CloudSearch.Types.DomainEndpointOptionsStatus
import Amazonka.CloudSearch.Types.DomainStatus
import Amazonka.CloudSearch.Types.DoubleArrayOptions
import Amazonka.CloudSearch.Types.DoubleOptions
import Amazonka.CloudSearch.Types.Expression
import Amazonka.CloudSearch.Types.ExpressionStatus
import Amazonka.CloudSearch.Types.IndexField
import Amazonka.CloudSearch.Types.IndexFieldStatus
import Amazonka.CloudSearch.Types.IndexFieldType
import Amazonka.CloudSearch.Types.IntArrayOptions
import Amazonka.CloudSearch.Types.IntOptions
import Amazonka.CloudSearch.Types.LatLonOptions
import Amazonka.CloudSearch.Types.Limits
import Amazonka.CloudSearch.Types.LiteralArrayOptions
import Amazonka.CloudSearch.Types.LiteralOptions
import Amazonka.CloudSearch.Types.OptionState
import Amazonka.CloudSearch.Types.OptionStatus
import Amazonka.CloudSearch.Types.PartitionInstanceType
import Amazonka.CloudSearch.Types.ScalingParameters
import Amazonka.CloudSearch.Types.ScalingParametersStatus
import Amazonka.CloudSearch.Types.ServiceEndpoint
import Amazonka.CloudSearch.Types.Suggester
import Amazonka.CloudSearch.Types.SuggesterFuzzyMatching
import Amazonka.CloudSearch.Types.SuggesterStatus
import Amazonka.CloudSearch.Types.TLSSecurityPolicy
import Amazonka.CloudSearch.Types.TextArrayOptions
import Amazonka.CloudSearch.Types.TextOptions
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Sign.V4 as Sign
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"CloudSearch",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"cloudsearch",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"cloudsearch",
$sel:version:Service :: ByteString
Core.version = ByteString
"2013-01-01",
$sel:s3AddressingStyle:Service :: S3AddressingStyle
Core.s3AddressingStyle = S3AddressingStyle
Core.S3AddressingStyleAuto,
$sel:endpoint:Service :: Region -> Endpoint
Core.endpoint = Service -> Region -> Endpoint
Core.defaultEndpoint Service
defaultService,
$sel:timeout:Service :: Maybe Seconds
Core.timeout = forall a. a -> Maybe a
Prelude.Just Seconds
70,
$sel:check:Service :: Status -> Bool
Core.check = Status -> Bool
Core.statusSuccess,
$sel:error:Service :: Status -> [Header] -> ByteStringLazy -> Error
Core.error = Abbrev -> Status -> [Header] -> ByteStringLazy -> Error
Core.parseXMLError Abbrev
"CloudSearch",
$sel:retry:Service :: Retry
Core.retry = Retry
retry
}
where
retry :: Retry
retry =
Core.Exponential
{ $sel:base:Exponential :: Double
Core.base = Double
5.0e-2,
$sel:growth:Exponential :: Int
Core.growth = Int
2,
$sel:attempts:Exponential :: Int
Core.attempts = Int
5,
$sel:check:Exponential :: ServiceError -> Maybe Text
Core.check = forall {a}. IsString a => ServiceError -> Maybe a
check
}
check :: ServiceError -> Maybe a
check ServiceError
e
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
502) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"bad_gateway"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
504) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"gateway_timeout"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"general_server_error"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"BandwidthLimitExceeded"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
509
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_limit_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"RequestThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"request_throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
503) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"service_unavailable"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottledException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttled_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"Throttling"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode ErrorCode
"ThrottlingException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throttling_exception"
| forall s a. Getting Any s a -> s -> Bool
Lens.has
( forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
ErrorCode -> Optic' p f ServiceError ServiceError
Core.hasCode
ErrorCode
"ProvisionedThroughputExceededException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
400
)
ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"throughput_exceeded"
| forall s a. Getting Any s a -> s -> Bool
Lens.has (forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
429) ServiceError
e =
forall a. a -> Maybe a
Prelude.Just a
"too_many_requests"
| Bool
Prelude.otherwise = forall a. Maybe a
Prelude.Nothing
_BaseException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_BaseException :: forall a. AsError a => Fold a ServiceError
_BaseException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"BaseException"
_DisabledOperationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_DisabledOperationException :: forall a. AsError a => Fold a ServiceError
_DisabledOperationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"DisabledAction"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409
_InternalException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalException :: forall a. AsError a => Fold a ServiceError
_InternalException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalException"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
500
_InvalidTypeException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InvalidTypeException :: forall a. AsError a => Fold a ServiceError
_InvalidTypeException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InvalidType"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409
_LimitExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_LimitExceededException :: forall a. AsError a => Fold a ServiceError
_LimitExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"LimitExceeded"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409
_ResourceAlreadyExistsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceAlreadyExistsException :: forall a. AsError a => Fold a ServiceError
_ResourceAlreadyExistsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceAlreadyExists"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409
_ResourceNotFoundException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ResourceNotFoundException :: forall a. AsError a => Fold a ServiceError
_ResourceNotFoundException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ResourceNotFound"
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (p :: * -> * -> *).
(Applicative f, Choice p) =>
Int -> Optic' p f ServiceError ServiceError
Core.hasStatus Int
409
_ValidationException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ValidationException :: forall a. AsError a => Fold a ServiceError
_ValidationException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ValidationException"