{-# 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.OriginRequestPolicySummary where
import Amazonka.CloudFront.Types.OriginRequestPolicy
import Amazonka.CloudFront.Types.OriginRequestPolicyType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OriginRequestPolicySummary = OriginRequestPolicySummary'
{
OriginRequestPolicySummary -> OriginRequestPolicyType
type' :: OriginRequestPolicyType,
OriginRequestPolicySummary -> OriginRequestPolicy
originRequestPolicy :: OriginRequestPolicy
}
deriving (OriginRequestPolicySummary -> OriginRequestPolicySummary -> Bool
(OriginRequestPolicySummary -> OriginRequestPolicySummary -> Bool)
-> (OriginRequestPolicySummary
-> OriginRequestPolicySummary -> Bool)
-> Eq OriginRequestPolicySummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OriginRequestPolicySummary -> OriginRequestPolicySummary -> Bool
$c/= :: OriginRequestPolicySummary -> OriginRequestPolicySummary -> Bool
== :: OriginRequestPolicySummary -> OriginRequestPolicySummary -> Bool
$c== :: OriginRequestPolicySummary -> OriginRequestPolicySummary -> Bool
Prelude.Eq, ReadPrec [OriginRequestPolicySummary]
ReadPrec OriginRequestPolicySummary
Int -> ReadS OriginRequestPolicySummary
ReadS [OriginRequestPolicySummary]
(Int -> ReadS OriginRequestPolicySummary)
-> ReadS [OriginRequestPolicySummary]
-> ReadPrec OriginRequestPolicySummary
-> ReadPrec [OriginRequestPolicySummary]
-> Read OriginRequestPolicySummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OriginRequestPolicySummary]
$creadListPrec :: ReadPrec [OriginRequestPolicySummary]
readPrec :: ReadPrec OriginRequestPolicySummary
$creadPrec :: ReadPrec OriginRequestPolicySummary
readList :: ReadS [OriginRequestPolicySummary]
$creadList :: ReadS [OriginRequestPolicySummary]
readsPrec :: Int -> ReadS OriginRequestPolicySummary
$creadsPrec :: Int -> ReadS OriginRequestPolicySummary
Prelude.Read, Int -> OriginRequestPolicySummary -> ShowS
[OriginRequestPolicySummary] -> ShowS
OriginRequestPolicySummary -> String
(Int -> OriginRequestPolicySummary -> ShowS)
-> (OriginRequestPolicySummary -> String)
-> ([OriginRequestPolicySummary] -> ShowS)
-> Show OriginRequestPolicySummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OriginRequestPolicySummary] -> ShowS
$cshowList :: [OriginRequestPolicySummary] -> ShowS
show :: OriginRequestPolicySummary -> String
$cshow :: OriginRequestPolicySummary -> String
showsPrec :: Int -> OriginRequestPolicySummary -> ShowS
$cshowsPrec :: Int -> OriginRequestPolicySummary -> ShowS
Prelude.Show, (forall x.
OriginRequestPolicySummary -> Rep OriginRequestPolicySummary x)
-> (forall x.
Rep OriginRequestPolicySummary x -> OriginRequestPolicySummary)
-> Generic OriginRequestPolicySummary
forall x.
Rep OriginRequestPolicySummary x -> OriginRequestPolicySummary
forall x.
OriginRequestPolicySummary -> Rep OriginRequestPolicySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OriginRequestPolicySummary x -> OriginRequestPolicySummary
$cfrom :: forall x.
OriginRequestPolicySummary -> Rep OriginRequestPolicySummary x
Prelude.Generic)
newOriginRequestPolicySummary ::
OriginRequestPolicyType ->
OriginRequestPolicy ->
OriginRequestPolicySummary
newOriginRequestPolicySummary :: OriginRequestPolicyType
-> OriginRequestPolicy -> OriginRequestPolicySummary
newOriginRequestPolicySummary
OriginRequestPolicyType
pType_
OriginRequestPolicy
pOriginRequestPolicy_ =
OriginRequestPolicySummary' :: OriginRequestPolicyType
-> OriginRequestPolicy -> OriginRequestPolicySummary
OriginRequestPolicySummary'
{ $sel:type':OriginRequestPolicySummary' :: OriginRequestPolicyType
type' = OriginRequestPolicyType
pType_,
$sel:originRequestPolicy:OriginRequestPolicySummary' :: OriginRequestPolicy
originRequestPolicy = OriginRequestPolicy
pOriginRequestPolicy_
}
originRequestPolicySummary_type :: Lens.Lens' OriginRequestPolicySummary OriginRequestPolicyType
originRequestPolicySummary_type :: (OriginRequestPolicyType -> f OriginRequestPolicyType)
-> OriginRequestPolicySummary -> f OriginRequestPolicySummary
originRequestPolicySummary_type = (OriginRequestPolicySummary -> OriginRequestPolicyType)
-> (OriginRequestPolicySummary
-> OriginRequestPolicyType -> OriginRequestPolicySummary)
-> Lens
OriginRequestPolicySummary
OriginRequestPolicySummary
OriginRequestPolicyType
OriginRequestPolicyType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginRequestPolicySummary' {OriginRequestPolicyType
type' :: OriginRequestPolicyType
$sel:type':OriginRequestPolicySummary' :: OriginRequestPolicySummary -> OriginRequestPolicyType
type'} -> OriginRequestPolicyType
type') (\s :: OriginRequestPolicySummary
s@OriginRequestPolicySummary' {} OriginRequestPolicyType
a -> OriginRequestPolicySummary
s {$sel:type':OriginRequestPolicySummary' :: OriginRequestPolicyType
type' = OriginRequestPolicyType
a} :: OriginRequestPolicySummary)
originRequestPolicySummary_originRequestPolicy :: Lens.Lens' OriginRequestPolicySummary OriginRequestPolicy
originRequestPolicySummary_originRequestPolicy :: (OriginRequestPolicy -> f OriginRequestPolicy)
-> OriginRequestPolicySummary -> f OriginRequestPolicySummary
originRequestPolicySummary_originRequestPolicy = (OriginRequestPolicySummary -> OriginRequestPolicy)
-> (OriginRequestPolicySummary
-> OriginRequestPolicy -> OriginRequestPolicySummary)
-> Lens
OriginRequestPolicySummary
OriginRequestPolicySummary
OriginRequestPolicy
OriginRequestPolicy
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OriginRequestPolicySummary' {OriginRequestPolicy
originRequestPolicy :: OriginRequestPolicy
$sel:originRequestPolicy:OriginRequestPolicySummary' :: OriginRequestPolicySummary -> OriginRequestPolicy
originRequestPolicy} -> OriginRequestPolicy
originRequestPolicy) (\s :: OriginRequestPolicySummary
s@OriginRequestPolicySummary' {} OriginRequestPolicy
a -> OriginRequestPolicySummary
s {$sel:originRequestPolicy:OriginRequestPolicySummary' :: OriginRequestPolicy
originRequestPolicy = OriginRequestPolicy
a} :: OriginRequestPolicySummary)
instance Core.FromXML OriginRequestPolicySummary where
parseXML :: [Node] -> Either String OriginRequestPolicySummary
parseXML [Node]
x =
OriginRequestPolicyType
-> OriginRequestPolicy -> OriginRequestPolicySummary
OriginRequestPolicySummary'
(OriginRequestPolicyType
-> OriginRequestPolicy -> OriginRequestPolicySummary)
-> Either String OriginRequestPolicyType
-> Either
String (OriginRequestPolicy -> OriginRequestPolicySummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String OriginRequestPolicyType
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"Type")
Either String (OriginRequestPolicy -> OriginRequestPolicySummary)
-> Either String OriginRequestPolicy
-> Either String OriginRequestPolicySummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String OriginRequestPolicy
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"OriginRequestPolicy")
instance Prelude.Hashable OriginRequestPolicySummary
instance Prelude.NFData OriginRequestPolicySummary