{-# 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.SecurityHub.Types.AwsCloudFrontDistributionDefaultCacheBehavior where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsCloudFrontDistributionDefaultCacheBehavior = AwsCloudFrontDistributionDefaultCacheBehavior'
{
AwsCloudFrontDistributionDefaultCacheBehavior -> Maybe Text
viewerProtocolPolicy :: Prelude.Maybe Prelude.Text
}
deriving (AwsCloudFrontDistributionDefaultCacheBehavior
-> AwsCloudFrontDistributionDefaultCacheBehavior -> Bool
(AwsCloudFrontDistributionDefaultCacheBehavior
-> AwsCloudFrontDistributionDefaultCacheBehavior -> Bool)
-> (AwsCloudFrontDistributionDefaultCacheBehavior
-> AwsCloudFrontDistributionDefaultCacheBehavior -> Bool)
-> Eq AwsCloudFrontDistributionDefaultCacheBehavior
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsCloudFrontDistributionDefaultCacheBehavior
-> AwsCloudFrontDistributionDefaultCacheBehavior -> Bool
$c/= :: AwsCloudFrontDistributionDefaultCacheBehavior
-> AwsCloudFrontDistributionDefaultCacheBehavior -> Bool
== :: AwsCloudFrontDistributionDefaultCacheBehavior
-> AwsCloudFrontDistributionDefaultCacheBehavior -> Bool
$c== :: AwsCloudFrontDistributionDefaultCacheBehavior
-> AwsCloudFrontDistributionDefaultCacheBehavior -> Bool
Prelude.Eq, ReadPrec [AwsCloudFrontDistributionDefaultCacheBehavior]
ReadPrec AwsCloudFrontDistributionDefaultCacheBehavior
Int -> ReadS AwsCloudFrontDistributionDefaultCacheBehavior
ReadS [AwsCloudFrontDistributionDefaultCacheBehavior]
(Int -> ReadS AwsCloudFrontDistributionDefaultCacheBehavior)
-> ReadS [AwsCloudFrontDistributionDefaultCacheBehavior]
-> ReadPrec AwsCloudFrontDistributionDefaultCacheBehavior
-> ReadPrec [AwsCloudFrontDistributionDefaultCacheBehavior]
-> Read AwsCloudFrontDistributionDefaultCacheBehavior
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsCloudFrontDistributionDefaultCacheBehavior]
$creadListPrec :: ReadPrec [AwsCloudFrontDistributionDefaultCacheBehavior]
readPrec :: ReadPrec AwsCloudFrontDistributionDefaultCacheBehavior
$creadPrec :: ReadPrec AwsCloudFrontDistributionDefaultCacheBehavior
readList :: ReadS [AwsCloudFrontDistributionDefaultCacheBehavior]
$creadList :: ReadS [AwsCloudFrontDistributionDefaultCacheBehavior]
readsPrec :: Int -> ReadS AwsCloudFrontDistributionDefaultCacheBehavior
$creadsPrec :: Int -> ReadS AwsCloudFrontDistributionDefaultCacheBehavior
Prelude.Read, Int -> AwsCloudFrontDistributionDefaultCacheBehavior -> ShowS
[AwsCloudFrontDistributionDefaultCacheBehavior] -> ShowS
AwsCloudFrontDistributionDefaultCacheBehavior -> String
(Int -> AwsCloudFrontDistributionDefaultCacheBehavior -> ShowS)
-> (AwsCloudFrontDistributionDefaultCacheBehavior -> String)
-> ([AwsCloudFrontDistributionDefaultCacheBehavior] -> ShowS)
-> Show AwsCloudFrontDistributionDefaultCacheBehavior
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsCloudFrontDistributionDefaultCacheBehavior] -> ShowS
$cshowList :: [AwsCloudFrontDistributionDefaultCacheBehavior] -> ShowS
show :: AwsCloudFrontDistributionDefaultCacheBehavior -> String
$cshow :: AwsCloudFrontDistributionDefaultCacheBehavior -> String
showsPrec :: Int -> AwsCloudFrontDistributionDefaultCacheBehavior -> ShowS
$cshowsPrec :: Int -> AwsCloudFrontDistributionDefaultCacheBehavior -> ShowS
Prelude.Show, (forall x.
AwsCloudFrontDistributionDefaultCacheBehavior
-> Rep AwsCloudFrontDistributionDefaultCacheBehavior x)
-> (forall x.
Rep AwsCloudFrontDistributionDefaultCacheBehavior x
-> AwsCloudFrontDistributionDefaultCacheBehavior)
-> Generic AwsCloudFrontDistributionDefaultCacheBehavior
forall x.
Rep AwsCloudFrontDistributionDefaultCacheBehavior x
-> AwsCloudFrontDistributionDefaultCacheBehavior
forall x.
AwsCloudFrontDistributionDefaultCacheBehavior
-> Rep AwsCloudFrontDistributionDefaultCacheBehavior x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsCloudFrontDistributionDefaultCacheBehavior x
-> AwsCloudFrontDistributionDefaultCacheBehavior
$cfrom :: forall x.
AwsCloudFrontDistributionDefaultCacheBehavior
-> Rep AwsCloudFrontDistributionDefaultCacheBehavior x
Prelude.Generic)
newAwsCloudFrontDistributionDefaultCacheBehavior ::
AwsCloudFrontDistributionDefaultCacheBehavior
newAwsCloudFrontDistributionDefaultCacheBehavior :: AwsCloudFrontDistributionDefaultCacheBehavior
newAwsCloudFrontDistributionDefaultCacheBehavior =
AwsCloudFrontDistributionDefaultCacheBehavior' :: Maybe Text -> AwsCloudFrontDistributionDefaultCacheBehavior
AwsCloudFrontDistributionDefaultCacheBehavior'
{ $sel:viewerProtocolPolicy:AwsCloudFrontDistributionDefaultCacheBehavior' :: Maybe Text
viewerProtocolPolicy =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsCloudFrontDistributionDefaultCacheBehavior_viewerProtocolPolicy :: Lens.Lens' AwsCloudFrontDistributionDefaultCacheBehavior (Prelude.Maybe Prelude.Text)
awsCloudFrontDistributionDefaultCacheBehavior_viewerProtocolPolicy :: (Maybe Text -> f (Maybe Text))
-> AwsCloudFrontDistributionDefaultCacheBehavior
-> f AwsCloudFrontDistributionDefaultCacheBehavior
awsCloudFrontDistributionDefaultCacheBehavior_viewerProtocolPolicy = (AwsCloudFrontDistributionDefaultCacheBehavior -> Maybe Text)
-> (AwsCloudFrontDistributionDefaultCacheBehavior
-> Maybe Text -> AwsCloudFrontDistributionDefaultCacheBehavior)
-> Lens
AwsCloudFrontDistributionDefaultCacheBehavior
AwsCloudFrontDistributionDefaultCacheBehavior
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsCloudFrontDistributionDefaultCacheBehavior' {Maybe Text
viewerProtocolPolicy :: Maybe Text
$sel:viewerProtocolPolicy:AwsCloudFrontDistributionDefaultCacheBehavior' :: AwsCloudFrontDistributionDefaultCacheBehavior -> Maybe Text
viewerProtocolPolicy} -> Maybe Text
viewerProtocolPolicy) (\s :: AwsCloudFrontDistributionDefaultCacheBehavior
s@AwsCloudFrontDistributionDefaultCacheBehavior' {} Maybe Text
a -> AwsCloudFrontDistributionDefaultCacheBehavior
s {$sel:viewerProtocolPolicy:AwsCloudFrontDistributionDefaultCacheBehavior' :: Maybe Text
viewerProtocolPolicy = Maybe Text
a} :: AwsCloudFrontDistributionDefaultCacheBehavior)
instance
Core.FromJSON
AwsCloudFrontDistributionDefaultCacheBehavior
where
parseJSON :: Value -> Parser AwsCloudFrontDistributionDefaultCacheBehavior
parseJSON =
String
-> (Object -> Parser AwsCloudFrontDistributionDefaultCacheBehavior)
-> Value
-> Parser AwsCloudFrontDistributionDefaultCacheBehavior
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsCloudFrontDistributionDefaultCacheBehavior"
( \Object
x ->
Maybe Text -> AwsCloudFrontDistributionDefaultCacheBehavior
AwsCloudFrontDistributionDefaultCacheBehavior'
(Maybe Text -> AwsCloudFrontDistributionDefaultCacheBehavior)
-> Parser (Maybe Text)
-> Parser AwsCloudFrontDistributionDefaultCacheBehavior
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ViewerProtocolPolicy")
)
instance
Prelude.Hashable
AwsCloudFrontDistributionDefaultCacheBehavior
instance
Prelude.NFData
AwsCloudFrontDistributionDefaultCacheBehavior
instance
Core.ToJSON
AwsCloudFrontDistributionDefaultCacheBehavior
where
toJSON :: AwsCloudFrontDistributionDefaultCacheBehavior -> Value
toJSON
AwsCloudFrontDistributionDefaultCacheBehavior' {Maybe Text
viewerProtocolPolicy :: Maybe Text
$sel:viewerProtocolPolicy:AwsCloudFrontDistributionDefaultCacheBehavior' :: AwsCloudFrontDistributionDefaultCacheBehavior -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ViewerProtocolPolicy" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
viewerProtocolPolicy
]
)