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