{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ConnectCases.Types
(
defaultService,
_AccessDeniedException,
_ConflictException,
_InternalServerException,
_ResourceNotFoundException,
_ServiceQuotaExceededException,
_ThrottlingException,
_ValidationException,
CommentBodyTextType (..),
DomainStatus (..),
FieldNamespace (..),
FieldType (..),
Order (..),
RelatedItemType (..),
TemplateStatus (..),
BasicLayout (..),
newBasicLayout,
basicLayout_moreInfo,
basicLayout_topPanel,
CaseEventIncludedData (..),
newCaseEventIncludedData,
caseEventIncludedData_fields,
CaseFilter (..),
newCaseFilter,
caseFilter_andAll,
caseFilter_field,
caseFilter_not,
CaseSummary (..),
newCaseSummary,
caseSummary_caseId,
caseSummary_templateId,
CommentContent (..),
newCommentContent,
commentContent_body,
commentContent_contentType,
CommentFilter (..),
newCommentFilter,
Contact (..),
newContact,
contact_contactArn,
ContactContent (..),
newContactContent,
contactContent_channel,
contactContent_connectedToSystemTime,
contactContent_contactArn,
ContactFilter (..),
newContactFilter,
contactFilter_channel,
contactFilter_contactArn,
DomainSummary (..),
newDomainSummary,
domainSummary_domainArn,
domainSummary_domainId,
domainSummary_name,
EventBridgeConfiguration (..),
newEventBridgeConfiguration,
eventBridgeConfiguration_includedData,
eventBridgeConfiguration_enabled,
EventIncludedData (..),
newEventIncludedData,
eventIncludedData_caseData,
eventIncludedData_relatedItemData,
FieldError (..),
newFieldError,
fieldError_message,
fieldError_errorCode,
fieldError_id,
FieldFilter (..),
newFieldFilter,
fieldFilter_contains,
fieldFilter_equalTo,
fieldFilter_greaterThan,
fieldFilter_greaterThanOrEqualTo,
fieldFilter_lessThan,
fieldFilter_lessThanOrEqualTo,
FieldGroup (..),
newFieldGroup,
fieldGroup_name,
fieldGroup_fields,
FieldIdentifier (..),
newFieldIdentifier,
fieldIdentifier_id,
FieldItem (..),
newFieldItem,
fieldItem_id,
FieldOption (..),
newFieldOption,
fieldOption_active,
fieldOption_name,
fieldOption_value,
FieldOptionError (..),
newFieldOptionError,
fieldOptionError_errorCode,
fieldOptionError_message,
fieldOptionError_value,
FieldSummary (..),
newFieldSummary,
fieldSummary_fieldArn,
fieldSummary_fieldId,
fieldSummary_name,
fieldSummary_namespace,
fieldSummary_type,
FieldValue (..),
newFieldValue,
fieldValue_id,
fieldValue_value,
FieldValueUnion (..),
newFieldValueUnion,
fieldValueUnion_booleanValue,
fieldValueUnion_doubleValue,
fieldValueUnion_stringValue,
GetFieldResponse (..),
newGetFieldResponse,
getFieldResponse_description,
getFieldResponse_tags,
getFieldResponse_fieldArn,
getFieldResponse_fieldId,
getFieldResponse_name,
getFieldResponse_namespace,
getFieldResponse_type,
LayoutConfiguration (..),
newLayoutConfiguration,
layoutConfiguration_defaultLayout,
LayoutContent (..),
newLayoutContent,
layoutContent_basic,
LayoutSections (..),
newLayoutSections,
layoutSections_sections,
LayoutSummary (..),
newLayoutSummary,
layoutSummary_layoutArn,
layoutSummary_layoutId,
layoutSummary_name,
RelatedItemContent (..),
newRelatedItemContent,
relatedItemContent_comment,
relatedItemContent_contact,
RelatedItemEventIncludedData (..),
newRelatedItemEventIncludedData,
relatedItemEventIncludedData_includeContent,
RelatedItemInputContent (..),
newRelatedItemInputContent,
relatedItemInputContent_comment,
relatedItemInputContent_contact,
RelatedItemTypeFilter (..),
newRelatedItemTypeFilter,
relatedItemTypeFilter_comment,
relatedItemTypeFilter_contact,
RequiredField (..),
newRequiredField,
requiredField_fieldId,
SearchCasesResponseItem (..),
newSearchCasesResponseItem,
searchCasesResponseItem_tags,
searchCasesResponseItem_caseId,
searchCasesResponseItem_fields,
searchCasesResponseItem_templateId,
SearchRelatedItemsResponseItem (..),
newSearchRelatedItemsResponseItem,
searchRelatedItemsResponseItem_tags,
searchRelatedItemsResponseItem_associationTime,
searchRelatedItemsResponseItem_content,
searchRelatedItemsResponseItem_relatedItemId,
searchRelatedItemsResponseItem_type,
Section (..),
newSection,
section_fieldGroup,
Sort (..),
newSort,
sort_fieldId,
sort_sortOrder,
TemplateSummary (..),
newTemplateSummary,
templateSummary_name,
templateSummary_status,
templateSummary_templateArn,
templateSummary_templateId,
)
where
import Amazonka.ConnectCases.Types.BasicLayout
import Amazonka.ConnectCases.Types.CaseEventIncludedData
import Amazonka.ConnectCases.Types.CaseFilter
import Amazonka.ConnectCases.Types.CaseSummary
import Amazonka.ConnectCases.Types.CommentBodyTextType
import Amazonka.ConnectCases.Types.CommentContent
import Amazonka.ConnectCases.Types.CommentFilter
import Amazonka.ConnectCases.Types.Contact
import Amazonka.ConnectCases.Types.ContactContent
import Amazonka.ConnectCases.Types.ContactFilter
import Amazonka.ConnectCases.Types.DomainStatus
import Amazonka.ConnectCases.Types.DomainSummary
import Amazonka.ConnectCases.Types.EventBridgeConfiguration
import Amazonka.ConnectCases.Types.EventIncludedData
import Amazonka.ConnectCases.Types.FieldError
import Amazonka.ConnectCases.Types.FieldFilter
import Amazonka.ConnectCases.Types.FieldGroup
import Amazonka.ConnectCases.Types.FieldIdentifier
import Amazonka.ConnectCases.Types.FieldItem
import Amazonka.ConnectCases.Types.FieldNamespace
import Amazonka.ConnectCases.Types.FieldOption
import Amazonka.ConnectCases.Types.FieldOptionError
import Amazonka.ConnectCases.Types.FieldSummary
import Amazonka.ConnectCases.Types.FieldType
import Amazonka.ConnectCases.Types.FieldValue
import Amazonka.ConnectCases.Types.FieldValueUnion
import Amazonka.ConnectCases.Types.GetFieldResponse
import Amazonka.ConnectCases.Types.LayoutConfiguration
import Amazonka.ConnectCases.Types.LayoutContent
import Amazonka.ConnectCases.Types.LayoutSections
import Amazonka.ConnectCases.Types.LayoutSummary
import Amazonka.ConnectCases.Types.Order
import Amazonka.ConnectCases.Types.RelatedItemContent
import Amazonka.ConnectCases.Types.RelatedItemEventIncludedData
import Amazonka.ConnectCases.Types.RelatedItemInputContent
import Amazonka.ConnectCases.Types.RelatedItemType
import Amazonka.ConnectCases.Types.RelatedItemTypeFilter
import Amazonka.ConnectCases.Types.RequiredField
import Amazonka.ConnectCases.Types.SearchCasesResponseItem
import Amazonka.ConnectCases.Types.SearchRelatedItemsResponseItem
import Amazonka.ConnectCases.Types.Section
import Amazonka.ConnectCases.Types.Sort
import Amazonka.ConnectCases.Types.TemplateStatus
import Amazonka.ConnectCases.Types.TemplateSummary
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
"ConnectCases",
$sel:signer:Service :: Signer
Core.signer = Signer
Sign.v4,
$sel:endpointPrefix:Service :: ByteString
Core.endpointPrefix = ByteString
"cases",
$sel:signingName:Service :: ByteString
Core.signingName = ByteString
"cases",
$sel:version:Service :: ByteString
Core.version = ByteString
"2022-10-03",
$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
"ConnectCases",
$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
_InternalServerException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_InternalServerException :: forall a. AsError a => Fold a ServiceError
_InternalServerException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
ErrorCode
"InternalServerException"
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
_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
_ThrottlingException :: (Core.AsError a) => Lens.Fold a Core.ServiceError
_ThrottlingException :: forall a. AsError a => Fold a ServiceError
_ThrottlingException =
forall a. AsError a => Service -> ErrorCode -> Fold a ServiceError
Core._MatchServiceError
Service
defaultService
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
429
_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