module Network.AWS.CloudFront.Types.Product where
import Network.AWS.CloudFront.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data ActiveTrustedSigners = ActiveTrustedSigners'
{ _atsItems :: !(Maybe [Signer])
, _atsEnabled :: !Bool
, _atsQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
activeTrustedSigners
:: Bool
-> Int
-> ActiveTrustedSigners
activeTrustedSigners pEnabled_ pQuantity_ =
ActiveTrustedSigners'
{ _atsItems = Nothing
, _atsEnabled = pEnabled_
, _atsQuantity = pQuantity_
}
atsItems :: Lens' ActiveTrustedSigners [Signer]
atsItems = lens _atsItems (\ s a -> s{_atsItems = a}) . _Default . _Coerce;
atsEnabled :: Lens' ActiveTrustedSigners Bool
atsEnabled = lens _atsEnabled (\ s a -> s{_atsEnabled = a});
atsQuantity :: Lens' ActiveTrustedSigners Int
atsQuantity = lens _atsQuantity (\ s a -> s{_atsQuantity = a});
instance FromXML ActiveTrustedSigners where
parseXML x
= ActiveTrustedSigners' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "Signer"))
<*> (x .@ "Enabled")
<*> (x .@ "Quantity")
instance Hashable ActiveTrustedSigners
instance NFData ActiveTrustedSigners
data Aliases = Aliases'
{ _aItems :: !(Maybe [Text])
, _aQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
aliases
:: Int
-> Aliases
aliases pQuantity_ =
Aliases'
{ _aItems = Nothing
, _aQuantity = pQuantity_
}
aItems :: Lens' Aliases [Text]
aItems = lens _aItems (\ s a -> s{_aItems = a}) . _Default . _Coerce;
aQuantity :: Lens' Aliases Int
aQuantity = lens _aQuantity (\ s a -> s{_aQuantity = a});
instance FromXML Aliases where
parseXML x
= Aliases' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "CNAME"))
<*> (x .@ "Quantity")
instance Hashable Aliases
instance NFData Aliases
instance ToXML Aliases where
toXML Aliases'{..}
= mconcat
["Items" @= toXML (toXMLList "CNAME" <$> _aItems),
"Quantity" @= _aQuantity]
data AllowedMethods = AllowedMethods'
{ _amCachedMethods :: !(Maybe CachedMethods)
, _amQuantity :: !Int
, _amItems :: ![Method]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
allowedMethods
:: Int
-> AllowedMethods
allowedMethods pQuantity_ =
AllowedMethods'
{ _amCachedMethods = Nothing
, _amQuantity = pQuantity_
, _amItems = mempty
}
amCachedMethods :: Lens' AllowedMethods (Maybe CachedMethods)
amCachedMethods = lens _amCachedMethods (\ s a -> s{_amCachedMethods = a});
amQuantity :: Lens' AllowedMethods Int
amQuantity = lens _amQuantity (\ s a -> s{_amQuantity = a});
amItems :: Lens' AllowedMethods [Method]
amItems = lens _amItems (\ s a -> s{_amItems = a}) . _Coerce;
instance FromXML AllowedMethods where
parseXML x
= AllowedMethods' <$>
(x .@? "CachedMethods") <*> (x .@ "Quantity") <*>
(x .@? "Items" .!@ mempty >>= parseXMLList "Method")
instance Hashable AllowedMethods
instance NFData AllowedMethods
instance ToXML AllowedMethods where
toXML AllowedMethods'{..}
= mconcat
["CachedMethods" @= _amCachedMethods,
"Quantity" @= _amQuantity,
"Items" @= toXMLList "Method" _amItems]
data CacheBehavior = CacheBehavior'
{ _cbAllowedMethods :: !(Maybe AllowedMethods)
, _cbMaxTTL :: !(Maybe Integer)
, _cbCompress :: !(Maybe Bool)
, _cbSmoothStreaming :: !(Maybe Bool)
, _cbDefaultTTL :: !(Maybe Integer)
, _cbPathPattern :: !Text
, _cbTargetOriginId :: !Text
, _cbForwardedValues :: !ForwardedValues
, _cbTrustedSigners :: !TrustedSigners
, _cbViewerProtocolPolicy :: !ViewerProtocolPolicy
, _cbMinTTL :: !Integer
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cacheBehavior
:: Text
-> Text
-> ForwardedValues
-> TrustedSigners
-> ViewerProtocolPolicy
-> Integer
-> CacheBehavior
cacheBehavior pPathPattern_ pTargetOriginId_ pForwardedValues_ pTrustedSigners_ pViewerProtocolPolicy_ pMinTTL_ =
CacheBehavior'
{ _cbAllowedMethods = Nothing
, _cbMaxTTL = Nothing
, _cbCompress = Nothing
, _cbSmoothStreaming = Nothing
, _cbDefaultTTL = Nothing
, _cbPathPattern = pPathPattern_
, _cbTargetOriginId = pTargetOriginId_
, _cbForwardedValues = pForwardedValues_
, _cbTrustedSigners = pTrustedSigners_
, _cbViewerProtocolPolicy = pViewerProtocolPolicy_
, _cbMinTTL = pMinTTL_
}
cbAllowedMethods :: Lens' CacheBehavior (Maybe AllowedMethods)
cbAllowedMethods = lens _cbAllowedMethods (\ s a -> s{_cbAllowedMethods = a});
cbMaxTTL :: Lens' CacheBehavior (Maybe Integer)
cbMaxTTL = lens _cbMaxTTL (\ s a -> s{_cbMaxTTL = a});
cbCompress :: Lens' CacheBehavior (Maybe Bool)
cbCompress = lens _cbCompress (\ s a -> s{_cbCompress = a});
cbSmoothStreaming :: Lens' CacheBehavior (Maybe Bool)
cbSmoothStreaming = lens _cbSmoothStreaming (\ s a -> s{_cbSmoothStreaming = a});
cbDefaultTTL :: Lens' CacheBehavior (Maybe Integer)
cbDefaultTTL = lens _cbDefaultTTL (\ s a -> s{_cbDefaultTTL = a});
cbPathPattern :: Lens' CacheBehavior Text
cbPathPattern = lens _cbPathPattern (\ s a -> s{_cbPathPattern = a});
cbTargetOriginId :: Lens' CacheBehavior Text
cbTargetOriginId = lens _cbTargetOriginId (\ s a -> s{_cbTargetOriginId = a});
cbForwardedValues :: Lens' CacheBehavior ForwardedValues
cbForwardedValues = lens _cbForwardedValues (\ s a -> s{_cbForwardedValues = a});
cbTrustedSigners :: Lens' CacheBehavior TrustedSigners
cbTrustedSigners = lens _cbTrustedSigners (\ s a -> s{_cbTrustedSigners = a});
cbViewerProtocolPolicy :: Lens' CacheBehavior ViewerProtocolPolicy
cbViewerProtocolPolicy = lens _cbViewerProtocolPolicy (\ s a -> s{_cbViewerProtocolPolicy = a});
cbMinTTL :: Lens' CacheBehavior Integer
cbMinTTL = lens _cbMinTTL (\ s a -> s{_cbMinTTL = a});
instance FromXML CacheBehavior where
parseXML x
= CacheBehavior' <$>
(x .@? "AllowedMethods") <*> (x .@? "MaxTTL") <*>
(x .@? "Compress")
<*> (x .@? "SmoothStreaming")
<*> (x .@? "DefaultTTL")
<*> (x .@ "PathPattern")
<*> (x .@ "TargetOriginId")
<*> (x .@ "ForwardedValues")
<*> (x .@ "TrustedSigners")
<*> (x .@ "ViewerProtocolPolicy")
<*> (x .@ "MinTTL")
instance Hashable CacheBehavior
instance NFData CacheBehavior
instance ToXML CacheBehavior where
toXML CacheBehavior'{..}
= mconcat
["AllowedMethods" @= _cbAllowedMethods,
"MaxTTL" @= _cbMaxTTL, "Compress" @= _cbCompress,
"SmoothStreaming" @= _cbSmoothStreaming,
"DefaultTTL" @= _cbDefaultTTL,
"PathPattern" @= _cbPathPattern,
"TargetOriginId" @= _cbTargetOriginId,
"ForwardedValues" @= _cbForwardedValues,
"TrustedSigners" @= _cbTrustedSigners,
"ViewerProtocolPolicy" @= _cbViewerProtocolPolicy,
"MinTTL" @= _cbMinTTL]
data CacheBehaviors = CacheBehaviors'
{ _cbItems :: !(Maybe [CacheBehavior])
, _cbQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cacheBehaviors
:: Int
-> CacheBehaviors
cacheBehaviors pQuantity_ =
CacheBehaviors'
{ _cbItems = Nothing
, _cbQuantity = pQuantity_
}
cbItems :: Lens' CacheBehaviors [CacheBehavior]
cbItems = lens _cbItems (\ s a -> s{_cbItems = a}) . _Default . _Coerce;
cbQuantity :: Lens' CacheBehaviors Int
cbQuantity = lens _cbQuantity (\ s a -> s{_cbQuantity = a});
instance FromXML CacheBehaviors where
parseXML x
= CacheBehaviors' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "CacheBehavior"))
<*> (x .@ "Quantity")
instance Hashable CacheBehaviors
instance NFData CacheBehaviors
instance ToXML CacheBehaviors where
toXML CacheBehaviors'{..}
= mconcat
["Items" @=
toXML (toXMLList "CacheBehavior" <$> _cbItems),
"Quantity" @= _cbQuantity]
data CachedMethods = CachedMethods'
{ _cmQuantity :: !Int
, _cmItems :: ![Method]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cachedMethods
:: Int
-> CachedMethods
cachedMethods pQuantity_ =
CachedMethods'
{ _cmQuantity = pQuantity_
, _cmItems = mempty
}
cmQuantity :: Lens' CachedMethods Int
cmQuantity = lens _cmQuantity (\ s a -> s{_cmQuantity = a});
cmItems :: Lens' CachedMethods [Method]
cmItems = lens _cmItems (\ s a -> s{_cmItems = a}) . _Coerce;
instance FromXML CachedMethods where
parseXML x
= CachedMethods' <$>
(x .@ "Quantity") <*>
(x .@? "Items" .!@ mempty >>= parseXMLList "Method")
instance Hashable CachedMethods
instance NFData CachedMethods
instance ToXML CachedMethods where
toXML CachedMethods'{..}
= mconcat
["Quantity" @= _cmQuantity,
"Items" @= toXMLList "Method" _cmItems]
data CloudFrontOriginAccessIdentity = CloudFrontOriginAccessIdentity'
{ _cfoaiCloudFrontOriginAccessIdentityConfig :: !(Maybe CloudFrontOriginAccessIdentityConfig)
, _cfoaiId :: !Text
, _cfoaiS3CanonicalUserId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cloudFrontOriginAccessIdentity
:: Text
-> Text
-> CloudFrontOriginAccessIdentity
cloudFrontOriginAccessIdentity pId_ pS3CanonicalUserId_ =
CloudFrontOriginAccessIdentity'
{ _cfoaiCloudFrontOriginAccessIdentityConfig = Nothing
, _cfoaiId = pId_
, _cfoaiS3CanonicalUserId = pS3CanonicalUserId_
}
cfoaiCloudFrontOriginAccessIdentityConfig :: Lens' CloudFrontOriginAccessIdentity (Maybe CloudFrontOriginAccessIdentityConfig)
cfoaiCloudFrontOriginAccessIdentityConfig = lens _cfoaiCloudFrontOriginAccessIdentityConfig (\ s a -> s{_cfoaiCloudFrontOriginAccessIdentityConfig = a});
cfoaiId :: Lens' CloudFrontOriginAccessIdentity Text
cfoaiId = lens _cfoaiId (\ s a -> s{_cfoaiId = a});
cfoaiS3CanonicalUserId :: Lens' CloudFrontOriginAccessIdentity Text
cfoaiS3CanonicalUserId = lens _cfoaiS3CanonicalUserId (\ s a -> s{_cfoaiS3CanonicalUserId = a});
instance FromXML CloudFrontOriginAccessIdentity where
parseXML x
= CloudFrontOriginAccessIdentity' <$>
(x .@? "CloudFrontOriginAccessIdentityConfig") <*>
(x .@ "Id")
<*> (x .@ "S3CanonicalUserId")
instance Hashable CloudFrontOriginAccessIdentity
instance NFData CloudFrontOriginAccessIdentity
data CloudFrontOriginAccessIdentityConfig = CloudFrontOriginAccessIdentityConfig'
{ _cfoaicCallerReference :: !Text
, _cfoaicComment :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cloudFrontOriginAccessIdentityConfig
:: Text
-> Text
-> CloudFrontOriginAccessIdentityConfig
cloudFrontOriginAccessIdentityConfig pCallerReference_ pComment_ =
CloudFrontOriginAccessIdentityConfig'
{ _cfoaicCallerReference = pCallerReference_
, _cfoaicComment = pComment_
}
cfoaicCallerReference :: Lens' CloudFrontOriginAccessIdentityConfig Text
cfoaicCallerReference = lens _cfoaicCallerReference (\ s a -> s{_cfoaicCallerReference = a});
cfoaicComment :: Lens' CloudFrontOriginAccessIdentityConfig Text
cfoaicComment = lens _cfoaicComment (\ s a -> s{_cfoaicComment = a});
instance FromXML CloudFrontOriginAccessIdentityConfig
where
parseXML x
= CloudFrontOriginAccessIdentityConfig' <$>
(x .@ "CallerReference") <*> (x .@ "Comment")
instance Hashable
CloudFrontOriginAccessIdentityConfig
instance NFData CloudFrontOriginAccessIdentityConfig
instance ToXML CloudFrontOriginAccessIdentityConfig
where
toXML CloudFrontOriginAccessIdentityConfig'{..}
= mconcat
["CallerReference" @= _cfoaicCallerReference,
"Comment" @= _cfoaicComment]
data CloudFrontOriginAccessIdentityList = CloudFrontOriginAccessIdentityList'
{ _cfoailItems :: !(Maybe [CloudFrontOriginAccessIdentitySummary])
, _cfoailNextMarker :: !(Maybe Text)
, _cfoailMarker :: !Text
, _cfoailMaxItems :: !Int
, _cfoailIsTruncated :: !Bool
, _cfoailQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cloudFrontOriginAccessIdentityList
:: Text
-> Int
-> Bool
-> Int
-> CloudFrontOriginAccessIdentityList
cloudFrontOriginAccessIdentityList pMarker_ pMaxItems_ pIsTruncated_ pQuantity_ =
CloudFrontOriginAccessIdentityList'
{ _cfoailItems = Nothing
, _cfoailNextMarker = Nothing
, _cfoailMarker = pMarker_
, _cfoailMaxItems = pMaxItems_
, _cfoailIsTruncated = pIsTruncated_
, _cfoailQuantity = pQuantity_
}
cfoailItems :: Lens' CloudFrontOriginAccessIdentityList [CloudFrontOriginAccessIdentitySummary]
cfoailItems = lens _cfoailItems (\ s a -> s{_cfoailItems = a}) . _Default . _Coerce;
cfoailNextMarker :: Lens' CloudFrontOriginAccessIdentityList (Maybe Text)
cfoailNextMarker = lens _cfoailNextMarker (\ s a -> s{_cfoailNextMarker = a});
cfoailMarker :: Lens' CloudFrontOriginAccessIdentityList Text
cfoailMarker = lens _cfoailMarker (\ s a -> s{_cfoailMarker = a});
cfoailMaxItems :: Lens' CloudFrontOriginAccessIdentityList Int
cfoailMaxItems = lens _cfoailMaxItems (\ s a -> s{_cfoailMaxItems = a});
cfoailIsTruncated :: Lens' CloudFrontOriginAccessIdentityList Bool
cfoailIsTruncated = lens _cfoailIsTruncated (\ s a -> s{_cfoailIsTruncated = a});
cfoailQuantity :: Lens' CloudFrontOriginAccessIdentityList Int
cfoailQuantity = lens _cfoailQuantity (\ s a -> s{_cfoailQuantity = a});
instance FromXML CloudFrontOriginAccessIdentityList
where
parseXML x
= CloudFrontOriginAccessIdentityList' <$>
(x .@? "Items" .!@ mempty >>=
may
(parseXMLList
"CloudFrontOriginAccessIdentitySummary"))
<*> (x .@? "NextMarker")
<*> (x .@ "Marker")
<*> (x .@ "MaxItems")
<*> (x .@ "IsTruncated")
<*> (x .@ "Quantity")
instance Hashable CloudFrontOriginAccessIdentityList
instance NFData CloudFrontOriginAccessIdentityList
data CloudFrontOriginAccessIdentitySummary = CloudFrontOriginAccessIdentitySummary'
{ _cfoaisId :: !Text
, _cfoaisS3CanonicalUserId :: !Text
, _cfoaisComment :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cloudFrontOriginAccessIdentitySummary
:: Text
-> Text
-> Text
-> CloudFrontOriginAccessIdentitySummary
cloudFrontOriginAccessIdentitySummary pId_ pS3CanonicalUserId_ pComment_ =
CloudFrontOriginAccessIdentitySummary'
{ _cfoaisId = pId_
, _cfoaisS3CanonicalUserId = pS3CanonicalUserId_
, _cfoaisComment = pComment_
}
cfoaisId :: Lens' CloudFrontOriginAccessIdentitySummary Text
cfoaisId = lens _cfoaisId (\ s a -> s{_cfoaisId = a});
cfoaisS3CanonicalUserId :: Lens' CloudFrontOriginAccessIdentitySummary Text
cfoaisS3CanonicalUserId = lens _cfoaisS3CanonicalUserId (\ s a -> s{_cfoaisS3CanonicalUserId = a});
cfoaisComment :: Lens' CloudFrontOriginAccessIdentitySummary Text
cfoaisComment = lens _cfoaisComment (\ s a -> s{_cfoaisComment = a});
instance FromXML
CloudFrontOriginAccessIdentitySummary where
parseXML x
= CloudFrontOriginAccessIdentitySummary' <$>
(x .@ "Id") <*> (x .@ "S3CanonicalUserId") <*>
(x .@ "Comment")
instance Hashable
CloudFrontOriginAccessIdentitySummary
instance NFData CloudFrontOriginAccessIdentitySummary
data CookieNames = CookieNames'
{ _cnItems :: !(Maybe [Text])
, _cnQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cookieNames
:: Int
-> CookieNames
cookieNames pQuantity_ =
CookieNames'
{ _cnItems = Nothing
, _cnQuantity = pQuantity_
}
cnItems :: Lens' CookieNames [Text]
cnItems = lens _cnItems (\ s a -> s{_cnItems = a}) . _Default . _Coerce;
cnQuantity :: Lens' CookieNames Int
cnQuantity = lens _cnQuantity (\ s a -> s{_cnQuantity = a});
instance FromXML CookieNames where
parseXML x
= CookieNames' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "Name"))
<*> (x .@ "Quantity")
instance Hashable CookieNames
instance NFData CookieNames
instance ToXML CookieNames where
toXML CookieNames'{..}
= mconcat
["Items" @= toXML (toXMLList "Name" <$> _cnItems),
"Quantity" @= _cnQuantity]
data CookiePreference = CookiePreference'
{ _cpWhitelistedNames :: !(Maybe CookieNames)
, _cpForward :: !ItemSelection
} deriving (Eq,Read,Show,Data,Typeable,Generic)
cookiePreference
:: ItemSelection
-> CookiePreference
cookiePreference pForward_ =
CookiePreference'
{ _cpWhitelistedNames = Nothing
, _cpForward = pForward_
}
cpWhitelistedNames :: Lens' CookiePreference (Maybe CookieNames)
cpWhitelistedNames = lens _cpWhitelistedNames (\ s a -> s{_cpWhitelistedNames = a});
cpForward :: Lens' CookiePreference ItemSelection
cpForward = lens _cpForward (\ s a -> s{_cpForward = a});
instance FromXML CookiePreference where
parseXML x
= CookiePreference' <$>
(x .@? "WhitelistedNames") <*> (x .@ "Forward")
instance Hashable CookiePreference
instance NFData CookiePreference
instance ToXML CookiePreference where
toXML CookiePreference'{..}
= mconcat
["WhitelistedNames" @= _cpWhitelistedNames,
"Forward" @= _cpForward]
data CustomErrorResponse = CustomErrorResponse'
{ _ceResponsePagePath :: !(Maybe Text)
, _ceResponseCode :: !(Maybe Text)
, _ceErrorCachingMinTTL :: !(Maybe Integer)
, _ceErrorCode :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
customErrorResponse
:: Int
-> CustomErrorResponse
customErrorResponse pErrorCode_ =
CustomErrorResponse'
{ _ceResponsePagePath = Nothing
, _ceResponseCode = Nothing
, _ceErrorCachingMinTTL = Nothing
, _ceErrorCode = pErrorCode_
}
ceResponsePagePath :: Lens' CustomErrorResponse (Maybe Text)
ceResponsePagePath = lens _ceResponsePagePath (\ s a -> s{_ceResponsePagePath = a});
ceResponseCode :: Lens' CustomErrorResponse (Maybe Text)
ceResponseCode = lens _ceResponseCode (\ s a -> s{_ceResponseCode = a});
ceErrorCachingMinTTL :: Lens' CustomErrorResponse (Maybe Integer)
ceErrorCachingMinTTL = lens _ceErrorCachingMinTTL (\ s a -> s{_ceErrorCachingMinTTL = a});
ceErrorCode :: Lens' CustomErrorResponse Int
ceErrorCode = lens _ceErrorCode (\ s a -> s{_ceErrorCode = a});
instance FromXML CustomErrorResponse where
parseXML x
= CustomErrorResponse' <$>
(x .@? "ResponsePagePath") <*> (x .@? "ResponseCode")
<*> (x .@? "ErrorCachingMinTTL")
<*> (x .@ "ErrorCode")
instance Hashable CustomErrorResponse
instance NFData CustomErrorResponse
instance ToXML CustomErrorResponse where
toXML CustomErrorResponse'{..}
= mconcat
["ResponsePagePath" @= _ceResponsePagePath,
"ResponseCode" @= _ceResponseCode,
"ErrorCachingMinTTL" @= _ceErrorCachingMinTTL,
"ErrorCode" @= _ceErrorCode]
data CustomErrorResponses = CustomErrorResponses'
{ _cerItems :: !(Maybe [CustomErrorResponse])
, _cerQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
customErrorResponses
:: Int
-> CustomErrorResponses
customErrorResponses pQuantity_ =
CustomErrorResponses'
{ _cerItems = Nothing
, _cerQuantity = pQuantity_
}
cerItems :: Lens' CustomErrorResponses [CustomErrorResponse]
cerItems = lens _cerItems (\ s a -> s{_cerItems = a}) . _Default . _Coerce;
cerQuantity :: Lens' CustomErrorResponses Int
cerQuantity = lens _cerQuantity (\ s a -> s{_cerQuantity = a});
instance FromXML CustomErrorResponses where
parseXML x
= CustomErrorResponses' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "CustomErrorResponse"))
<*> (x .@ "Quantity")
instance Hashable CustomErrorResponses
instance NFData CustomErrorResponses
instance ToXML CustomErrorResponses where
toXML CustomErrorResponses'{..}
= mconcat
["Items" @=
toXML
(toXMLList "CustomErrorResponse" <$> _cerItems),
"Quantity" @= _cerQuantity]
data CustomHeaders = CustomHeaders'
{ _chItems :: !(Maybe [OriginCustomHeader])
, _chQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
customHeaders
:: Int
-> CustomHeaders
customHeaders pQuantity_ =
CustomHeaders'
{ _chItems = Nothing
, _chQuantity = pQuantity_
}
chItems :: Lens' CustomHeaders [OriginCustomHeader]
chItems = lens _chItems (\ s a -> s{_chItems = a}) . _Default . _Coerce;
chQuantity :: Lens' CustomHeaders Int
chQuantity = lens _chQuantity (\ s a -> s{_chQuantity = a});
instance FromXML CustomHeaders where
parseXML x
= CustomHeaders' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "OriginCustomHeader"))
<*> (x .@ "Quantity")
instance Hashable CustomHeaders
instance NFData CustomHeaders
instance ToXML CustomHeaders where
toXML CustomHeaders'{..}
= mconcat
["Items" @=
toXML (toXMLList "OriginCustomHeader" <$> _chItems),
"Quantity" @= _chQuantity]
data CustomOriginConfig = CustomOriginConfig'
{ _cocOriginSSLProtocols :: !(Maybe OriginSSLProtocols)
, _cocHTTPPort :: !Int
, _cocHTTPSPort :: !Int
, _cocOriginProtocolPolicy :: !OriginProtocolPolicy
} deriving (Eq,Read,Show,Data,Typeable,Generic)
customOriginConfig
:: Int
-> Int
-> OriginProtocolPolicy
-> CustomOriginConfig
customOriginConfig pHTTPPort_ pHTTPSPort_ pOriginProtocolPolicy_ =
CustomOriginConfig'
{ _cocOriginSSLProtocols = Nothing
, _cocHTTPPort = pHTTPPort_
, _cocHTTPSPort = pHTTPSPort_
, _cocOriginProtocolPolicy = pOriginProtocolPolicy_
}
cocOriginSSLProtocols :: Lens' CustomOriginConfig (Maybe OriginSSLProtocols)
cocOriginSSLProtocols = lens _cocOriginSSLProtocols (\ s a -> s{_cocOriginSSLProtocols = a});
cocHTTPPort :: Lens' CustomOriginConfig Int
cocHTTPPort = lens _cocHTTPPort (\ s a -> s{_cocHTTPPort = a});
cocHTTPSPort :: Lens' CustomOriginConfig Int
cocHTTPSPort = lens _cocHTTPSPort (\ s a -> s{_cocHTTPSPort = a});
cocOriginProtocolPolicy :: Lens' CustomOriginConfig OriginProtocolPolicy
cocOriginProtocolPolicy = lens _cocOriginProtocolPolicy (\ s a -> s{_cocOriginProtocolPolicy = a});
instance FromXML CustomOriginConfig where
parseXML x
= CustomOriginConfig' <$>
(x .@? "OriginSslProtocols") <*> (x .@ "HTTPPort")
<*> (x .@ "HTTPSPort")
<*> (x .@ "OriginProtocolPolicy")
instance Hashable CustomOriginConfig
instance NFData CustomOriginConfig
instance ToXML CustomOriginConfig where
toXML CustomOriginConfig'{..}
= mconcat
["OriginSslProtocols" @= _cocOriginSSLProtocols,
"HTTPPort" @= _cocHTTPPort,
"HTTPSPort" @= _cocHTTPSPort,
"OriginProtocolPolicy" @= _cocOriginProtocolPolicy]
data DefaultCacheBehavior = DefaultCacheBehavior'
{ _dcbAllowedMethods :: !(Maybe AllowedMethods)
, _dcbMaxTTL :: !(Maybe Integer)
, _dcbCompress :: !(Maybe Bool)
, _dcbSmoothStreaming :: !(Maybe Bool)
, _dcbDefaultTTL :: !(Maybe Integer)
, _dcbTargetOriginId :: !Text
, _dcbForwardedValues :: !ForwardedValues
, _dcbTrustedSigners :: !TrustedSigners
, _dcbViewerProtocolPolicy :: !ViewerProtocolPolicy
, _dcbMinTTL :: !Integer
} deriving (Eq,Read,Show,Data,Typeable,Generic)
defaultCacheBehavior
:: Text
-> ForwardedValues
-> TrustedSigners
-> ViewerProtocolPolicy
-> Integer
-> DefaultCacheBehavior
defaultCacheBehavior pTargetOriginId_ pForwardedValues_ pTrustedSigners_ pViewerProtocolPolicy_ pMinTTL_ =
DefaultCacheBehavior'
{ _dcbAllowedMethods = Nothing
, _dcbMaxTTL = Nothing
, _dcbCompress = Nothing
, _dcbSmoothStreaming = Nothing
, _dcbDefaultTTL = Nothing
, _dcbTargetOriginId = pTargetOriginId_
, _dcbForwardedValues = pForwardedValues_
, _dcbTrustedSigners = pTrustedSigners_
, _dcbViewerProtocolPolicy = pViewerProtocolPolicy_
, _dcbMinTTL = pMinTTL_
}
dcbAllowedMethods :: Lens' DefaultCacheBehavior (Maybe AllowedMethods)
dcbAllowedMethods = lens _dcbAllowedMethods (\ s a -> s{_dcbAllowedMethods = a});
dcbMaxTTL :: Lens' DefaultCacheBehavior (Maybe Integer)
dcbMaxTTL = lens _dcbMaxTTL (\ s a -> s{_dcbMaxTTL = a});
dcbCompress :: Lens' DefaultCacheBehavior (Maybe Bool)
dcbCompress = lens _dcbCompress (\ s a -> s{_dcbCompress = a});
dcbSmoothStreaming :: Lens' DefaultCacheBehavior (Maybe Bool)
dcbSmoothStreaming = lens _dcbSmoothStreaming (\ s a -> s{_dcbSmoothStreaming = a});
dcbDefaultTTL :: Lens' DefaultCacheBehavior (Maybe Integer)
dcbDefaultTTL = lens _dcbDefaultTTL (\ s a -> s{_dcbDefaultTTL = a});
dcbTargetOriginId :: Lens' DefaultCacheBehavior Text
dcbTargetOriginId = lens _dcbTargetOriginId (\ s a -> s{_dcbTargetOriginId = a});
dcbForwardedValues :: Lens' DefaultCacheBehavior ForwardedValues
dcbForwardedValues = lens _dcbForwardedValues (\ s a -> s{_dcbForwardedValues = a});
dcbTrustedSigners :: Lens' DefaultCacheBehavior TrustedSigners
dcbTrustedSigners = lens _dcbTrustedSigners (\ s a -> s{_dcbTrustedSigners = a});
dcbViewerProtocolPolicy :: Lens' DefaultCacheBehavior ViewerProtocolPolicy
dcbViewerProtocolPolicy = lens _dcbViewerProtocolPolicy (\ s a -> s{_dcbViewerProtocolPolicy = a});
dcbMinTTL :: Lens' DefaultCacheBehavior Integer
dcbMinTTL = lens _dcbMinTTL (\ s a -> s{_dcbMinTTL = a});
instance FromXML DefaultCacheBehavior where
parseXML x
= DefaultCacheBehavior' <$>
(x .@? "AllowedMethods") <*> (x .@? "MaxTTL") <*>
(x .@? "Compress")
<*> (x .@? "SmoothStreaming")
<*> (x .@? "DefaultTTL")
<*> (x .@ "TargetOriginId")
<*> (x .@ "ForwardedValues")
<*> (x .@ "TrustedSigners")
<*> (x .@ "ViewerProtocolPolicy")
<*> (x .@ "MinTTL")
instance Hashable DefaultCacheBehavior
instance NFData DefaultCacheBehavior
instance ToXML DefaultCacheBehavior where
toXML DefaultCacheBehavior'{..}
= mconcat
["AllowedMethods" @= _dcbAllowedMethods,
"MaxTTL" @= _dcbMaxTTL, "Compress" @= _dcbCompress,
"SmoothStreaming" @= _dcbSmoothStreaming,
"DefaultTTL" @= _dcbDefaultTTL,
"TargetOriginId" @= _dcbTargetOriginId,
"ForwardedValues" @= _dcbForwardedValues,
"TrustedSigners" @= _dcbTrustedSigners,
"ViewerProtocolPolicy" @= _dcbViewerProtocolPolicy,
"MinTTL" @= _dcbMinTTL]
data Distribution = Distribution'
{ _dId :: !Text
, _dStatus :: !Text
, _dLastModifiedTime :: !ISO8601
, _dInProgressInvalidationBatches :: !Int
, _dDomainName :: !Text
, _dActiveTrustedSigners :: !ActiveTrustedSigners
, _dDistributionConfig :: !DistributionConfig
} deriving (Eq,Read,Show,Data,Typeable,Generic)
distribution
:: Text
-> Text
-> UTCTime
-> Int
-> Text
-> ActiveTrustedSigners
-> DistributionConfig
-> Distribution
distribution pId_ pStatus_ pLastModifiedTime_ pInProgressInvalidationBatches_ pDomainName_ pActiveTrustedSigners_ pDistributionConfig_ =
Distribution'
{ _dId = pId_
, _dStatus = pStatus_
, _dLastModifiedTime = _Time # pLastModifiedTime_
, _dInProgressInvalidationBatches = pInProgressInvalidationBatches_
, _dDomainName = pDomainName_
, _dActiveTrustedSigners = pActiveTrustedSigners_
, _dDistributionConfig = pDistributionConfig_
}
dId :: Lens' Distribution Text
dId = lens _dId (\ s a -> s{_dId = a});
dStatus :: Lens' Distribution Text
dStatus = lens _dStatus (\ s a -> s{_dStatus = a});
dLastModifiedTime :: Lens' Distribution UTCTime
dLastModifiedTime = lens _dLastModifiedTime (\ s a -> s{_dLastModifiedTime = a}) . _Time;
dInProgressInvalidationBatches :: Lens' Distribution Int
dInProgressInvalidationBatches = lens _dInProgressInvalidationBatches (\ s a -> s{_dInProgressInvalidationBatches = a});
dDomainName :: Lens' Distribution Text
dDomainName = lens _dDomainName (\ s a -> s{_dDomainName = a});
dActiveTrustedSigners :: Lens' Distribution ActiveTrustedSigners
dActiveTrustedSigners = lens _dActiveTrustedSigners (\ s a -> s{_dActiveTrustedSigners = a});
dDistributionConfig :: Lens' Distribution DistributionConfig
dDistributionConfig = lens _dDistributionConfig (\ s a -> s{_dDistributionConfig = a});
instance FromXML Distribution where
parseXML x
= Distribution' <$>
(x .@ "Id") <*> (x .@ "Status") <*>
(x .@ "LastModifiedTime")
<*> (x .@ "InProgressInvalidationBatches")
<*> (x .@ "DomainName")
<*> (x .@ "ActiveTrustedSigners")
<*> (x .@ "DistributionConfig")
instance Hashable Distribution
instance NFData Distribution
data DistributionConfig = DistributionConfig'
{ _dcAliases :: !(Maybe Aliases)
, _dcDefaultRootObject :: !(Maybe Text)
, _dcPriceClass :: !(Maybe PriceClass)
, _dcCustomErrorResponses :: !(Maybe CustomErrorResponses)
, _dcWebACLId :: !(Maybe Text)
, _dcViewerCertificate :: !(Maybe ViewerCertificate)
, _dcRestrictions :: !(Maybe Restrictions)
, _dcLogging :: !(Maybe LoggingConfig)
, _dcCacheBehaviors :: !(Maybe CacheBehaviors)
, _dcCallerReference :: !Text
, _dcOrigins :: !Origins
, _dcDefaultCacheBehavior :: !DefaultCacheBehavior
, _dcComment :: !Text
, _dcEnabled :: !Bool
} deriving (Eq,Read,Show,Data,Typeable,Generic)
distributionConfig
:: Text
-> Origins
-> DefaultCacheBehavior
-> Text
-> Bool
-> DistributionConfig
distributionConfig pCallerReference_ pOrigins_ pDefaultCacheBehavior_ pComment_ pEnabled_ =
DistributionConfig'
{ _dcAliases = Nothing
, _dcDefaultRootObject = Nothing
, _dcPriceClass = Nothing
, _dcCustomErrorResponses = Nothing
, _dcWebACLId = Nothing
, _dcViewerCertificate = Nothing
, _dcRestrictions = Nothing
, _dcLogging = Nothing
, _dcCacheBehaviors = Nothing
, _dcCallerReference = pCallerReference_
, _dcOrigins = pOrigins_
, _dcDefaultCacheBehavior = pDefaultCacheBehavior_
, _dcComment = pComment_
, _dcEnabled = pEnabled_
}
dcAliases :: Lens' DistributionConfig (Maybe Aliases)
dcAliases = lens _dcAliases (\ s a -> s{_dcAliases = a});
dcDefaultRootObject :: Lens' DistributionConfig (Maybe Text)
dcDefaultRootObject = lens _dcDefaultRootObject (\ s a -> s{_dcDefaultRootObject = a});
dcPriceClass :: Lens' DistributionConfig (Maybe PriceClass)
dcPriceClass = lens _dcPriceClass (\ s a -> s{_dcPriceClass = a});
dcCustomErrorResponses :: Lens' DistributionConfig (Maybe CustomErrorResponses)
dcCustomErrorResponses = lens _dcCustomErrorResponses (\ s a -> s{_dcCustomErrorResponses = a});
dcWebACLId :: Lens' DistributionConfig (Maybe Text)
dcWebACLId = lens _dcWebACLId (\ s a -> s{_dcWebACLId = a});
dcViewerCertificate :: Lens' DistributionConfig (Maybe ViewerCertificate)
dcViewerCertificate = lens _dcViewerCertificate (\ s a -> s{_dcViewerCertificate = a});
dcRestrictions :: Lens' DistributionConfig (Maybe Restrictions)
dcRestrictions = lens _dcRestrictions (\ s a -> s{_dcRestrictions = a});
dcLogging :: Lens' DistributionConfig (Maybe LoggingConfig)
dcLogging = lens _dcLogging (\ s a -> s{_dcLogging = a});
dcCacheBehaviors :: Lens' DistributionConfig (Maybe CacheBehaviors)
dcCacheBehaviors = lens _dcCacheBehaviors (\ s a -> s{_dcCacheBehaviors = a});
dcCallerReference :: Lens' DistributionConfig Text
dcCallerReference = lens _dcCallerReference (\ s a -> s{_dcCallerReference = a});
dcOrigins :: Lens' DistributionConfig Origins
dcOrigins = lens _dcOrigins (\ s a -> s{_dcOrigins = a});
dcDefaultCacheBehavior :: Lens' DistributionConfig DefaultCacheBehavior
dcDefaultCacheBehavior = lens _dcDefaultCacheBehavior (\ s a -> s{_dcDefaultCacheBehavior = a});
dcComment :: Lens' DistributionConfig Text
dcComment = lens _dcComment (\ s a -> s{_dcComment = a});
dcEnabled :: Lens' DistributionConfig Bool
dcEnabled = lens _dcEnabled (\ s a -> s{_dcEnabled = a});
instance FromXML DistributionConfig where
parseXML x
= DistributionConfig' <$>
(x .@? "Aliases") <*> (x .@? "DefaultRootObject") <*>
(x .@? "PriceClass")
<*> (x .@? "CustomErrorResponses")
<*> (x .@? "WebACLId")
<*> (x .@? "ViewerCertificate")
<*> (x .@? "Restrictions")
<*> (x .@? "Logging")
<*> (x .@? "CacheBehaviors")
<*> (x .@ "CallerReference")
<*> (x .@ "Origins")
<*> (x .@ "DefaultCacheBehavior")
<*> (x .@ "Comment")
<*> (x .@ "Enabled")
instance Hashable DistributionConfig
instance NFData DistributionConfig
instance ToXML DistributionConfig where
toXML DistributionConfig'{..}
= mconcat
["Aliases" @= _dcAliases,
"DefaultRootObject" @= _dcDefaultRootObject,
"PriceClass" @= _dcPriceClass,
"CustomErrorResponses" @= _dcCustomErrorResponses,
"WebACLId" @= _dcWebACLId,
"ViewerCertificate" @= _dcViewerCertificate,
"Restrictions" @= _dcRestrictions,
"Logging" @= _dcLogging,
"CacheBehaviors" @= _dcCacheBehaviors,
"CallerReference" @= _dcCallerReference,
"Origins" @= _dcOrigins,
"DefaultCacheBehavior" @= _dcDefaultCacheBehavior,
"Comment" @= _dcComment, "Enabled" @= _dcEnabled]
data DistributionList = DistributionList'
{ _dlItems :: !(Maybe [DistributionSummary])
, _dlNextMarker :: !(Maybe Text)
, _dlMarker :: !Text
, _dlMaxItems :: !Int
, _dlIsTruncated :: !Bool
, _dlQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
distributionList
:: Text
-> Int
-> Bool
-> Int
-> DistributionList
distributionList pMarker_ pMaxItems_ pIsTruncated_ pQuantity_ =
DistributionList'
{ _dlItems = Nothing
, _dlNextMarker = Nothing
, _dlMarker = pMarker_
, _dlMaxItems = pMaxItems_
, _dlIsTruncated = pIsTruncated_
, _dlQuantity = pQuantity_
}
dlItems :: Lens' DistributionList [DistributionSummary]
dlItems = lens _dlItems (\ s a -> s{_dlItems = a}) . _Default . _Coerce;
dlNextMarker :: Lens' DistributionList (Maybe Text)
dlNextMarker = lens _dlNextMarker (\ s a -> s{_dlNextMarker = a});
dlMarker :: Lens' DistributionList Text
dlMarker = lens _dlMarker (\ s a -> s{_dlMarker = a});
dlMaxItems :: Lens' DistributionList Int
dlMaxItems = lens _dlMaxItems (\ s a -> s{_dlMaxItems = a});
dlIsTruncated :: Lens' DistributionList Bool
dlIsTruncated = lens _dlIsTruncated (\ s a -> s{_dlIsTruncated = a});
dlQuantity :: Lens' DistributionList Int
dlQuantity = lens _dlQuantity (\ s a -> s{_dlQuantity = a});
instance FromXML DistributionList where
parseXML x
= DistributionList' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "DistributionSummary"))
<*> (x .@? "NextMarker")
<*> (x .@ "Marker")
<*> (x .@ "MaxItems")
<*> (x .@ "IsTruncated")
<*> (x .@ "Quantity")
instance Hashable DistributionList
instance NFData DistributionList
data DistributionSummary = DistributionSummary'
{ _dsId :: !Text
, _dsStatus :: !Text
, _dsLastModifiedTime :: !ISO8601
, _dsDomainName :: !Text
, _dsAliases :: !Aliases
, _dsOrigins :: !Origins
, _dsDefaultCacheBehavior :: !DefaultCacheBehavior
, _dsCacheBehaviors :: !CacheBehaviors
, _dsCustomErrorResponses :: !CustomErrorResponses
, _dsComment :: !Text
, _dsPriceClass :: !PriceClass
, _dsEnabled :: !Bool
, _dsViewerCertificate :: !ViewerCertificate
, _dsRestrictions :: !Restrictions
, _dsWebACLId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
distributionSummary
:: Text
-> Text
-> UTCTime
-> Text
-> Aliases
-> Origins
-> DefaultCacheBehavior
-> CacheBehaviors
-> CustomErrorResponses
-> Text
-> PriceClass
-> Bool
-> ViewerCertificate
-> Restrictions
-> Text
-> DistributionSummary
distributionSummary pId_ pStatus_ pLastModifiedTime_ pDomainName_ pAliases_ pOrigins_ pDefaultCacheBehavior_ pCacheBehaviors_ pCustomErrorResponses_ pComment_ pPriceClass_ pEnabled_ pViewerCertificate_ pRestrictions_ pWebACLId_ =
DistributionSummary'
{ _dsId = pId_
, _dsStatus = pStatus_
, _dsLastModifiedTime = _Time # pLastModifiedTime_
, _dsDomainName = pDomainName_
, _dsAliases = pAliases_
, _dsOrigins = pOrigins_
, _dsDefaultCacheBehavior = pDefaultCacheBehavior_
, _dsCacheBehaviors = pCacheBehaviors_
, _dsCustomErrorResponses = pCustomErrorResponses_
, _dsComment = pComment_
, _dsPriceClass = pPriceClass_
, _dsEnabled = pEnabled_
, _dsViewerCertificate = pViewerCertificate_
, _dsRestrictions = pRestrictions_
, _dsWebACLId = pWebACLId_
}
dsId :: Lens' DistributionSummary Text
dsId = lens _dsId (\ s a -> s{_dsId = a});
dsStatus :: Lens' DistributionSummary Text
dsStatus = lens _dsStatus (\ s a -> s{_dsStatus = a});
dsLastModifiedTime :: Lens' DistributionSummary UTCTime
dsLastModifiedTime = lens _dsLastModifiedTime (\ s a -> s{_dsLastModifiedTime = a}) . _Time;
dsDomainName :: Lens' DistributionSummary Text
dsDomainName = lens _dsDomainName (\ s a -> s{_dsDomainName = a});
dsAliases :: Lens' DistributionSummary Aliases
dsAliases = lens _dsAliases (\ s a -> s{_dsAliases = a});
dsOrigins :: Lens' DistributionSummary Origins
dsOrigins = lens _dsOrigins (\ s a -> s{_dsOrigins = a});
dsDefaultCacheBehavior :: Lens' DistributionSummary DefaultCacheBehavior
dsDefaultCacheBehavior = lens _dsDefaultCacheBehavior (\ s a -> s{_dsDefaultCacheBehavior = a});
dsCacheBehaviors :: Lens' DistributionSummary CacheBehaviors
dsCacheBehaviors = lens _dsCacheBehaviors (\ s a -> s{_dsCacheBehaviors = a});
dsCustomErrorResponses :: Lens' DistributionSummary CustomErrorResponses
dsCustomErrorResponses = lens _dsCustomErrorResponses (\ s a -> s{_dsCustomErrorResponses = a});
dsComment :: Lens' DistributionSummary Text
dsComment = lens _dsComment (\ s a -> s{_dsComment = a});
dsPriceClass :: Lens' DistributionSummary PriceClass
dsPriceClass = lens _dsPriceClass (\ s a -> s{_dsPriceClass = a});
dsEnabled :: Lens' DistributionSummary Bool
dsEnabled = lens _dsEnabled (\ s a -> s{_dsEnabled = a});
dsViewerCertificate :: Lens' DistributionSummary ViewerCertificate
dsViewerCertificate = lens _dsViewerCertificate (\ s a -> s{_dsViewerCertificate = a});
dsRestrictions :: Lens' DistributionSummary Restrictions
dsRestrictions = lens _dsRestrictions (\ s a -> s{_dsRestrictions = a});
dsWebACLId :: Lens' DistributionSummary Text
dsWebACLId = lens _dsWebACLId (\ s a -> s{_dsWebACLId = a});
instance FromXML DistributionSummary where
parseXML x
= DistributionSummary' <$>
(x .@ "Id") <*> (x .@ "Status") <*>
(x .@ "LastModifiedTime")
<*> (x .@ "DomainName")
<*> (x .@ "Aliases")
<*> (x .@ "Origins")
<*> (x .@ "DefaultCacheBehavior")
<*> (x .@ "CacheBehaviors")
<*> (x .@ "CustomErrorResponses")
<*> (x .@ "Comment")
<*> (x .@ "PriceClass")
<*> (x .@ "Enabled")
<*> (x .@ "ViewerCertificate")
<*> (x .@ "Restrictions")
<*> (x .@ "WebACLId")
instance Hashable DistributionSummary
instance NFData DistributionSummary
data ForwardedValues = ForwardedValues'
{ _fvHeaders :: !(Maybe Headers)
, _fvQueryString :: !Bool
, _fvCookies :: !CookiePreference
} deriving (Eq,Read,Show,Data,Typeable,Generic)
forwardedValues
:: Bool
-> CookiePreference
-> ForwardedValues
forwardedValues pQueryString_ pCookies_ =
ForwardedValues'
{ _fvHeaders = Nothing
, _fvQueryString = pQueryString_
, _fvCookies = pCookies_
}
fvHeaders :: Lens' ForwardedValues (Maybe Headers)
fvHeaders = lens _fvHeaders (\ s a -> s{_fvHeaders = a});
fvQueryString :: Lens' ForwardedValues Bool
fvQueryString = lens _fvQueryString (\ s a -> s{_fvQueryString = a});
fvCookies :: Lens' ForwardedValues CookiePreference
fvCookies = lens _fvCookies (\ s a -> s{_fvCookies = a});
instance FromXML ForwardedValues where
parseXML x
= ForwardedValues' <$>
(x .@? "Headers") <*> (x .@ "QueryString") <*>
(x .@ "Cookies")
instance Hashable ForwardedValues
instance NFData ForwardedValues
instance ToXML ForwardedValues where
toXML ForwardedValues'{..}
= mconcat
["Headers" @= _fvHeaders,
"QueryString" @= _fvQueryString,
"Cookies" @= _fvCookies]
data GeoRestriction = GeoRestriction'
{ _grItems :: !(Maybe [Text])
, _grRestrictionType :: !GeoRestrictionType
, _grQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
geoRestriction
:: GeoRestrictionType
-> Int
-> GeoRestriction
geoRestriction pRestrictionType_ pQuantity_ =
GeoRestriction'
{ _grItems = Nothing
, _grRestrictionType = pRestrictionType_
, _grQuantity = pQuantity_
}
grItems :: Lens' GeoRestriction [Text]
grItems = lens _grItems (\ s a -> s{_grItems = a}) . _Default . _Coerce;
grRestrictionType :: Lens' GeoRestriction GeoRestrictionType
grRestrictionType = lens _grRestrictionType (\ s a -> s{_grRestrictionType = a});
grQuantity :: Lens' GeoRestriction Int
grQuantity = lens _grQuantity (\ s a -> s{_grQuantity = a});
instance FromXML GeoRestriction where
parseXML x
= GeoRestriction' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "Location"))
<*> (x .@ "RestrictionType")
<*> (x .@ "Quantity")
instance Hashable GeoRestriction
instance NFData GeoRestriction
instance ToXML GeoRestriction where
toXML GeoRestriction'{..}
= mconcat
["Items" @=
toXML (toXMLList "Location" <$> _grItems),
"RestrictionType" @= _grRestrictionType,
"Quantity" @= _grQuantity]
data Headers = Headers'
{ _hItems :: !(Maybe [Text])
, _hQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
headers
:: Int
-> Headers
headers pQuantity_ =
Headers'
{ _hItems = Nothing
, _hQuantity = pQuantity_
}
hItems :: Lens' Headers [Text]
hItems = lens _hItems (\ s a -> s{_hItems = a}) . _Default . _Coerce;
hQuantity :: Lens' Headers Int
hQuantity = lens _hQuantity (\ s a -> s{_hQuantity = a});
instance FromXML Headers where
parseXML x
= Headers' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "Name"))
<*> (x .@ "Quantity")
instance Hashable Headers
instance NFData Headers
instance ToXML Headers where
toXML Headers'{..}
= mconcat
["Items" @= toXML (toXMLList "Name" <$> _hItems),
"Quantity" @= _hQuantity]
data Invalidation = Invalidation'
{ _iId :: !Text
, _iStatus :: !Text
, _iCreateTime :: !ISO8601
, _iInvalidationBatch :: !InvalidationBatch
} deriving (Eq,Read,Show,Data,Typeable,Generic)
invalidation
:: Text
-> Text
-> UTCTime
-> InvalidationBatch
-> Invalidation
invalidation pId_ pStatus_ pCreateTime_ pInvalidationBatch_ =
Invalidation'
{ _iId = pId_
, _iStatus = pStatus_
, _iCreateTime = _Time # pCreateTime_
, _iInvalidationBatch = pInvalidationBatch_
}
iId :: Lens' Invalidation Text
iId = lens _iId (\ s a -> s{_iId = a});
iStatus :: Lens' Invalidation Text
iStatus = lens _iStatus (\ s a -> s{_iStatus = a});
iCreateTime :: Lens' Invalidation UTCTime
iCreateTime = lens _iCreateTime (\ s a -> s{_iCreateTime = a}) . _Time;
iInvalidationBatch :: Lens' Invalidation InvalidationBatch
iInvalidationBatch = lens _iInvalidationBatch (\ s a -> s{_iInvalidationBatch = a});
instance FromXML Invalidation where
parseXML x
= Invalidation' <$>
(x .@ "Id") <*> (x .@ "Status") <*>
(x .@ "CreateTime")
<*> (x .@ "InvalidationBatch")
instance Hashable Invalidation
instance NFData Invalidation
data InvalidationBatch = InvalidationBatch'
{ _ibPaths :: !Paths
, _ibCallerReference :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
invalidationBatch
:: Paths
-> Text
-> InvalidationBatch
invalidationBatch pPaths_ pCallerReference_ =
InvalidationBatch'
{ _ibPaths = pPaths_
, _ibCallerReference = pCallerReference_
}
ibPaths :: Lens' InvalidationBatch Paths
ibPaths = lens _ibPaths (\ s a -> s{_ibPaths = a});
ibCallerReference :: Lens' InvalidationBatch Text
ibCallerReference = lens _ibCallerReference (\ s a -> s{_ibCallerReference = a});
instance FromXML InvalidationBatch where
parseXML x
= InvalidationBatch' <$>
(x .@ "Paths") <*> (x .@ "CallerReference")
instance Hashable InvalidationBatch
instance NFData InvalidationBatch
instance ToXML InvalidationBatch where
toXML InvalidationBatch'{..}
= mconcat
["Paths" @= _ibPaths,
"CallerReference" @= _ibCallerReference]
data InvalidationList = InvalidationList'
{ _ilItems :: !(Maybe [InvalidationSummary])
, _ilNextMarker :: !(Maybe Text)
, _ilMarker :: !Text
, _ilMaxItems :: !Int
, _ilIsTruncated :: !Bool
, _ilQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
invalidationList
:: Text
-> Int
-> Bool
-> Int
-> InvalidationList
invalidationList pMarker_ pMaxItems_ pIsTruncated_ pQuantity_ =
InvalidationList'
{ _ilItems = Nothing
, _ilNextMarker = Nothing
, _ilMarker = pMarker_
, _ilMaxItems = pMaxItems_
, _ilIsTruncated = pIsTruncated_
, _ilQuantity = pQuantity_
}
ilItems :: Lens' InvalidationList [InvalidationSummary]
ilItems = lens _ilItems (\ s a -> s{_ilItems = a}) . _Default . _Coerce;
ilNextMarker :: Lens' InvalidationList (Maybe Text)
ilNextMarker = lens _ilNextMarker (\ s a -> s{_ilNextMarker = a});
ilMarker :: Lens' InvalidationList Text
ilMarker = lens _ilMarker (\ s a -> s{_ilMarker = a});
ilMaxItems :: Lens' InvalidationList Int
ilMaxItems = lens _ilMaxItems (\ s a -> s{_ilMaxItems = a});
ilIsTruncated :: Lens' InvalidationList Bool
ilIsTruncated = lens _ilIsTruncated (\ s a -> s{_ilIsTruncated = a});
ilQuantity :: Lens' InvalidationList Int
ilQuantity = lens _ilQuantity (\ s a -> s{_ilQuantity = a});
instance FromXML InvalidationList where
parseXML x
= InvalidationList' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "InvalidationSummary"))
<*> (x .@? "NextMarker")
<*> (x .@ "Marker")
<*> (x .@ "MaxItems")
<*> (x .@ "IsTruncated")
<*> (x .@ "Quantity")
instance Hashable InvalidationList
instance NFData InvalidationList
data InvalidationSummary = InvalidationSummary'
{ _isId :: !Text
, _isCreateTime :: !ISO8601
, _isStatus :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
invalidationSummary
:: Text
-> UTCTime
-> Text
-> InvalidationSummary
invalidationSummary pId_ pCreateTime_ pStatus_ =
InvalidationSummary'
{ _isId = pId_
, _isCreateTime = _Time # pCreateTime_
, _isStatus = pStatus_
}
isId :: Lens' InvalidationSummary Text
isId = lens _isId (\ s a -> s{_isId = a});
isCreateTime :: Lens' InvalidationSummary UTCTime
isCreateTime = lens _isCreateTime (\ s a -> s{_isCreateTime = a}) . _Time;
isStatus :: Lens' InvalidationSummary Text
isStatus = lens _isStatus (\ s a -> s{_isStatus = a});
instance FromXML InvalidationSummary where
parseXML x
= InvalidationSummary' <$>
(x .@ "Id") <*> (x .@ "CreateTime") <*>
(x .@ "Status")
instance Hashable InvalidationSummary
instance NFData InvalidationSummary
data KeyPairIds = KeyPairIds'
{ _kpiItems :: !(Maybe [Text])
, _kpiQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
keyPairIds
:: Int
-> KeyPairIds
keyPairIds pQuantity_ =
KeyPairIds'
{ _kpiItems = Nothing
, _kpiQuantity = pQuantity_
}
kpiItems :: Lens' KeyPairIds [Text]
kpiItems = lens _kpiItems (\ s a -> s{_kpiItems = a}) . _Default . _Coerce;
kpiQuantity :: Lens' KeyPairIds Int
kpiQuantity = lens _kpiQuantity (\ s a -> s{_kpiQuantity = a});
instance FromXML KeyPairIds where
parseXML x
= KeyPairIds' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "KeyPairId"))
<*> (x .@ "Quantity")
instance Hashable KeyPairIds
instance NFData KeyPairIds
data LoggingConfig = LoggingConfig'
{ _lcEnabled :: !Bool
, _lcIncludeCookies :: !Bool
, _lcBucket :: !Text
, _lcPrefix :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
loggingConfig
:: Bool
-> Bool
-> Text
-> Text
-> LoggingConfig
loggingConfig pEnabled_ pIncludeCookies_ pBucket_ pPrefix_ =
LoggingConfig'
{ _lcEnabled = pEnabled_
, _lcIncludeCookies = pIncludeCookies_
, _lcBucket = pBucket_
, _lcPrefix = pPrefix_
}
lcEnabled :: Lens' LoggingConfig Bool
lcEnabled = lens _lcEnabled (\ s a -> s{_lcEnabled = a});
lcIncludeCookies :: Lens' LoggingConfig Bool
lcIncludeCookies = lens _lcIncludeCookies (\ s a -> s{_lcIncludeCookies = a});
lcBucket :: Lens' LoggingConfig Text
lcBucket = lens _lcBucket (\ s a -> s{_lcBucket = a});
lcPrefix :: Lens' LoggingConfig Text
lcPrefix = lens _lcPrefix (\ s a -> s{_lcPrefix = a});
instance FromXML LoggingConfig where
parseXML x
= LoggingConfig' <$>
(x .@ "Enabled") <*> (x .@ "IncludeCookies") <*>
(x .@ "Bucket")
<*> (x .@ "Prefix")
instance Hashable LoggingConfig
instance NFData LoggingConfig
instance ToXML LoggingConfig where
toXML LoggingConfig'{..}
= mconcat
["Enabled" @= _lcEnabled,
"IncludeCookies" @= _lcIncludeCookies,
"Bucket" @= _lcBucket, "Prefix" @= _lcPrefix]
data Origin = Origin'
{ _oCustomHeaders :: !(Maybe CustomHeaders)
, _oCustomOriginConfig :: !(Maybe CustomOriginConfig)
, _oS3OriginConfig :: !(Maybe S3OriginConfig)
, _oOriginPath :: !(Maybe Text)
, _oId :: !Text
, _oDomainName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
origin
:: Text
-> Text
-> Origin
origin pId_ pDomainName_ =
Origin'
{ _oCustomHeaders = Nothing
, _oCustomOriginConfig = Nothing
, _oS3OriginConfig = Nothing
, _oOriginPath = Nothing
, _oId = pId_
, _oDomainName = pDomainName_
}
oCustomHeaders :: Lens' Origin (Maybe CustomHeaders)
oCustomHeaders = lens _oCustomHeaders (\ s a -> s{_oCustomHeaders = a});
oCustomOriginConfig :: Lens' Origin (Maybe CustomOriginConfig)
oCustomOriginConfig = lens _oCustomOriginConfig (\ s a -> s{_oCustomOriginConfig = a});
oS3OriginConfig :: Lens' Origin (Maybe S3OriginConfig)
oS3OriginConfig = lens _oS3OriginConfig (\ s a -> s{_oS3OriginConfig = a});
oOriginPath :: Lens' Origin (Maybe Text)
oOriginPath = lens _oOriginPath (\ s a -> s{_oOriginPath = a});
oId :: Lens' Origin Text
oId = lens _oId (\ s a -> s{_oId = a});
oDomainName :: Lens' Origin Text
oDomainName = lens _oDomainName (\ s a -> s{_oDomainName = a});
instance FromXML Origin where
parseXML x
= Origin' <$>
(x .@? "CustomHeaders") <*>
(x .@? "CustomOriginConfig")
<*> (x .@? "S3OriginConfig")
<*> (x .@? "OriginPath")
<*> (x .@ "Id")
<*> (x .@ "DomainName")
instance Hashable Origin
instance NFData Origin
instance ToXML Origin where
toXML Origin'{..}
= mconcat
["CustomHeaders" @= _oCustomHeaders,
"CustomOriginConfig" @= _oCustomOriginConfig,
"S3OriginConfig" @= _oS3OriginConfig,
"OriginPath" @= _oOriginPath, "Id" @= _oId,
"DomainName" @= _oDomainName]
data OriginCustomHeader = OriginCustomHeader'
{ _ochHeaderName :: !Text
, _ochHeaderValue :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
originCustomHeader
:: Text
-> Text
-> OriginCustomHeader
originCustomHeader pHeaderName_ pHeaderValue_ =
OriginCustomHeader'
{ _ochHeaderName = pHeaderName_
, _ochHeaderValue = pHeaderValue_
}
ochHeaderName :: Lens' OriginCustomHeader Text
ochHeaderName = lens _ochHeaderName (\ s a -> s{_ochHeaderName = a});
ochHeaderValue :: Lens' OriginCustomHeader Text
ochHeaderValue = lens _ochHeaderValue (\ s a -> s{_ochHeaderValue = a});
instance FromXML OriginCustomHeader where
parseXML x
= OriginCustomHeader' <$>
(x .@ "HeaderName") <*> (x .@ "HeaderValue")
instance Hashable OriginCustomHeader
instance NFData OriginCustomHeader
instance ToXML OriginCustomHeader where
toXML OriginCustomHeader'{..}
= mconcat
["HeaderName" @= _ochHeaderName,
"HeaderValue" @= _ochHeaderValue]
data OriginSSLProtocols = OriginSSLProtocols'
{ _ospQuantity :: !Int
, _ospItems :: ![SSLProtocol]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
originSSLProtocols
:: Int
-> OriginSSLProtocols
originSSLProtocols pQuantity_ =
OriginSSLProtocols'
{ _ospQuantity = pQuantity_
, _ospItems = mempty
}
ospQuantity :: Lens' OriginSSLProtocols Int
ospQuantity = lens _ospQuantity (\ s a -> s{_ospQuantity = a});
ospItems :: Lens' OriginSSLProtocols [SSLProtocol]
ospItems = lens _ospItems (\ s a -> s{_ospItems = a}) . _Coerce;
instance FromXML OriginSSLProtocols where
parseXML x
= OriginSSLProtocols' <$>
(x .@ "Quantity") <*>
(x .@? "Items" .!@ mempty >>=
parseXMLList "SslProtocol")
instance Hashable OriginSSLProtocols
instance NFData OriginSSLProtocols
instance ToXML OriginSSLProtocols where
toXML OriginSSLProtocols'{..}
= mconcat
["Quantity" @= _ospQuantity,
"Items" @= toXMLList "SslProtocol" _ospItems]
data Origins = Origins'
{ _oItems :: !(Maybe (List1 Origin))
, _oQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
origins
:: Int
-> Origins
origins pQuantity_ =
Origins'
{ _oItems = Nothing
, _oQuantity = pQuantity_
}
oItems :: Lens' Origins (Maybe (NonEmpty Origin))
oItems = lens _oItems (\ s a -> s{_oItems = a}) . mapping _List1;
oQuantity :: Lens' Origins Int
oQuantity = lens _oQuantity (\ s a -> s{_oQuantity = a});
instance FromXML Origins where
parseXML x
= Origins' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList1 "Origin"))
<*> (x .@ "Quantity")
instance Hashable Origins
instance NFData Origins
instance ToXML Origins where
toXML Origins'{..}
= mconcat
["Items" @= toXML (toXMLList "Origin" <$> _oItems),
"Quantity" @= _oQuantity]
data Paths = Paths'
{ _pItems :: !(Maybe [Text])
, _pQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
paths
:: Int
-> Paths
paths pQuantity_ =
Paths'
{ _pItems = Nothing
, _pQuantity = pQuantity_
}
pItems :: Lens' Paths [Text]
pItems = lens _pItems (\ s a -> s{_pItems = a}) . _Default . _Coerce;
pQuantity :: Lens' Paths Int
pQuantity = lens _pQuantity (\ s a -> s{_pQuantity = a});
instance FromXML Paths where
parseXML x
= Paths' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "Path"))
<*> (x .@ "Quantity")
instance Hashable Paths
instance NFData Paths
instance ToXML Paths where
toXML Paths'{..}
= mconcat
["Items" @= toXML (toXMLList "Path" <$> _pItems),
"Quantity" @= _pQuantity]
newtype Restrictions = Restrictions'
{ _rGeoRestriction :: GeoRestriction
} deriving (Eq,Read,Show,Data,Typeable,Generic)
restrictions
:: GeoRestriction
-> Restrictions
restrictions pGeoRestriction_ =
Restrictions'
{ _rGeoRestriction = pGeoRestriction_
}
rGeoRestriction :: Lens' Restrictions GeoRestriction
rGeoRestriction = lens _rGeoRestriction (\ s a -> s{_rGeoRestriction = a});
instance FromXML Restrictions where
parseXML x
= Restrictions' <$> (x .@ "GeoRestriction")
instance Hashable Restrictions
instance NFData Restrictions
instance ToXML Restrictions where
toXML Restrictions'{..}
= mconcat ["GeoRestriction" @= _rGeoRestriction]
data S3Origin = S3Origin'
{ _soDomainName :: !Text
, _soOriginAccessIdentity :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
s3Origin
:: Text
-> Text
-> S3Origin
s3Origin pDomainName_ pOriginAccessIdentity_ =
S3Origin'
{ _soDomainName = pDomainName_
, _soOriginAccessIdentity = pOriginAccessIdentity_
}
soDomainName :: Lens' S3Origin Text
soDomainName = lens _soDomainName (\ s a -> s{_soDomainName = a});
soOriginAccessIdentity :: Lens' S3Origin Text
soOriginAccessIdentity = lens _soOriginAccessIdentity (\ s a -> s{_soOriginAccessIdentity = a});
instance FromXML S3Origin where
parseXML x
= S3Origin' <$>
(x .@ "DomainName") <*> (x .@ "OriginAccessIdentity")
instance Hashable S3Origin
instance NFData S3Origin
instance ToXML S3Origin where
toXML S3Origin'{..}
= mconcat
["DomainName" @= _soDomainName,
"OriginAccessIdentity" @= _soOriginAccessIdentity]
newtype S3OriginConfig = S3OriginConfig'
{ _socOriginAccessIdentity :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
s3OriginConfig
:: Text
-> S3OriginConfig
s3OriginConfig pOriginAccessIdentity_ =
S3OriginConfig'
{ _socOriginAccessIdentity = pOriginAccessIdentity_
}
socOriginAccessIdentity :: Lens' S3OriginConfig Text
socOriginAccessIdentity = lens _socOriginAccessIdentity (\ s a -> s{_socOriginAccessIdentity = a});
instance FromXML S3OriginConfig where
parseXML x
= S3OriginConfig' <$> (x .@ "OriginAccessIdentity")
instance Hashable S3OriginConfig
instance NFData S3OriginConfig
instance ToXML S3OriginConfig where
toXML S3OriginConfig'{..}
= mconcat
["OriginAccessIdentity" @= _socOriginAccessIdentity]
data Signer = Signer'
{ _sAWSAccountNumber :: !(Maybe Text)
, _sKeyPairIds :: !(Maybe KeyPairIds)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
signer
:: Signer
signer =
Signer'
{ _sAWSAccountNumber = Nothing
, _sKeyPairIds = Nothing
}
sAWSAccountNumber :: Lens' Signer (Maybe Text)
sAWSAccountNumber = lens _sAWSAccountNumber (\ s a -> s{_sAWSAccountNumber = a});
sKeyPairIds :: Lens' Signer (Maybe KeyPairIds)
sKeyPairIds = lens _sKeyPairIds (\ s a -> s{_sKeyPairIds = a});
instance FromXML Signer where
parseXML x
= Signer' <$>
(x .@? "AwsAccountNumber") <*> (x .@? "KeyPairIds")
instance Hashable Signer
instance NFData Signer
data StreamingDistribution = StreamingDistribution'
{ _sdLastModifiedTime :: !(Maybe ISO8601)
, _sdId :: !Text
, _sdStatus :: !Text
, _sdDomainName :: !Text
, _sdActiveTrustedSigners :: !ActiveTrustedSigners
, _sdStreamingDistributionConfig :: !StreamingDistributionConfig
} deriving (Eq,Read,Show,Data,Typeable,Generic)
streamingDistribution
:: Text
-> Text
-> Text
-> ActiveTrustedSigners
-> StreamingDistributionConfig
-> StreamingDistribution
streamingDistribution pId_ pStatus_ pDomainName_ pActiveTrustedSigners_ pStreamingDistributionConfig_ =
StreamingDistribution'
{ _sdLastModifiedTime = Nothing
, _sdId = pId_
, _sdStatus = pStatus_
, _sdDomainName = pDomainName_
, _sdActiveTrustedSigners = pActiveTrustedSigners_
, _sdStreamingDistributionConfig = pStreamingDistributionConfig_
}
sdLastModifiedTime :: Lens' StreamingDistribution (Maybe UTCTime)
sdLastModifiedTime = lens _sdLastModifiedTime (\ s a -> s{_sdLastModifiedTime = a}) . mapping _Time;
sdId :: Lens' StreamingDistribution Text
sdId = lens _sdId (\ s a -> s{_sdId = a});
sdStatus :: Lens' StreamingDistribution Text
sdStatus = lens _sdStatus (\ s a -> s{_sdStatus = a});
sdDomainName :: Lens' StreamingDistribution Text
sdDomainName = lens _sdDomainName (\ s a -> s{_sdDomainName = a});
sdActiveTrustedSigners :: Lens' StreamingDistribution ActiveTrustedSigners
sdActiveTrustedSigners = lens _sdActiveTrustedSigners (\ s a -> s{_sdActiveTrustedSigners = a});
sdStreamingDistributionConfig :: Lens' StreamingDistribution StreamingDistributionConfig
sdStreamingDistributionConfig = lens _sdStreamingDistributionConfig (\ s a -> s{_sdStreamingDistributionConfig = a});
instance FromXML StreamingDistribution where
parseXML x
= StreamingDistribution' <$>
(x .@? "LastModifiedTime") <*> (x .@ "Id") <*>
(x .@ "Status")
<*> (x .@ "DomainName")
<*> (x .@ "ActiveTrustedSigners")
<*> (x .@ "StreamingDistributionConfig")
instance Hashable StreamingDistribution
instance NFData StreamingDistribution
data StreamingDistributionConfig = StreamingDistributionConfig'
{ _sdcAliases :: !(Maybe Aliases)
, _sdcPriceClass :: !(Maybe PriceClass)
, _sdcLogging :: !(Maybe StreamingLoggingConfig)
, _sdcCallerReference :: !Text
, _sdcS3Origin :: !S3Origin
, _sdcComment :: !Text
, _sdcTrustedSigners :: !TrustedSigners
, _sdcEnabled :: !Bool
} deriving (Eq,Read,Show,Data,Typeable,Generic)
streamingDistributionConfig
:: Text
-> S3Origin
-> Text
-> TrustedSigners
-> Bool
-> StreamingDistributionConfig
streamingDistributionConfig pCallerReference_ pS3Origin_ pComment_ pTrustedSigners_ pEnabled_ =
StreamingDistributionConfig'
{ _sdcAliases = Nothing
, _sdcPriceClass = Nothing
, _sdcLogging = Nothing
, _sdcCallerReference = pCallerReference_
, _sdcS3Origin = pS3Origin_
, _sdcComment = pComment_
, _sdcTrustedSigners = pTrustedSigners_
, _sdcEnabled = pEnabled_
}
sdcAliases :: Lens' StreamingDistributionConfig (Maybe Aliases)
sdcAliases = lens _sdcAliases (\ s a -> s{_sdcAliases = a});
sdcPriceClass :: Lens' StreamingDistributionConfig (Maybe PriceClass)
sdcPriceClass = lens _sdcPriceClass (\ s a -> s{_sdcPriceClass = a});
sdcLogging :: Lens' StreamingDistributionConfig (Maybe StreamingLoggingConfig)
sdcLogging = lens _sdcLogging (\ s a -> s{_sdcLogging = a});
sdcCallerReference :: Lens' StreamingDistributionConfig Text
sdcCallerReference = lens _sdcCallerReference (\ s a -> s{_sdcCallerReference = a});
sdcS3Origin :: Lens' StreamingDistributionConfig S3Origin
sdcS3Origin = lens _sdcS3Origin (\ s a -> s{_sdcS3Origin = a});
sdcComment :: Lens' StreamingDistributionConfig Text
sdcComment = lens _sdcComment (\ s a -> s{_sdcComment = a});
sdcTrustedSigners :: Lens' StreamingDistributionConfig TrustedSigners
sdcTrustedSigners = lens _sdcTrustedSigners (\ s a -> s{_sdcTrustedSigners = a});
sdcEnabled :: Lens' StreamingDistributionConfig Bool
sdcEnabled = lens _sdcEnabled (\ s a -> s{_sdcEnabled = a});
instance FromXML StreamingDistributionConfig where
parseXML x
= StreamingDistributionConfig' <$>
(x .@? "Aliases") <*> (x .@? "PriceClass") <*>
(x .@? "Logging")
<*> (x .@ "CallerReference")
<*> (x .@ "S3Origin")
<*> (x .@ "Comment")
<*> (x .@ "TrustedSigners")
<*> (x .@ "Enabled")
instance Hashable StreamingDistributionConfig
instance NFData StreamingDistributionConfig
instance ToXML StreamingDistributionConfig where
toXML StreamingDistributionConfig'{..}
= mconcat
["Aliases" @= _sdcAliases,
"PriceClass" @= _sdcPriceClass,
"Logging" @= _sdcLogging,
"CallerReference" @= _sdcCallerReference,
"S3Origin" @= _sdcS3Origin, "Comment" @= _sdcComment,
"TrustedSigners" @= _sdcTrustedSigners,
"Enabled" @= _sdcEnabled]
data StreamingDistributionList = StreamingDistributionList'
{ _sdlItems :: !(Maybe [StreamingDistributionSummary])
, _sdlNextMarker :: !(Maybe Text)
, _sdlMarker :: !Text
, _sdlMaxItems :: !Int
, _sdlIsTruncated :: !Bool
, _sdlQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
streamingDistributionList
:: Text
-> Int
-> Bool
-> Int
-> StreamingDistributionList
streamingDistributionList pMarker_ pMaxItems_ pIsTruncated_ pQuantity_ =
StreamingDistributionList'
{ _sdlItems = Nothing
, _sdlNextMarker = Nothing
, _sdlMarker = pMarker_
, _sdlMaxItems = pMaxItems_
, _sdlIsTruncated = pIsTruncated_
, _sdlQuantity = pQuantity_
}
sdlItems :: Lens' StreamingDistributionList [StreamingDistributionSummary]
sdlItems = lens _sdlItems (\ s a -> s{_sdlItems = a}) . _Default . _Coerce;
sdlNextMarker :: Lens' StreamingDistributionList (Maybe Text)
sdlNextMarker = lens _sdlNextMarker (\ s a -> s{_sdlNextMarker = a});
sdlMarker :: Lens' StreamingDistributionList Text
sdlMarker = lens _sdlMarker (\ s a -> s{_sdlMarker = a});
sdlMaxItems :: Lens' StreamingDistributionList Int
sdlMaxItems = lens _sdlMaxItems (\ s a -> s{_sdlMaxItems = a});
sdlIsTruncated :: Lens' StreamingDistributionList Bool
sdlIsTruncated = lens _sdlIsTruncated (\ s a -> s{_sdlIsTruncated = a});
sdlQuantity :: Lens' StreamingDistributionList Int
sdlQuantity = lens _sdlQuantity (\ s a -> s{_sdlQuantity = a});
instance FromXML StreamingDistributionList where
parseXML x
= StreamingDistributionList' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "StreamingDistributionSummary"))
<*> (x .@? "NextMarker")
<*> (x .@ "Marker")
<*> (x .@ "MaxItems")
<*> (x .@ "IsTruncated")
<*> (x .@ "Quantity")
instance Hashable StreamingDistributionList
instance NFData StreamingDistributionList
data StreamingDistributionSummary = StreamingDistributionSummary'
{ _sdsId :: !Text
, _sdsStatus :: !Text
, _sdsLastModifiedTime :: !ISO8601
, _sdsDomainName :: !Text
, _sdsS3Origin :: !S3Origin
, _sdsAliases :: !Aliases
, _sdsTrustedSigners :: !TrustedSigners
, _sdsComment :: !Text
, _sdsPriceClass :: !PriceClass
, _sdsEnabled :: !Bool
} deriving (Eq,Read,Show,Data,Typeable,Generic)
streamingDistributionSummary
:: Text
-> Text
-> UTCTime
-> Text
-> S3Origin
-> Aliases
-> TrustedSigners
-> Text
-> PriceClass
-> Bool
-> StreamingDistributionSummary
streamingDistributionSummary pId_ pStatus_ pLastModifiedTime_ pDomainName_ pS3Origin_ pAliases_ pTrustedSigners_ pComment_ pPriceClass_ pEnabled_ =
StreamingDistributionSummary'
{ _sdsId = pId_
, _sdsStatus = pStatus_
, _sdsLastModifiedTime = _Time # pLastModifiedTime_
, _sdsDomainName = pDomainName_
, _sdsS3Origin = pS3Origin_
, _sdsAliases = pAliases_
, _sdsTrustedSigners = pTrustedSigners_
, _sdsComment = pComment_
, _sdsPriceClass = pPriceClass_
, _sdsEnabled = pEnabled_
}
sdsId :: Lens' StreamingDistributionSummary Text
sdsId = lens _sdsId (\ s a -> s{_sdsId = a});
sdsStatus :: Lens' StreamingDistributionSummary Text
sdsStatus = lens _sdsStatus (\ s a -> s{_sdsStatus = a});
sdsLastModifiedTime :: Lens' StreamingDistributionSummary UTCTime
sdsLastModifiedTime = lens _sdsLastModifiedTime (\ s a -> s{_sdsLastModifiedTime = a}) . _Time;
sdsDomainName :: Lens' StreamingDistributionSummary Text
sdsDomainName = lens _sdsDomainName (\ s a -> s{_sdsDomainName = a});
sdsS3Origin :: Lens' StreamingDistributionSummary S3Origin
sdsS3Origin = lens _sdsS3Origin (\ s a -> s{_sdsS3Origin = a});
sdsAliases :: Lens' StreamingDistributionSummary Aliases
sdsAliases = lens _sdsAliases (\ s a -> s{_sdsAliases = a});
sdsTrustedSigners :: Lens' StreamingDistributionSummary TrustedSigners
sdsTrustedSigners = lens _sdsTrustedSigners (\ s a -> s{_sdsTrustedSigners = a});
sdsComment :: Lens' StreamingDistributionSummary Text
sdsComment = lens _sdsComment (\ s a -> s{_sdsComment = a});
sdsPriceClass :: Lens' StreamingDistributionSummary PriceClass
sdsPriceClass = lens _sdsPriceClass (\ s a -> s{_sdsPriceClass = a});
sdsEnabled :: Lens' StreamingDistributionSummary Bool
sdsEnabled = lens _sdsEnabled (\ s a -> s{_sdsEnabled = a});
instance FromXML StreamingDistributionSummary where
parseXML x
= StreamingDistributionSummary' <$>
(x .@ "Id") <*> (x .@ "Status") <*>
(x .@ "LastModifiedTime")
<*> (x .@ "DomainName")
<*> (x .@ "S3Origin")
<*> (x .@ "Aliases")
<*> (x .@ "TrustedSigners")
<*> (x .@ "Comment")
<*> (x .@ "PriceClass")
<*> (x .@ "Enabled")
instance Hashable StreamingDistributionSummary
instance NFData StreamingDistributionSummary
data StreamingLoggingConfig = StreamingLoggingConfig'
{ _slcEnabled :: !Bool
, _slcBucket :: !Text
, _slcPrefix :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
streamingLoggingConfig
:: Bool
-> Text
-> Text
-> StreamingLoggingConfig
streamingLoggingConfig pEnabled_ pBucket_ pPrefix_ =
StreamingLoggingConfig'
{ _slcEnabled = pEnabled_
, _slcBucket = pBucket_
, _slcPrefix = pPrefix_
}
slcEnabled :: Lens' StreamingLoggingConfig Bool
slcEnabled = lens _slcEnabled (\ s a -> s{_slcEnabled = a});
slcBucket :: Lens' StreamingLoggingConfig Text
slcBucket = lens _slcBucket (\ s a -> s{_slcBucket = a});
slcPrefix :: Lens' StreamingLoggingConfig Text
slcPrefix = lens _slcPrefix (\ s a -> s{_slcPrefix = a});
instance FromXML StreamingLoggingConfig where
parseXML x
= StreamingLoggingConfig' <$>
(x .@ "Enabled") <*> (x .@ "Bucket") <*>
(x .@ "Prefix")
instance Hashable StreamingLoggingConfig
instance NFData StreamingLoggingConfig
instance ToXML StreamingLoggingConfig where
toXML StreamingLoggingConfig'{..}
= mconcat
["Enabled" @= _slcEnabled, "Bucket" @= _slcBucket,
"Prefix" @= _slcPrefix]
data TrustedSigners = TrustedSigners'
{ _tsItems :: !(Maybe [Text])
, _tsEnabled :: !Bool
, _tsQuantity :: !Int
} deriving (Eq,Read,Show,Data,Typeable,Generic)
trustedSigners
:: Bool
-> Int
-> TrustedSigners
trustedSigners pEnabled_ pQuantity_ =
TrustedSigners'
{ _tsItems = Nothing
, _tsEnabled = pEnabled_
, _tsQuantity = pQuantity_
}
tsItems :: Lens' TrustedSigners [Text]
tsItems = lens _tsItems (\ s a -> s{_tsItems = a}) . _Default . _Coerce;
tsEnabled :: Lens' TrustedSigners Bool
tsEnabled = lens _tsEnabled (\ s a -> s{_tsEnabled = a});
tsQuantity :: Lens' TrustedSigners Int
tsQuantity = lens _tsQuantity (\ s a -> s{_tsQuantity = a});
instance FromXML TrustedSigners where
parseXML x
= TrustedSigners' <$>
(x .@? "Items" .!@ mempty >>=
may (parseXMLList "AwsAccountNumber"))
<*> (x .@ "Enabled")
<*> (x .@ "Quantity")
instance Hashable TrustedSigners
instance NFData TrustedSigners
instance ToXML TrustedSigners where
toXML TrustedSigners'{..}
= mconcat
["Items" @=
toXML (toXMLList "AwsAccountNumber" <$> _tsItems),
"Enabled" @= _tsEnabled, "Quantity" @= _tsQuantity]
data ViewerCertificate = ViewerCertificate'
{ _vcSSLSupportMethod :: !(Maybe SSLSupportMethod)
, _vcACMCertificateARN :: !(Maybe Text)
, _vcCertificateSource :: !(Maybe CertificateSource)
, _vcMinimumProtocolVersion :: !(Maybe MinimumProtocolVersion)
, _vcCertificate :: !(Maybe Text)
, _vcIAMCertificateId :: !(Maybe Text)
, _vcCloudFrontDefaultCertificate :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
viewerCertificate
:: ViewerCertificate
viewerCertificate =
ViewerCertificate'
{ _vcSSLSupportMethod = Nothing
, _vcACMCertificateARN = Nothing
, _vcCertificateSource = Nothing
, _vcMinimumProtocolVersion = Nothing
, _vcCertificate = Nothing
, _vcIAMCertificateId = Nothing
, _vcCloudFrontDefaultCertificate = Nothing
}
vcSSLSupportMethod :: Lens' ViewerCertificate (Maybe SSLSupportMethod)
vcSSLSupportMethod = lens _vcSSLSupportMethod (\ s a -> s{_vcSSLSupportMethod = a});
vcACMCertificateARN :: Lens' ViewerCertificate (Maybe Text)
vcACMCertificateARN = lens _vcACMCertificateARN (\ s a -> s{_vcACMCertificateARN = a});
vcCertificateSource :: Lens' ViewerCertificate (Maybe CertificateSource)
vcCertificateSource = lens _vcCertificateSource (\ s a -> s{_vcCertificateSource = a});
vcMinimumProtocolVersion :: Lens' ViewerCertificate (Maybe MinimumProtocolVersion)
vcMinimumProtocolVersion = lens _vcMinimumProtocolVersion (\ s a -> s{_vcMinimumProtocolVersion = a});
vcCertificate :: Lens' ViewerCertificate (Maybe Text)
vcCertificate = lens _vcCertificate (\ s a -> s{_vcCertificate = a});
vcIAMCertificateId :: Lens' ViewerCertificate (Maybe Text)
vcIAMCertificateId = lens _vcIAMCertificateId (\ s a -> s{_vcIAMCertificateId = a});
vcCloudFrontDefaultCertificate :: Lens' ViewerCertificate (Maybe Bool)
vcCloudFrontDefaultCertificate = lens _vcCloudFrontDefaultCertificate (\ s a -> s{_vcCloudFrontDefaultCertificate = a});
instance FromXML ViewerCertificate where
parseXML x
= ViewerCertificate' <$>
(x .@? "SSLSupportMethod") <*>
(x .@? "ACMCertificateArn")
<*> (x .@? "CertificateSource")
<*> (x .@? "MinimumProtocolVersion")
<*> (x .@? "Certificate")
<*> (x .@? "IAMCertificateId")
<*> (x .@? "CloudFrontDefaultCertificate")
instance Hashable ViewerCertificate
instance NFData ViewerCertificate
instance ToXML ViewerCertificate where
toXML ViewerCertificate'{..}
= mconcat
["SSLSupportMethod" @= _vcSSLSupportMethod,
"ACMCertificateArn" @= _vcACMCertificateARN,
"CertificateSource" @= _vcCertificateSource,
"MinimumProtocolVersion" @=
_vcMinimumProtocolVersion,
"Certificate" @= _vcCertificate,
"IAMCertificateId" @= _vcIAMCertificateId,
"CloudFrontDefaultCertificate" @=
_vcCloudFrontDefaultCertificate]