{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Wisdom.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_PreconditionFailedException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_TooManyTagsException,
_ValidationException,
AssistantStatus (..),
AssistantType (..),
AssociationType (..),
ContentStatus (..),
FilterField (..),
FilterOperator (..),
KnowledgeBaseStatus (..),
KnowledgeBaseType (..),
RecommendationSourceType (..),
RecommendationTriggerType (..),
RecommendationType (..),
RelevanceLevel (..),
AppIntegrationsConfiguration (..),
newAppIntegrationsConfiguration,
appIntegrationsConfiguration_appIntegrationArn,
appIntegrationsConfiguration_objectFields,
AssistantAssociationData (..),
newAssistantAssociationData,
assistantAssociationData_tags,
assistantAssociationData_assistantArn,
assistantAssociationData_assistantAssociationArn,
assistantAssociationData_assistantAssociationId,
assistantAssociationData_assistantId,
assistantAssociationData_associationData,
assistantAssociationData_associationType,
AssistantAssociationInputData (..),
newAssistantAssociationInputData,
assistantAssociationInputData_knowledgeBaseId,
AssistantAssociationOutputData (..),
newAssistantAssociationOutputData,
assistantAssociationOutputData_knowledgeBaseAssociation,
AssistantAssociationSummary (..),
newAssistantAssociationSummary,
assistantAssociationSummary_tags,
assistantAssociationSummary_assistantArn,
assistantAssociationSummary_assistantAssociationArn,
assistantAssociationSummary_assistantAssociationId,
assistantAssociationSummary_assistantId,
assistantAssociationSummary_associationData,
assistantAssociationSummary_associationType,
AssistantData (..),
newAssistantData,
assistantData_description,
assistantData_serverSideEncryptionConfiguration,
assistantData_tags,
assistantData_assistantArn,
assistantData_assistantId,
assistantData_name,
assistantData_status,
assistantData_type,
AssistantSummary (..),
newAssistantSummary,
assistantSummary_description,
assistantSummary_serverSideEncryptionConfiguration,
assistantSummary_tags,
assistantSummary_assistantArn,
assistantSummary_assistantId,
assistantSummary_name,
assistantSummary_status,
assistantSummary_type,
ContentData (..),
newContentData,
contentData_linkOutUri,
contentData_tags,
contentData_contentArn,
contentData_contentId,
contentData_contentType,
contentData_knowledgeBaseArn,
contentData_knowledgeBaseId,
contentData_metadata,
contentData_name,
contentData_revisionId,
contentData_status,
contentData_title,
contentData_url,
contentData_urlExpiry,
ContentReference (..),
newContentReference,
contentReference_contentArn,
contentReference_contentId,
contentReference_knowledgeBaseArn,
contentReference_knowledgeBaseId,
ContentSummary (..),
newContentSummary,
contentSummary_tags,
contentSummary_contentArn,
contentSummary_contentId,
contentSummary_contentType,
contentSummary_knowledgeBaseArn,
contentSummary_knowledgeBaseId,
contentSummary_metadata,
contentSummary_name,
contentSummary_revisionId,
contentSummary_status,
contentSummary_title,
Document (..),
newDocument,
document_excerpt,
document_title,
document_contentReference,
DocumentText (..),
newDocumentText,
documentText_highlights,
documentText_text,
Filter (..),
newFilter,
filter_field,
filter_operator,
filter_value,
Highlight (..),
newHighlight,
highlight_beginOffsetInclusive,
highlight_endOffsetExclusive,
KnowledgeBaseAssociationData (..),
newKnowledgeBaseAssociationData,
knowledgeBaseAssociationData_knowledgeBaseArn,
knowledgeBaseAssociationData_knowledgeBaseId,
KnowledgeBaseData (..),
newKnowledgeBaseData,
knowledgeBaseData_description,
knowledgeBaseData_lastContentModificationTime,
knowledgeBaseData_renderingConfiguration,
knowledgeBaseData_serverSideEncryptionConfiguration,
knowledgeBaseData_sourceConfiguration,
knowledgeBaseData_tags,
knowledgeBaseData_knowledgeBaseArn,
knowledgeBaseData_knowledgeBaseId,
knowledgeBaseData_knowledgeBaseType,
knowledgeBaseData_name,
knowledgeBaseData_status,
KnowledgeBaseSummary (..),
newKnowledgeBaseSummary,
knowledgeBaseSummary_description,
knowledgeBaseSummary_renderingConfiguration,
knowledgeBaseSummary_serverSideEncryptionConfiguration,
knowledgeBaseSummary_sourceConfiguration,
knowledgeBaseSummary_tags,
knowledgeBaseSummary_knowledgeBaseArn,
knowledgeBaseSummary_knowledgeBaseId,
knowledgeBaseSummary_knowledgeBaseType,
knowledgeBaseSummary_name,
knowledgeBaseSummary_status,
NotifyRecommendationsReceivedError (..),
newNotifyRecommendationsReceivedError,
notifyRecommendationsReceivedError_message,
notifyRecommendationsReceivedError_recommendationId,
QueryRecommendationTriggerData (..),
newQueryRecommendationTriggerData,
queryRecommendationTriggerData_text,
RecommendationData (..),
newRecommendationData,
recommendationData_relevanceLevel,
recommendationData_relevanceScore,
recommendationData_type,
recommendationData_document,
recommendationData_recommendationId,
RecommendationTrigger (..),
newRecommendationTrigger,
recommendationTrigger_data,
recommendationTrigger_id,
recommendationTrigger_recommendationIds,
recommendationTrigger_source,
recommendationTrigger_type,
RecommendationTriggerData (..),
newRecommendationTriggerData,
recommendationTriggerData_query,
RenderingConfiguration (..),
newRenderingConfiguration,
renderingConfiguration_templateUri,
ResultData (..),
newResultData,
resultData_relevanceScore,
resultData_document,
resultData_resultId,
SearchExpression (..),
newSearchExpression,
searchExpression_filters,
ServerSideEncryptionConfiguration (..),
newServerSideEncryptionConfiguration,
serverSideEncryptionConfiguration_kmsKeyId,
SessionData (..),
newSessionData,
sessionData_description,
sessionData_tags,
sessionData_name,
sessionData_sessionArn,
sessionData_sessionId,
SessionSummary (..),
newSessionSummary,
sessionSummary_assistantArn,
sessionSummary_assistantId,
sessionSummary_sessionArn,
sessionSummary_sessionId,
SourceConfiguration (..),
newSourceConfiguration,
sourceConfiguration_appIntegrations,
)
where
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
import Amazonka.Wisdom.Types.AppIntegrationsConfiguration
import Amazonka.Wisdom.Types.AssistantAssociationData
import Amazonka.Wisdom.Types.AssistantAssociationInputData
import Amazonka.Wisdom.Types.AssistantAssociationOutputData
import Amazonka.Wisdom.Types.AssistantAssociationSummary
import Amazonka.Wisdom.Types.AssistantData
import Amazonka.Wisdom.Types.AssistantStatus
import Amazonka.Wisdom.Types.AssistantSummary
import Amazonka.Wisdom.Types.AssistantType
import Amazonka.Wisdom.Types.AssociationType
import Amazonka.Wisdom.Types.ContentData
import Amazonka.Wisdom.Types.ContentReference
import Amazonka.Wisdom.Types.ContentStatus
import Amazonka.Wisdom.Types.ContentSummary
import Amazonka.Wisdom.Types.Document
import Amazonka.Wisdom.Types.DocumentText
import Amazonka.Wisdom.Types.Filter
import Amazonka.Wisdom.Types.FilterField
import Amazonka.Wisdom.Types.FilterOperator
import Amazonka.Wisdom.Types.Highlight
import Amazonka.Wisdom.Types.KnowledgeBaseAssociationData
import Amazonka.Wisdom.Types.KnowledgeBaseData
import Amazonka.Wisdom.Types.KnowledgeBaseStatus
import Amazonka.Wisdom.Types.KnowledgeBaseSummary
import Amazonka.Wisdom.Types.KnowledgeBaseType
import Amazonka.Wisdom.Types.NotifyRecommendationsReceivedError
import Amazonka.Wisdom.Types.QueryRecommendationTriggerData
import Amazonka.Wisdom.Types.RecommendationData
import Amazonka.Wisdom.Types.RecommendationSourceType
import Amazonka.Wisdom.Types.RecommendationTrigger
import Amazonka.Wisdom.Types.RecommendationTriggerData
import Amazonka.Wisdom.Types.RecommendationTriggerType
import Amazonka.Wisdom.Types.RecommendationType
import Amazonka.Wisdom.Types.RelevanceLevel
import Amazonka.Wisdom.Types.RenderingConfiguration
import Amazonka.Wisdom.Types.ResultData
import Amazonka.Wisdom.Types.SearchExpression
import Amazonka.Wisdom.Types.ServerSideEncryptionConfiguration
import Amazonka.Wisdom.Types.SessionData
import Amazonka.Wisdom.Types.SessionSummary
import Amazonka.Wisdom.Types.SourceConfiguration
defaultService :: Core.Service
defaultService :: Service
defaultService =
Core.Service
{ $sel:abbrev:Service :: Abbrev
Core.abbrev = Abbrev
"Wisdom",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"wisdom",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"wisdom",
$sel:version:Service :: ByteString
Core.version = ByteString
"2020-10-19",
$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.parseJSONError Abbrev
"Wisdom",
$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
"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
_AccessDeniedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_AccessDeniedException :: forall a. AsError a => Fold a ServiceError
_AccessDeniedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"AccessDeniedException"
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
403
_ConflictException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ConflictException :: forall a. AsError a => Fold a ServiceError
_ConflictException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ConflictException"
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
_PreconditionFailedException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_PreconditionFailedException :: forall a. AsError a => Fold a ServiceError
_PreconditionFailedException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"PreconditionFailedException"
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
412
_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
"ResourceNotFoundException"
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
404
_ServiceQuotaExceededException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ServiceQuotaExceededException :: forall a. AsError a => Fold a ServiceError
_ServiceQuotaExceededException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"ServiceQuotaExceededException"
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
402
_TooManyTagsException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_TooManyTagsException :: forall a. AsError a => Fold a ServiceError
_TooManyTagsException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"TooManyTagsException"
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
_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"
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