{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.CloudFront.Types.DistributionConfig where
import Amazonka.CloudFront.Types.Aliases
import Amazonka.CloudFront.Types.CacheBehaviors
import Amazonka.CloudFront.Types.CustomErrorResponses
import Amazonka.CloudFront.Types.DefaultCacheBehavior
import Amazonka.CloudFront.Types.HttpVersion
import Amazonka.CloudFront.Types.LoggingConfig
import Amazonka.CloudFront.Types.OriginGroups
import Amazonka.CloudFront.Types.Origins
import Amazonka.CloudFront.Types.PriceClass
import Amazonka.CloudFront.Types.Restrictions
import Amazonka.CloudFront.Types.ViewerCertificate
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DistributionConfig = DistributionConfig'
{
DistributionConfig -> Maybe HttpVersion
httpVersion :: Prelude.Maybe HttpVersion,
DistributionConfig -> Maybe OriginGroups
originGroups :: Prelude.Maybe OriginGroups,
DistributionConfig -> Maybe Aliases
aliases :: Prelude.Maybe Aliases,
DistributionConfig -> Maybe Text
defaultRootObject :: Prelude.Maybe Prelude.Text,
DistributionConfig -> Maybe PriceClass
priceClass :: Prelude.Maybe PriceClass,
DistributionConfig -> Maybe CustomErrorResponses
customErrorResponses :: Prelude.Maybe CustomErrorResponses,
DistributionConfig -> Maybe Text
webACLId :: Prelude.Maybe Prelude.Text,
DistributionConfig -> Maybe ViewerCertificate
viewerCertificate :: Prelude.Maybe ViewerCertificate,
DistributionConfig -> Maybe Restrictions
restrictions :: Prelude.Maybe Restrictions,
DistributionConfig -> Maybe LoggingConfig
logging :: Prelude.Maybe LoggingConfig,
DistributionConfig -> Maybe CacheBehaviors
cacheBehaviors :: Prelude.Maybe CacheBehaviors,
DistributionConfig -> Maybe Bool
isIPV6Enabled :: Prelude.Maybe Prelude.Bool,
DistributionConfig -> Text
callerReference :: Prelude.Text,
DistributionConfig -> Origins
origins :: Origins,
DistributionConfig -> DefaultCacheBehavior
defaultCacheBehavior :: DefaultCacheBehavior,
:: Core.Sensitive Prelude.Text,
DistributionConfig -> Bool
enabled :: Prelude.Bool
}
deriving (DistributionConfig -> DistributionConfig -> Bool
(DistributionConfig -> DistributionConfig -> Bool)
-> (DistributionConfig -> DistributionConfig -> Bool)
-> Eq DistributionConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DistributionConfig -> DistributionConfig -> Bool
$c/= :: DistributionConfig -> DistributionConfig -> Bool
== :: DistributionConfig -> DistributionConfig -> Bool
$c== :: DistributionConfig -> DistributionConfig -> Bool
Prelude.Eq, Int -> DistributionConfig -> ShowS
[DistributionConfig] -> ShowS
DistributionConfig -> String
(Int -> DistributionConfig -> ShowS)
-> (DistributionConfig -> String)
-> ([DistributionConfig] -> ShowS)
-> Show DistributionConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DistributionConfig] -> ShowS
$cshowList :: [DistributionConfig] -> ShowS
show :: DistributionConfig -> String
$cshow :: DistributionConfig -> String
showsPrec :: Int -> DistributionConfig -> ShowS
$cshowsPrec :: Int -> DistributionConfig -> ShowS
Prelude.Show, (forall x. DistributionConfig -> Rep DistributionConfig x)
-> (forall x. Rep DistributionConfig x -> DistributionConfig)
-> Generic DistributionConfig
forall x. Rep DistributionConfig x -> DistributionConfig
forall x. DistributionConfig -> Rep DistributionConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DistributionConfig x -> DistributionConfig
$cfrom :: forall x. DistributionConfig -> Rep DistributionConfig x
Prelude.Generic)
newDistributionConfig ::
Prelude.Text ->
Origins ->
DefaultCacheBehavior ->
Prelude.Text ->
Prelude.Bool ->
DistributionConfig
newDistributionConfig :: Text
-> Origins
-> DefaultCacheBehavior
-> Text
-> Bool
-> DistributionConfig
newDistributionConfig
Text
pCallerReference_
Origins
pOrigins_
DefaultCacheBehavior
pDefaultCacheBehavior_
Text
pComment_
Bool
pEnabled_ =
DistributionConfig' :: Maybe HttpVersion
-> Maybe OriginGroups
-> Maybe Aliases
-> Maybe Text
-> Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig
DistributionConfig'
{ $sel:httpVersion:DistributionConfig' :: Maybe HttpVersion
httpVersion = Maybe HttpVersion
forall a. Maybe a
Prelude.Nothing,
$sel:originGroups:DistributionConfig' :: Maybe OriginGroups
originGroups = Maybe OriginGroups
forall a. Maybe a
Prelude.Nothing,
$sel:aliases:DistributionConfig' :: Maybe Aliases
aliases = Maybe Aliases
forall a. Maybe a
Prelude.Nothing,
$sel:defaultRootObject:DistributionConfig' :: Maybe Text
defaultRootObject = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:priceClass:DistributionConfig' :: Maybe PriceClass
priceClass = Maybe PriceClass
forall a. Maybe a
Prelude.Nothing,
$sel:customErrorResponses:DistributionConfig' :: Maybe CustomErrorResponses
customErrorResponses = Maybe CustomErrorResponses
forall a. Maybe a
Prelude.Nothing,
$sel:webACLId:DistributionConfig' :: Maybe Text
webACLId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:viewerCertificate:DistributionConfig' :: Maybe ViewerCertificate
viewerCertificate = Maybe ViewerCertificate
forall a. Maybe a
Prelude.Nothing,
$sel:restrictions:DistributionConfig' :: Maybe Restrictions
restrictions = Maybe Restrictions
forall a. Maybe a
Prelude.Nothing,
$sel:logging:DistributionConfig' :: Maybe LoggingConfig
logging = Maybe LoggingConfig
forall a. Maybe a
Prelude.Nothing,
$sel:cacheBehaviors:DistributionConfig' :: Maybe CacheBehaviors
cacheBehaviors = Maybe CacheBehaviors
forall a. Maybe a
Prelude.Nothing,
$sel:isIPV6Enabled:DistributionConfig' :: Maybe Bool
isIPV6Enabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:callerReference:DistributionConfig' :: Text
callerReference = Text
pCallerReference_,
$sel:origins:DistributionConfig' :: Origins
origins = Origins
pOrigins_,
$sel:defaultCacheBehavior:DistributionConfig' :: DefaultCacheBehavior
defaultCacheBehavior = DefaultCacheBehavior
pDefaultCacheBehavior_,
$sel:comment:DistributionConfig' :: Sensitive Text
comment = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pComment_,
$sel:enabled:DistributionConfig' :: Bool
enabled = Bool
pEnabled_
}
distributionConfig_httpVersion :: Lens.Lens' DistributionConfig (Prelude.Maybe HttpVersion)
distributionConfig_httpVersion :: (Maybe HttpVersion -> f (Maybe HttpVersion))
-> DistributionConfig -> f DistributionConfig
distributionConfig_httpVersion = (DistributionConfig -> Maybe HttpVersion)
-> (DistributionConfig -> Maybe HttpVersion -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Maybe HttpVersion)
(Maybe HttpVersion)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe HttpVersion
httpVersion :: Maybe HttpVersion
$sel:httpVersion:DistributionConfig' :: DistributionConfig -> Maybe HttpVersion
httpVersion} -> Maybe HttpVersion
httpVersion) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe HttpVersion
a -> DistributionConfig
s {$sel:httpVersion:DistributionConfig' :: Maybe HttpVersion
httpVersion = Maybe HttpVersion
a} :: DistributionConfig)
distributionConfig_originGroups :: Lens.Lens' DistributionConfig (Prelude.Maybe OriginGroups)
distributionConfig_originGroups :: (Maybe OriginGroups -> f (Maybe OriginGroups))
-> DistributionConfig -> f DistributionConfig
distributionConfig_originGroups = (DistributionConfig -> Maybe OriginGroups)
-> (DistributionConfig -> Maybe OriginGroups -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Maybe OriginGroups)
(Maybe OriginGroups)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe OriginGroups
originGroups :: Maybe OriginGroups
$sel:originGroups:DistributionConfig' :: DistributionConfig -> Maybe OriginGroups
originGroups} -> Maybe OriginGroups
originGroups) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe OriginGroups
a -> DistributionConfig
s {$sel:originGroups:DistributionConfig' :: Maybe OriginGroups
originGroups = Maybe OriginGroups
a} :: DistributionConfig)
distributionConfig_aliases :: Lens.Lens' DistributionConfig (Prelude.Maybe Aliases)
distributionConfig_aliases :: (Maybe Aliases -> f (Maybe Aliases))
-> DistributionConfig -> f DistributionConfig
distributionConfig_aliases = (DistributionConfig -> Maybe Aliases)
-> (DistributionConfig -> Maybe Aliases -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Maybe Aliases)
(Maybe Aliases)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe Aliases
aliases :: Maybe Aliases
$sel:aliases:DistributionConfig' :: DistributionConfig -> Maybe Aliases
aliases} -> Maybe Aliases
aliases) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe Aliases
a -> DistributionConfig
s {$sel:aliases:DistributionConfig' :: Maybe Aliases
aliases = Maybe Aliases
a} :: DistributionConfig)
distributionConfig_defaultRootObject :: Lens.Lens' DistributionConfig (Prelude.Maybe Prelude.Text)
distributionConfig_defaultRootObject :: (Maybe Text -> f (Maybe Text))
-> DistributionConfig -> f DistributionConfig
distributionConfig_defaultRootObject = (DistributionConfig -> Maybe Text)
-> (DistributionConfig -> Maybe Text -> DistributionConfig)
-> Lens
DistributionConfig DistributionConfig (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe Text
defaultRootObject :: Maybe Text
$sel:defaultRootObject:DistributionConfig' :: DistributionConfig -> Maybe Text
defaultRootObject} -> Maybe Text
defaultRootObject) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe Text
a -> DistributionConfig
s {$sel:defaultRootObject:DistributionConfig' :: Maybe Text
defaultRootObject = Maybe Text
a} :: DistributionConfig)
distributionConfig_priceClass :: Lens.Lens' DistributionConfig (Prelude.Maybe PriceClass)
distributionConfig_priceClass :: (Maybe PriceClass -> f (Maybe PriceClass))
-> DistributionConfig -> f DistributionConfig
distributionConfig_priceClass = (DistributionConfig -> Maybe PriceClass)
-> (DistributionConfig -> Maybe PriceClass -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Maybe PriceClass)
(Maybe PriceClass)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe PriceClass
priceClass :: Maybe PriceClass
$sel:priceClass:DistributionConfig' :: DistributionConfig -> Maybe PriceClass
priceClass} -> Maybe PriceClass
priceClass) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe PriceClass
a -> DistributionConfig
s {$sel:priceClass:DistributionConfig' :: Maybe PriceClass
priceClass = Maybe PriceClass
a} :: DistributionConfig)
distributionConfig_customErrorResponses :: Lens.Lens' DistributionConfig (Prelude.Maybe CustomErrorResponses)
distributionConfig_customErrorResponses :: (Maybe CustomErrorResponses -> f (Maybe CustomErrorResponses))
-> DistributionConfig -> f DistributionConfig
distributionConfig_customErrorResponses = (DistributionConfig -> Maybe CustomErrorResponses)
-> (DistributionConfig
-> Maybe CustomErrorResponses -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Maybe CustomErrorResponses)
(Maybe CustomErrorResponses)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe CustomErrorResponses
customErrorResponses :: Maybe CustomErrorResponses
$sel:customErrorResponses:DistributionConfig' :: DistributionConfig -> Maybe CustomErrorResponses
customErrorResponses} -> Maybe CustomErrorResponses
customErrorResponses) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe CustomErrorResponses
a -> DistributionConfig
s {$sel:customErrorResponses:DistributionConfig' :: Maybe CustomErrorResponses
customErrorResponses = Maybe CustomErrorResponses
a} :: DistributionConfig)
distributionConfig_webACLId :: Lens.Lens' DistributionConfig (Prelude.Maybe Prelude.Text)
distributionConfig_webACLId :: (Maybe Text -> f (Maybe Text))
-> DistributionConfig -> f DistributionConfig
distributionConfig_webACLId = (DistributionConfig -> Maybe Text)
-> (DistributionConfig -> Maybe Text -> DistributionConfig)
-> Lens
DistributionConfig DistributionConfig (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe Text
webACLId :: Maybe Text
$sel:webACLId:DistributionConfig' :: DistributionConfig -> Maybe Text
webACLId} -> Maybe Text
webACLId) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe Text
a -> DistributionConfig
s {$sel:webACLId:DistributionConfig' :: Maybe Text
webACLId = Maybe Text
a} :: DistributionConfig)
distributionConfig_viewerCertificate :: Lens.Lens' DistributionConfig (Prelude.Maybe ViewerCertificate)
distributionConfig_viewerCertificate :: (Maybe ViewerCertificate -> f (Maybe ViewerCertificate))
-> DistributionConfig -> f DistributionConfig
distributionConfig_viewerCertificate = (DistributionConfig -> Maybe ViewerCertificate)
-> (DistributionConfig
-> Maybe ViewerCertificate -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Maybe ViewerCertificate)
(Maybe ViewerCertificate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe ViewerCertificate
viewerCertificate :: Maybe ViewerCertificate
$sel:viewerCertificate:DistributionConfig' :: DistributionConfig -> Maybe ViewerCertificate
viewerCertificate} -> Maybe ViewerCertificate
viewerCertificate) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe ViewerCertificate
a -> DistributionConfig
s {$sel:viewerCertificate:DistributionConfig' :: Maybe ViewerCertificate
viewerCertificate = Maybe ViewerCertificate
a} :: DistributionConfig)
distributionConfig_restrictions :: Lens.Lens' DistributionConfig (Prelude.Maybe Restrictions)
distributionConfig_restrictions :: (Maybe Restrictions -> f (Maybe Restrictions))
-> DistributionConfig -> f DistributionConfig
distributionConfig_restrictions = (DistributionConfig -> Maybe Restrictions)
-> (DistributionConfig -> Maybe Restrictions -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Maybe Restrictions)
(Maybe Restrictions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe Restrictions
restrictions :: Maybe Restrictions
$sel:restrictions:DistributionConfig' :: DistributionConfig -> Maybe Restrictions
restrictions} -> Maybe Restrictions
restrictions) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe Restrictions
a -> DistributionConfig
s {$sel:restrictions:DistributionConfig' :: Maybe Restrictions
restrictions = Maybe Restrictions
a} :: DistributionConfig)
distributionConfig_logging :: Lens.Lens' DistributionConfig (Prelude.Maybe LoggingConfig)
distributionConfig_logging :: (Maybe LoggingConfig -> f (Maybe LoggingConfig))
-> DistributionConfig -> f DistributionConfig
distributionConfig_logging = (DistributionConfig -> Maybe LoggingConfig)
-> (DistributionConfig
-> Maybe LoggingConfig -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Maybe LoggingConfig)
(Maybe LoggingConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe LoggingConfig
logging :: Maybe LoggingConfig
$sel:logging:DistributionConfig' :: DistributionConfig -> Maybe LoggingConfig
logging} -> Maybe LoggingConfig
logging) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe LoggingConfig
a -> DistributionConfig
s {$sel:logging:DistributionConfig' :: Maybe LoggingConfig
logging = Maybe LoggingConfig
a} :: DistributionConfig)
distributionConfig_cacheBehaviors :: Lens.Lens' DistributionConfig (Prelude.Maybe CacheBehaviors)
distributionConfig_cacheBehaviors :: (Maybe CacheBehaviors -> f (Maybe CacheBehaviors))
-> DistributionConfig -> f DistributionConfig
distributionConfig_cacheBehaviors = (DistributionConfig -> Maybe CacheBehaviors)
-> (DistributionConfig
-> Maybe CacheBehaviors -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Maybe CacheBehaviors)
(Maybe CacheBehaviors)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe CacheBehaviors
cacheBehaviors :: Maybe CacheBehaviors
$sel:cacheBehaviors:DistributionConfig' :: DistributionConfig -> Maybe CacheBehaviors
cacheBehaviors} -> Maybe CacheBehaviors
cacheBehaviors) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe CacheBehaviors
a -> DistributionConfig
s {$sel:cacheBehaviors:DistributionConfig' :: Maybe CacheBehaviors
cacheBehaviors = Maybe CacheBehaviors
a} :: DistributionConfig)
distributionConfig_isIPV6Enabled :: Lens.Lens' DistributionConfig (Prelude.Maybe Prelude.Bool)
distributionConfig_isIPV6Enabled :: (Maybe Bool -> f (Maybe Bool))
-> DistributionConfig -> f DistributionConfig
distributionConfig_isIPV6Enabled = (DistributionConfig -> Maybe Bool)
-> (DistributionConfig -> Maybe Bool -> DistributionConfig)
-> Lens
DistributionConfig DistributionConfig (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Maybe Bool
isIPV6Enabled :: Maybe Bool
$sel:isIPV6Enabled:DistributionConfig' :: DistributionConfig -> Maybe Bool
isIPV6Enabled} -> Maybe Bool
isIPV6Enabled) (\s :: DistributionConfig
s@DistributionConfig' {} Maybe Bool
a -> DistributionConfig
s {$sel:isIPV6Enabled:DistributionConfig' :: Maybe Bool
isIPV6Enabled = Maybe Bool
a} :: DistributionConfig)
distributionConfig_callerReference :: Lens.Lens' DistributionConfig Prelude.Text
distributionConfig_callerReference :: (Text -> f Text) -> DistributionConfig -> f DistributionConfig
distributionConfig_callerReference = (DistributionConfig -> Text)
-> (DistributionConfig -> Text -> DistributionConfig)
-> Lens DistributionConfig DistributionConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Text
callerReference :: Text
$sel:callerReference:DistributionConfig' :: DistributionConfig -> Text
callerReference} -> Text
callerReference) (\s :: DistributionConfig
s@DistributionConfig' {} Text
a -> DistributionConfig
s {$sel:callerReference:DistributionConfig' :: Text
callerReference = Text
a} :: DistributionConfig)
distributionConfig_origins :: Lens.Lens' DistributionConfig Origins
distributionConfig_origins :: (Origins -> f Origins)
-> DistributionConfig -> f DistributionConfig
distributionConfig_origins = (DistributionConfig -> Origins)
-> (DistributionConfig -> Origins -> DistributionConfig)
-> Lens DistributionConfig DistributionConfig Origins Origins
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Origins
origins :: Origins
$sel:origins:DistributionConfig' :: DistributionConfig -> Origins
origins} -> Origins
origins) (\s :: DistributionConfig
s@DistributionConfig' {} Origins
a -> DistributionConfig
s {$sel:origins:DistributionConfig' :: Origins
origins = Origins
a} :: DistributionConfig)
distributionConfig_defaultCacheBehavior :: Lens.Lens' DistributionConfig DefaultCacheBehavior
distributionConfig_defaultCacheBehavior :: (DefaultCacheBehavior -> f DefaultCacheBehavior)
-> DistributionConfig -> f DistributionConfig
distributionConfig_defaultCacheBehavior = (DistributionConfig -> DefaultCacheBehavior)
-> (DistributionConfig
-> DefaultCacheBehavior -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
DefaultCacheBehavior
DefaultCacheBehavior
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {DefaultCacheBehavior
defaultCacheBehavior :: DefaultCacheBehavior
$sel:defaultCacheBehavior:DistributionConfig' :: DistributionConfig -> DefaultCacheBehavior
defaultCacheBehavior} -> DefaultCacheBehavior
defaultCacheBehavior) (\s :: DistributionConfig
s@DistributionConfig' {} DefaultCacheBehavior
a -> DistributionConfig
s {$sel:defaultCacheBehavior:DistributionConfig' :: DefaultCacheBehavior
defaultCacheBehavior = DefaultCacheBehavior
a} :: DistributionConfig)
distributionConfig_comment :: Lens.Lens' DistributionConfig Prelude.Text
= (DistributionConfig -> Sensitive Text)
-> (DistributionConfig -> Sensitive Text -> DistributionConfig)
-> Lens
DistributionConfig
DistributionConfig
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Sensitive Text
comment :: Sensitive Text
$sel:comment:DistributionConfig' :: DistributionConfig -> Sensitive Text
comment} -> Sensitive Text
comment) (\s :: DistributionConfig
s@DistributionConfig' {} Sensitive Text
a -> DistributionConfig
s {$sel:comment:DistributionConfig' :: Sensitive Text
comment = Sensitive Text
a} :: DistributionConfig) ((Sensitive Text -> f (Sensitive Text))
-> DistributionConfig -> f DistributionConfig)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> DistributionConfig
-> f DistributionConfig
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
distributionConfig_enabled :: Lens.Lens' DistributionConfig Prelude.Bool
distributionConfig_enabled :: (Bool -> f Bool) -> DistributionConfig -> f DistributionConfig
distributionConfig_enabled = (DistributionConfig -> Bool)
-> (DistributionConfig -> Bool -> DistributionConfig)
-> Lens DistributionConfig DistributionConfig Bool Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DistributionConfig' {Bool
enabled :: Bool
$sel:enabled:DistributionConfig' :: DistributionConfig -> Bool
enabled} -> Bool
enabled) (\s :: DistributionConfig
s@DistributionConfig' {} Bool
a -> DistributionConfig
s {$sel:enabled:DistributionConfig' :: Bool
enabled = Bool
a} :: DistributionConfig)
instance Core.FromXML DistributionConfig where
parseXML :: [Node] -> Either String DistributionConfig
parseXML [Node]
x =
Maybe HttpVersion
-> Maybe OriginGroups
-> Maybe Aliases
-> Maybe Text
-> Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig
DistributionConfig'
(Maybe HttpVersion
-> Maybe OriginGroups
-> Maybe Aliases
-> Maybe Text
-> Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe HttpVersion)
-> Either
String
(Maybe OriginGroups
-> Maybe Aliases
-> Maybe Text
-> Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe HttpVersion)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"HttpVersion")
Either
String
(Maybe OriginGroups
-> Maybe Aliases
-> Maybe Text
-> Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe OriginGroups)
-> Either
String
(Maybe Aliases
-> Maybe Text
-> Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe OriginGroups)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"OriginGroups")
Either
String
(Maybe Aliases
-> Maybe Text
-> Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe Aliases)
-> Either
String
(Maybe Text
-> Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Aliases)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Aliases")
Either
String
(Maybe Text
-> Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe Text)
-> Either
String
(Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"DefaultRootObject")
Either
String
(Maybe PriceClass
-> Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe PriceClass)
-> Either
String
(Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe PriceClass)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"PriceClass")
Either
String
(Maybe CustomErrorResponses
-> Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe CustomErrorResponses)
-> Either
String
(Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe CustomErrorResponses)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CustomErrorResponses")
Either
String
(Maybe Text
-> Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe Text)
-> Either
String
(Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"WebACLId")
Either
String
(Maybe ViewerCertificate
-> Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe ViewerCertificate)
-> Either
String
(Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ViewerCertificate)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ViewerCertificate")
Either
String
(Maybe Restrictions
-> Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe Restrictions)
-> Either
String
(Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Restrictions)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Restrictions")
Either
String
(Maybe LoggingConfig
-> Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe LoggingConfig)
-> Either
String
(Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe LoggingConfig)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Logging")
Either
String
(Maybe CacheBehaviors
-> Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe CacheBehaviors)
-> Either
String
(Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe CacheBehaviors)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CacheBehaviors")
Either
String
(Maybe Bool
-> Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String (Maybe Bool)
-> Either
String
(Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Bool)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"IsIPV6Enabled")
Either
String
(Text
-> Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String Text
-> Either
String
(Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"CallerReference")
Either
String
(Origins
-> DefaultCacheBehavior
-> Sensitive Text
-> Bool
-> DistributionConfig)
-> Either String Origins
-> Either
String
(DefaultCacheBehavior
-> Sensitive Text -> Bool -> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Origins
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Origins")
Either
String
(DefaultCacheBehavior
-> Sensitive Text -> Bool -> DistributionConfig)
-> Either String DefaultCacheBehavior
-> Either String (Sensitive Text -> Bool -> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String DefaultCacheBehavior
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"DefaultCacheBehavior")
Either String (Sensitive Text -> Bool -> DistributionConfig)
-> Either String (Sensitive Text)
-> Either String (Bool -> DistributionConfig)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Sensitive Text)
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Comment")
Either String (Bool -> DistributionConfig)
-> Either String Bool -> Either String DistributionConfig
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Bool
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Enabled")
instance Prelude.Hashable DistributionConfig
instance Prelude.NFData DistributionConfig
instance Core.ToXML DistributionConfig where
toXML :: DistributionConfig -> XML
toXML DistributionConfig' {Bool
Maybe Bool
Maybe Text
Maybe Aliases
Maybe CustomErrorResponses
Maybe HttpVersion
Maybe LoggingConfig
Maybe PriceClass
Maybe Restrictions
Maybe OriginGroups
Maybe ViewerCertificate
Maybe CacheBehaviors
Text
Sensitive Text
Origins
DefaultCacheBehavior
enabled :: Bool
comment :: Sensitive Text
defaultCacheBehavior :: DefaultCacheBehavior
origins :: Origins
callerReference :: Text
isIPV6Enabled :: Maybe Bool
cacheBehaviors :: Maybe CacheBehaviors
logging :: Maybe LoggingConfig
restrictions :: Maybe Restrictions
viewerCertificate :: Maybe ViewerCertificate
webACLId :: Maybe Text
customErrorResponses :: Maybe CustomErrorResponses
priceClass :: Maybe PriceClass
defaultRootObject :: Maybe Text
aliases :: Maybe Aliases
originGroups :: Maybe OriginGroups
httpVersion :: Maybe HttpVersion
$sel:enabled:DistributionConfig' :: DistributionConfig -> Bool
$sel:comment:DistributionConfig' :: DistributionConfig -> Sensitive Text
$sel:defaultCacheBehavior:DistributionConfig' :: DistributionConfig -> DefaultCacheBehavior
$sel:origins:DistributionConfig' :: DistributionConfig -> Origins
$sel:callerReference:DistributionConfig' :: DistributionConfig -> Text
$sel:isIPV6Enabled:DistributionConfig' :: DistributionConfig -> Maybe Bool
$sel:cacheBehaviors:DistributionConfig' :: DistributionConfig -> Maybe CacheBehaviors
$sel:logging:DistributionConfig' :: DistributionConfig -> Maybe LoggingConfig
$sel:restrictions:DistributionConfig' :: DistributionConfig -> Maybe Restrictions
$sel:viewerCertificate:DistributionConfig' :: DistributionConfig -> Maybe ViewerCertificate
$sel:webACLId:DistributionConfig' :: DistributionConfig -> Maybe Text
$sel:customErrorResponses:DistributionConfig' :: DistributionConfig -> Maybe CustomErrorResponses
$sel:priceClass:DistributionConfig' :: DistributionConfig -> Maybe PriceClass
$sel:defaultRootObject:DistributionConfig' :: DistributionConfig -> Maybe Text
$sel:aliases:DistributionConfig' :: DistributionConfig -> Maybe Aliases
$sel:originGroups:DistributionConfig' :: DistributionConfig -> Maybe OriginGroups
$sel:httpVersion:DistributionConfig' :: DistributionConfig -> Maybe HttpVersion
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"HttpVersion" Name -> Maybe HttpVersion -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe HttpVersion
httpVersion,
Name
"OriginGroups" Name -> Maybe OriginGroups -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe OriginGroups
originGroups,
Name
"Aliases" Name -> Maybe Aliases -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Aliases
aliases,
Name
"DefaultRootObject" Name -> Maybe Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Text
defaultRootObject,
Name
"PriceClass" Name -> Maybe PriceClass -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe PriceClass
priceClass,
Name
"CustomErrorResponses" Name -> Maybe CustomErrorResponses -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe CustomErrorResponses
customErrorResponses,
Name
"WebACLId" Name -> Maybe Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Text
webACLId,
Name
"ViewerCertificate" Name -> Maybe ViewerCertificate -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe ViewerCertificate
viewerCertificate,
Name
"Restrictions" Name -> Maybe Restrictions -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Restrictions
restrictions,
Name
"Logging" Name -> Maybe LoggingConfig -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe LoggingConfig
logging,
Name
"CacheBehaviors" Name -> Maybe CacheBehaviors -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe CacheBehaviors
cacheBehaviors,
Name
"IsIPV6Enabled" Name -> Maybe Bool -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Maybe Bool
isIPV6Enabled,
Name
"CallerReference" Name -> Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Text
callerReference,
Name
"Origins" Name -> Origins -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Origins
origins,
Name
"DefaultCacheBehavior" Name -> DefaultCacheBehavior -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= DefaultCacheBehavior
defaultCacheBehavior,
Name
"Comment" Name -> Sensitive Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Sensitive Text
comment,
Name
"Enabled" Name -> Bool -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Bool
enabled
]