{-# 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.ResponseHeadersPolicyCustomHeader where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data =
{
:: Prelude.Text,
:: Prelude.Text,
:: Prelude.Bool
}
deriving (ResponseHeadersPolicyCustomHeader
-> ResponseHeadersPolicyCustomHeader -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResponseHeadersPolicyCustomHeader
-> ResponseHeadersPolicyCustomHeader -> Bool
$c/= :: ResponseHeadersPolicyCustomHeader
-> ResponseHeadersPolicyCustomHeader -> Bool
== :: ResponseHeadersPolicyCustomHeader
-> ResponseHeadersPolicyCustomHeader -> Bool
$c== :: ResponseHeadersPolicyCustomHeader
-> ResponseHeadersPolicyCustomHeader -> Bool
Prelude.Eq, ReadPrec [ResponseHeadersPolicyCustomHeader]
ReadPrec ResponseHeadersPolicyCustomHeader
Int -> ReadS ResponseHeadersPolicyCustomHeader
ReadS [ResponseHeadersPolicyCustomHeader]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResponseHeadersPolicyCustomHeader]
$creadListPrec :: ReadPrec [ResponseHeadersPolicyCustomHeader]
readPrec :: ReadPrec ResponseHeadersPolicyCustomHeader
$creadPrec :: ReadPrec ResponseHeadersPolicyCustomHeader
readList :: ReadS [ResponseHeadersPolicyCustomHeader]
$creadList :: ReadS [ResponseHeadersPolicyCustomHeader]
readsPrec :: Int -> ReadS ResponseHeadersPolicyCustomHeader
$creadsPrec :: Int -> ReadS ResponseHeadersPolicyCustomHeader
Prelude.Read, Int -> ResponseHeadersPolicyCustomHeader -> ShowS
[ResponseHeadersPolicyCustomHeader] -> ShowS
ResponseHeadersPolicyCustomHeader -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResponseHeadersPolicyCustomHeader] -> ShowS
$cshowList :: [ResponseHeadersPolicyCustomHeader] -> ShowS
show :: ResponseHeadersPolicyCustomHeader -> String
$cshow :: ResponseHeadersPolicyCustomHeader -> String
showsPrec :: Int -> ResponseHeadersPolicyCustomHeader -> ShowS
$cshowsPrec :: Int -> ResponseHeadersPolicyCustomHeader -> ShowS
Prelude.Show, forall x.
Rep ResponseHeadersPolicyCustomHeader x
-> ResponseHeadersPolicyCustomHeader
forall x.
ResponseHeadersPolicyCustomHeader
-> Rep ResponseHeadersPolicyCustomHeader x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ResponseHeadersPolicyCustomHeader x
-> ResponseHeadersPolicyCustomHeader
$cfrom :: forall x.
ResponseHeadersPolicyCustomHeader
-> Rep ResponseHeadersPolicyCustomHeader x
Prelude.Generic)
newResponseHeadersPolicyCustomHeader ::
Prelude.Text ->
Prelude.Text ->
Prelude.Bool ->
ResponseHeadersPolicyCustomHeader
Text
pHeader_
Text
pValue_
Bool
pOverride_ =
ResponseHeadersPolicyCustomHeader'
{ $sel:header:ResponseHeadersPolicyCustomHeader' :: Text
header =
Text
pHeader_,
$sel:value:ResponseHeadersPolicyCustomHeader' :: Text
value = Text
pValue_,
$sel:override:ResponseHeadersPolicyCustomHeader' :: Bool
override = Bool
pOverride_
}
responseHeadersPolicyCustomHeader_header :: Lens.Lens' ResponseHeadersPolicyCustomHeader Prelude.Text
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseHeadersPolicyCustomHeader' {Text
header :: Text
$sel:header:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Text
header} -> Text
header) (\s :: ResponseHeadersPolicyCustomHeader
s@ResponseHeadersPolicyCustomHeader' {} Text
a -> ResponseHeadersPolicyCustomHeader
s {$sel:header:ResponseHeadersPolicyCustomHeader' :: Text
header = Text
a} :: ResponseHeadersPolicyCustomHeader)
responseHeadersPolicyCustomHeader_value :: Lens.Lens' ResponseHeadersPolicyCustomHeader Prelude.Text
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseHeadersPolicyCustomHeader' {Text
value :: Text
$sel:value:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Text
value} -> Text
value) (\s :: ResponseHeadersPolicyCustomHeader
s@ResponseHeadersPolicyCustomHeader' {} Text
a -> ResponseHeadersPolicyCustomHeader
s {$sel:value:ResponseHeadersPolicyCustomHeader' :: Text
value = Text
a} :: ResponseHeadersPolicyCustomHeader)
responseHeadersPolicyCustomHeader_override :: Lens.Lens' ResponseHeadersPolicyCustomHeader Prelude.Bool
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResponseHeadersPolicyCustomHeader' {Bool
override :: Bool
$sel:override:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Bool
override} -> Bool
override) (\s :: ResponseHeadersPolicyCustomHeader
s@ResponseHeadersPolicyCustomHeader' {} Bool
a -> ResponseHeadersPolicyCustomHeader
s {$sel:override:ResponseHeadersPolicyCustomHeader' :: Bool
override = Bool
a} :: ResponseHeadersPolicyCustomHeader)
instance
Data.FromXML
ResponseHeadersPolicyCustomHeader
where
parseXML :: [Node] -> Either String ResponseHeadersPolicyCustomHeader
parseXML [Node]
x =
Text -> Text -> Bool -> ResponseHeadersPolicyCustomHeader
ResponseHeadersPolicyCustomHeader'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Header")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Value")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"Override")
instance
Prelude.Hashable
ResponseHeadersPolicyCustomHeader
where
hashWithSalt :: Int -> ResponseHeadersPolicyCustomHeader -> Int
hashWithSalt
Int
_salt
ResponseHeadersPolicyCustomHeader' {Bool
Text
override :: Bool
value :: Text
header :: Text
$sel:override:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Bool
$sel:value:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Text
$sel:header:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
header
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
value
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Bool
override
instance
Prelude.NFData
ResponseHeadersPolicyCustomHeader
where
rnf :: ResponseHeadersPolicyCustomHeader -> ()
rnf ResponseHeadersPolicyCustomHeader' {Bool
Text
override :: Bool
value :: Text
header :: Text
$sel:override:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Bool
$sel:value:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Text
$sel:header:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
header
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
value
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
override
instance Data.ToXML ResponseHeadersPolicyCustomHeader where
toXML :: ResponseHeadersPolicyCustomHeader -> XML
toXML ResponseHeadersPolicyCustomHeader' {Bool
Text
override :: Bool
value :: Text
header :: Text
$sel:override:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Bool
$sel:value:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Text
$sel:header:ResponseHeadersPolicyCustomHeader' :: ResponseHeadersPolicyCustomHeader -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ Name
"Header" forall a. ToXML a => Name -> a -> XML
Data.@= Text
header,
Name
"Value" forall a. ToXML a => Name -> a -> XML
Data.@= Text
value,
Name
"Override" forall a. ToXML a => Name -> a -> XML
Data.@= Bool
override
]