{-# LANGUAGE OverloadedStrings #-}
module Network.AWS.Pinpoint.Types
(
pinpoint
, _ForbiddenException
, _NotFoundException
, _TooManyRequestsException
, _InternalServerErrorException
, _MethodNotAllowedException
, _BadRequestException
, Action (..)
, AttributeType (..)
, CampaignStatus (..)
, ChannelType (..)
, DefinitionFormat (..)
, DeliveryStatus (..)
, DimensionType (..)
, Duration (..)
, Frequency (..)
, JobStatus (..)
, MessageType (..)
, Mode (..)
, RecencyType (..)
, SegmentType (..)
, ADMChannelRequest
, aDMChannelRequest
, admcrClientId
, admcrClientSecret
, admcrEnabled
, ADMChannelResponse
, aDMChannelResponse
, admcPlatform
, admcLastModifiedDate
, admcEnabled
, admcIsArchived
, admcApplicationId
, admcVersion
, admcId
, admcCreationDate
, admcLastModifiedBy
, admcHasCredential
, ADMMessage
, aDMMessage
, admmSubstitutions
, admmExpiresAfter
, admmMD5
, admmSilentPush
, admmImageIconURL
, admmRawContent
, admmData
, admmSmallImageIconURL
, admmBody
, admmURL
, admmSound
, admmAction
, admmImageURL
, admmConsolidationKey
, admmTitle
, admmIconReference
, APNSChannelRequest
, apnsChannelRequest
, acrTokenKey
, acrPrivateKey
, acrEnabled
, acrTeamId
, acrBundleId
, acrDefaultAuthenticationMethod
, acrCertificate
, acrTokenKeyId
, APNSChannelResponse
, apnsChannelResponse
, acPlatform
, acLastModifiedDate
, acEnabled
, acHasTokenKey
, acDefaultAuthenticationMethod
, acIsArchived
, acApplicationId
, acVersion
, acId
, acCreationDate
, acLastModifiedBy
, acHasCredential
, APNSMessage
, apnsMessage
, amSubstitutions
, amSilentPush
, amPriority
, amRawContent
, amData
, amBody
, amCategory
, amTimeToLive
, amURL
, amSound
, amAction
, amMediaURL
, amPreferredAuthenticationMethod
, amBadge
, amTitle
, amThreadId
, amCollapseId
, APNSSandboxChannelRequest
, apnsSandboxChannelRequest
, ascrTokenKey
, ascrPrivateKey
, ascrEnabled
, ascrTeamId
, ascrBundleId
, ascrDefaultAuthenticationMethod
, ascrCertificate
, ascrTokenKeyId
, APNSSandboxChannelResponse
, apnsSandboxChannelResponse
, ascPlatform
, ascLastModifiedDate
, ascEnabled
, ascHasTokenKey
, ascDefaultAuthenticationMethod
, ascIsArchived
, ascApplicationId
, ascVersion
, ascId
, ascCreationDate
, ascLastModifiedBy
, ascHasCredential
, APNSVoipChannelRequest
, apnsVoipChannelRequest
, avcrTokenKey
, avcrPrivateKey
, avcrEnabled
, avcrTeamId
, avcrBundleId
, avcrDefaultAuthenticationMethod
, avcrCertificate
, avcrTokenKeyId
, APNSVoipChannelResponse
, apnsVoipChannelResponse
, avcPlatform
, avcLastModifiedDate
, avcEnabled
, avcHasTokenKey
, avcDefaultAuthenticationMethod
, avcIsArchived
, avcApplicationId
, avcVersion
, avcId
, avcCreationDate
, avcLastModifiedBy
, avcHasCredential
, APNSVoipSandboxChannelRequest
, apnsVoipSandboxChannelRequest
, avscrTokenKey
, avscrPrivateKey
, avscrEnabled
, avscrTeamId
, avscrBundleId
, avscrDefaultAuthenticationMethod
, avscrCertificate
, avscrTokenKeyId
, APNSVoipSandboxChannelResponse
, apnsVoipSandboxChannelResponse
, avscPlatform
, avscLastModifiedDate
, avscEnabled
, avscHasTokenKey
, avscDefaultAuthenticationMethod
, avscIsArchived
, avscApplicationId
, avscVersion
, avscId
, avscCreationDate
, avscLastModifiedBy
, avscHasCredential
, ActivitiesResponse
, activitiesResponse
, aItem
, ActivityResponse
, activityResponse
, aState
, aStart
, aCampaignId
, aTimezonesCompletedCount
, aTimezonesTotalCount
, aResult
, aTreatmentId
, aSuccessfulEndpointCount
, aEnd
, aApplicationId
, aTotalEndpointCount
, aId
, aScheduledStart
, AddressConfiguration
, addressConfiguration
, acSubstitutions
, acTitleOverride
, acContext
, acRawContent
, acBodyOverride
, acChannelType
, ApplicationResponse
, applicationResponse
, appName
, appId
, ApplicationSettingsResource
, applicationSettingsResource
, asrLastModifiedDate
, asrLimits
, asrQuietTime
, asrApplicationId
, asrCampaignHook
, ApplicationsResponse
, applicationsResponse
, appNextToken
, appItem
, AttributeDimension
, attributeDimension
, adValues
, adAttributeType
, BaiduChannelRequest
, baiduChannelRequest
, bcrAPIKey
, bcrEnabled
, bcrSecretKey
, BaiduChannelResponse
, baiduChannelResponse
, bcPlatform
, bcLastModifiedDate
, bcEnabled
, bcCredential
, bcIsArchived
, bcApplicationId
, bcVersion
, bcId
, bcCreationDate
, bcLastModifiedBy
, bcHasCredential
, BaiduMessage
, baiduMessage
, bmSubstitutions
, bmSilentPush
, bmImageIconURL
, bmRawContent
, bmData
, bmSmallImageIconURL
, bmBody
, bmURL
, bmSound
, bmAction
, bmImageURL
, bmTitle
, bmIconReference
, CampaignEmailMessage
, campaignEmailMessage
, cemBody
, cemFromAddress
, cemHTMLBody
, cemTitle
, CampaignHook
, campaignHook
, chLambdaFunctionName
, chMode
, chWebURL
, CampaignLimits
, campaignLimits
, clMessagesPerSecond
, clDaily
, clTotal
, clMaximumDuration
, CampaignResponse
, campaignResponse
, cState
, cLastModifiedDate
, cSchedule
, cHook
, cTreatmentName
, cLimits
, cIsPaused
, cDefaultState
, cApplicationId
, cName
, cVersion
, cHoldoutPercent
, cTreatmentDescription
, cId
, cCreationDate
, cMessageConfiguration
, cDescription
, cSegmentId
, cAdditionalTreatments
, cSegmentVersion
, CampaignSmsMessage
, campaignSmsMessage
, csmBody
, csmMessageType
, csmSenderId
, CampaignState
, campaignState
, csCampaignStatus
, CampaignsResponse
, campaignsResponse
, cNextToken
, cItem
, CreateApplicationRequest
, createApplicationRequest
, carName
, DefaultMessage
, defaultMessage
, dmSubstitutions
, dmBody
, DefaultPushNotificationMessage
, defaultPushNotificationMessage
, dpnmSubstitutions
, dpnmSilentPush
, dpnmData
, dpnmBody
, dpnmURL
, dpnmAction
, dpnmTitle
, DirectMessageConfiguration
, directMessageConfiguration
, dmcAPNSMessage
, dmcGCMMessage
, dmcDefaultMessage
, dmcADMMessage
, dmcSMSMessage
, dmcBaiduMessage
, dmcDefaultPushNotificationMessage
, EmailChannelRequest
, emailChannelRequest
, ecrEnabled
, ecrFromAddress
, ecrIdentity
, ecrRoleARN
, EmailChannelResponse
, emailChannelResponse
, ecPlatform
, ecLastModifiedDate
, ecEnabled
, ecFromAddress
, ecIsArchived
, ecApplicationId
, ecVersion
, ecId
, ecCreationDate
, ecLastModifiedBy
, ecIdentity
, ecHasCredential
, ecRoleARN
, EndpointBatchItem
, endpointBatchItem
, ebiRequestId
, ebiMetrics
, ebiLocation
, ebiDemographic
, ebiAddress
, ebiEffectiveDate
, ebiUser
, ebiAttributes
, ebiEndpointStatus
, ebiOptOut
, ebiId
, ebiChannelType
, EndpointBatchRequest
, endpointBatchRequest
, ebrItem
, EndpointDemographic
, endpointDemographic
, edPlatform
, edPlatformVersion
, edLocale
, edAppVersion
, edModel
, edMake
, edModelVersion
, edTimezone
, EndpointLocation
, endpointLocation
, elPostalCode
, elLatitude
, elCountry
, elCity
, elRegion
, elLongitude
, EndpointMessageResult
, endpointMessageResult
, emrDeliveryStatus
, emrAddress
, emrStatusMessage
, emrUpdatedToken
, emrStatusCode
, EndpointRequest
, endpointRequest
, erRequestId
, erMetrics
, erLocation
, erDemographic
, erAddress
, erEffectiveDate
, erUser
, erAttributes
, erEndpointStatus
, erOptOut
, erChannelType
, EndpointResponse
, endpointResponse
, eRequestId
, eMetrics
, eLocation
, eDemographic
, eCohortId
, eAddress
, eEffectiveDate
, eUser
, eApplicationId
, eAttributes
, eEndpointStatus
, eOptOut
, eId
, eCreationDate
, eChannelType
, EndpointSendConfiguration
, endpointSendConfiguration
, escSubstitutions
, escTitleOverride
, escContext
, escRawContent
, escBodyOverride
, EndpointUser
, endpointUser
, euUserAttributes
, euUserId
, EventStream
, eventStream
, esLastUpdatedBy
, esLastModifiedDate
, esDestinationStreamARN
, esApplicationId
, esExternalId
, esRoleARN
, ExportJobRequest
, exportJobRequest
, eS3URLPrefix
, eSegmentId
, eRoleARN
, ExportJobResource
, exportJobResource
, ejrS3URLPrefix
, ejrSegmentId
, ejrRoleARN
, ExportJobResponse
, exportJobResponse
, ejCompletedPieces
, ejFailedPieces
, ejDefinition
, ejTotalProcessed
, ejFailures
, ejTotalPieces
, ejApplicationId
, ejId
, ejCreationDate
, ejType
, ejCompletionDate
, ejJobStatus
, ejTotalFailures
, ExportJobsResponse
, exportJobsResponse
, ejNextToken
, ejItem
, GCMChannelRequest
, gcmChannelRequest
, gcrAPIKey
, gcrEnabled
, GCMChannelResponse
, gcmChannelResponse
, gcPlatform
, gcLastModifiedDate
, gcEnabled
, gcCredential
, gcIsArchived
, gcApplicationId
, gcVersion
, gcId
, gcCreationDate
, gcLastModifiedBy
, gcHasCredential
, GCMMessage
, gcmMessage
, gmSubstitutions
, gmSilentPush
, gmImageIconURL
, gmPriority
, gmRawContent
, gmData
, gmRestrictedPackageName
, gmSmallImageIconURL
, gmBody
, gmTimeToLive
, gmURL
, gmSound
, gmAction
, gmCollapseKey
, gmImageURL
, gmTitle
, gmIconReference
, ImportJobRequest
, importJobRequest
, iSegmentName
, iFormat
, iDefineSegment
, iRegisterEndpoints
, iExternalId
, iS3URL
, iSegmentId
, iRoleARN
, ImportJobResource
, importJobResource
, ijrSegmentName
, ijrFormat
, ijrDefineSegment
, ijrRegisterEndpoints
, ijrExternalId
, ijrS3URL
, ijrSegmentId
, ijrRoleARN
, ImportJobResponse
, importJobResponse
, ijCompletedPieces
, ijFailedPieces
, ijDefinition
, ijTotalProcessed
, ijFailures
, ijTotalPieces
, ijApplicationId
, ijId
, ijCreationDate
, ijType
, ijCompletionDate
, ijJobStatus
, ijTotalFailures
, ImportJobsResponse
, importJobsResponse
, ijNextToken
, ijItem
, Message
, message
, mSilentPush
, mImageIconURL
, mRawContent
, mBody
, mImageSmallIconURL
, mJSONBody
, mURL
, mAction
, mImageURL
, mMediaURL
, mTitle
, MessageBody
, messageBody
, mbRequestId
, mbMessage
, MessageConfiguration
, messageConfiguration
, mcAPNSMessage
, mcGCMMessage
, mcDefaultMessage
, mcADMMessage
, mcSMSMessage
, mcEmailMessage
, mcBaiduMessage
, MessageRequest
, messageRequest
, mrContext
, mrAddresses
, mrEndpoints
, mrMessageConfiguration
, MessageResponse
, messageResponse
, mRequestId
, mResult
, mApplicationId
, mEndpointResult
, MessageResult
, messageResult
, mrDeliveryStatus
, mrStatusMessage
, mrUpdatedToken
, mrStatusCode
, QuietTime
, quietTime
, qtStart
, qtEnd
, RecencyDimension
, recencyDimension
, rdRecencyType
, rdDuration
, SMSChannelRequest
, sMSChannelRequest
, smscrShortCode
, smscrEnabled
, smscrSenderId
, SMSChannelResponse
, sMSChannelResponse
, smscPlatform
, smscShortCode
, smscLastModifiedDate
, smscEnabled
, smscSenderId
, smscIsArchived
, smscApplicationId
, smscVersion
, smscId
, smscCreationDate
, smscLastModifiedBy
, smscHasCredential
, SMSMessage
, sMSMessage
, smsmSubstitutions
, smsmOriginationNumber
, smsmBody
, smsmMessageType
, smsmSenderId
, Schedule
, schedule
, sFrequency
, sStartTime
, sQuietTime
, sIsLocalTime
, sEndTime
, sTimezone
, SegmentBehaviors
, segmentBehaviors
, sbRecency
, SegmentDemographics
, segmentDemographics
, sdPlatform
, sdAppVersion
, sdChannel
, sdModel
, sdMake
, sdDeviceType
, SegmentDimensions
, segmentDimensions
, sdLocation
, sdDemographic
, sdUserAttributes
, sdBehavior
, sdAttributes
, SegmentImportResource
, segmentImportResource
, sirSize
, sirFormat
, sirChannelCounts
, sirExternalId
, sirS3URL
, sirRoleARN
, SegmentLocation
, segmentLocation
, slCountry
, SegmentResponse
, segmentResponse
, sLastModifiedDate
, sSegmentType
, sApplicationId
, sName
, sVersion
, sId
, sCreationDate
, sImportDefinition
, sDimensions
, SegmentsResponse
, segmentsResponse
, sNextToken
, sItem
, SendUsersMessageRequest
, sendUsersMessageRequest
, sumrContext
, sumrUsers
, sumrMessageConfiguration
, SendUsersMessageResponse
, sendUsersMessageResponse
, sumRequestId
, sumResult
, sumApplicationId
, SetDimension
, setDimension
, sdValues
, sdDimensionType
, TreatmentResource
, treatmentResource
, trState
, trSchedule
, trTreatmentName
, trSizePercent
, trTreatmentDescription
, trId
, trMessageConfiguration
, WriteApplicationSettingsRequest
, writeApplicationSettingsRequest
, wasrLimits
, wasrQuietTime
, wasrCampaignHook
, WriteCampaignRequest
, writeCampaignRequest
, wcrSchedule
, wcrHook
, wcrTreatmentName
, wcrLimits
, wcrIsPaused
, wcrName
, wcrHoldoutPercent
, wcrTreatmentDescription
, wcrMessageConfiguration
, wcrDescription
, wcrSegmentId
, wcrAdditionalTreatments
, wcrSegmentVersion
, WriteEventStream
, writeEventStream
, wesDestinationStreamARN
, wesRoleARN
, WriteSegmentRequest
, writeSegmentRequest
, wsrName
, wsrDimensions
, WriteTreatmentResource
, writeTreatmentResource
, wtrSchedule
, wtrTreatmentName
, wtrSizePercent
, wtrTreatmentDescription
, wtrMessageConfiguration
) where
import Network.AWS.Lens
import Network.AWS.Pinpoint.Types.Product
import Network.AWS.Pinpoint.Types.Sum
import Network.AWS.Prelude
import Network.AWS.Sign.V4
pinpoint :: Service
pinpoint =
Service
{ _svcAbbrev = "Pinpoint"
, _svcSigner = v4
, _svcPrefix = "pinpoint"
, _svcVersion = "2016-12-01"
, _svcEndpoint = defaultEndpoint pinpoint
, _svcTimeout = Just 70
, _svcCheck = statusSuccess
, _svcError = parseJSONError "Pinpoint"
, _svcRetry = retry
}
where
retry =
Exponential
{ _retryBase = 5.0e-2
, _retryGrowth = 2
, _retryAttempts = 5
, _retryCheck = check
}
check e
| has (hasCode "ThrottledException" . hasStatus 400) e =
Just "throttled_exception"
| has (hasStatus 429) e = Just "too_many_requests"
| has (hasCode "ThrottlingException" . hasStatus 400) e =
Just "throttling_exception"
| has (hasCode "Throttling" . hasStatus 400) e = Just "throttling"
| has (hasStatus 504) e = Just "gateway_timeout"
| has (hasCode "RequestThrottledException" . hasStatus 400) e =
Just "request_throttled_exception"
| has (hasStatus 502) e = Just "bad_gateway"
| has (hasStatus 503) e = Just "service_unavailable"
| has (hasStatus 500) e = Just "general_server_error"
| has (hasStatus 509) e = Just "limit_exceeded"
| otherwise = Nothing
_ForbiddenException :: AsError a => Getting (First ServiceError) a ServiceError
_ForbiddenException =
_MatchServiceError pinpoint "ForbiddenException" . hasStatus 403
_NotFoundException :: AsError a => Getting (First ServiceError) a ServiceError
_NotFoundException =
_MatchServiceError pinpoint "NotFoundException" . hasStatus 404
_TooManyRequestsException :: AsError a => Getting (First ServiceError) a ServiceError
_TooManyRequestsException =
_MatchServiceError pinpoint "TooManyRequestsException" . hasStatus 429
_InternalServerErrorException :: AsError a => Getting (First ServiceError) a ServiceError
_InternalServerErrorException =
_MatchServiceError pinpoint "InternalServerErrorException" . hasStatus 500
_MethodNotAllowedException :: AsError a => Getting (First ServiceError) a ServiceError
_MethodNotAllowedException =
_MatchServiceError pinpoint "MethodNotAllowedException" . hasStatus 405
_BadRequestException :: AsError a => Getting (First ServiceError) a ServiceError
_BadRequestException =
_MatchServiceError pinpoint "BadRequestException" . hasStatus 400