{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CloudFront.Types.OriginRequestPolicyHeaderBehavior
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CloudFront.Types.OriginRequestPolicyHeaderBehavior
  ( OriginRequestPolicyHeaderBehavior
      ( ..,
        OriginRequestPolicyHeaderBehavior_AllViewer,
        OriginRequestPolicyHeaderBehavior_AllViewerAndWhitelistCloudFront,
        OriginRequestPolicyHeaderBehavior_None,
        OriginRequestPolicyHeaderBehavior_Whitelist
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

newtype OriginRequestPolicyHeaderBehavior = OriginRequestPolicyHeaderBehavior'
  { OriginRequestPolicyHeaderBehavior -> Text
fromOriginRequestPolicyHeaderBehavior ::
      Core.Text
  }
  deriving stock
    ( Int -> OriginRequestPolicyHeaderBehavior -> ShowS
[OriginRequestPolicyHeaderBehavior] -> ShowS
OriginRequestPolicyHeaderBehavior -> String
(Int -> OriginRequestPolicyHeaderBehavior -> ShowS)
-> (OriginRequestPolicyHeaderBehavior -> String)
-> ([OriginRequestPolicyHeaderBehavior] -> ShowS)
-> Show OriginRequestPolicyHeaderBehavior
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OriginRequestPolicyHeaderBehavior] -> ShowS
$cshowList :: [OriginRequestPolicyHeaderBehavior] -> ShowS
show :: OriginRequestPolicyHeaderBehavior -> String
$cshow :: OriginRequestPolicyHeaderBehavior -> String
showsPrec :: Int -> OriginRequestPolicyHeaderBehavior -> ShowS
$cshowsPrec :: Int -> OriginRequestPolicyHeaderBehavior -> ShowS
Prelude.Show,
      ReadPrec [OriginRequestPolicyHeaderBehavior]
ReadPrec OriginRequestPolicyHeaderBehavior
Int -> ReadS OriginRequestPolicyHeaderBehavior
ReadS [OriginRequestPolicyHeaderBehavior]
(Int -> ReadS OriginRequestPolicyHeaderBehavior)
-> ReadS [OriginRequestPolicyHeaderBehavior]
-> ReadPrec OriginRequestPolicyHeaderBehavior
-> ReadPrec [OriginRequestPolicyHeaderBehavior]
-> Read OriginRequestPolicyHeaderBehavior
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OriginRequestPolicyHeaderBehavior]
$creadListPrec :: ReadPrec [OriginRequestPolicyHeaderBehavior]
readPrec :: ReadPrec OriginRequestPolicyHeaderBehavior
$creadPrec :: ReadPrec OriginRequestPolicyHeaderBehavior
readList :: ReadS [OriginRequestPolicyHeaderBehavior]
$creadList :: ReadS [OriginRequestPolicyHeaderBehavior]
readsPrec :: Int -> ReadS OriginRequestPolicyHeaderBehavior
$creadsPrec :: Int -> ReadS OriginRequestPolicyHeaderBehavior
Prelude.Read,
      OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
(OriginRequestPolicyHeaderBehavior
 -> OriginRequestPolicyHeaderBehavior -> Bool)
-> (OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior -> Bool)
-> Eq OriginRequestPolicyHeaderBehavior
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
$c/= :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
== :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
$c== :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
Prelude.Eq,
      Eq OriginRequestPolicyHeaderBehavior
Eq OriginRequestPolicyHeaderBehavior
-> (OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior -> Ordering)
-> (OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior -> Bool)
-> (OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior -> Bool)
-> (OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior -> Bool)
-> (OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior -> Bool)
-> (OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior)
-> (OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior
    -> OriginRequestPolicyHeaderBehavior)
-> Ord OriginRequestPolicyHeaderBehavior
OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Ordering
OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
$cmin :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
max :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
$cmax :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior
>= :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
$c>= :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
> :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
$c> :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
<= :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
$c<= :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
< :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
$c< :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Bool
compare :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Ordering
$ccompare :: OriginRequestPolicyHeaderBehavior
-> OriginRequestPolicyHeaderBehavior -> Ordering
$cp1Ord :: Eq OriginRequestPolicyHeaderBehavior
Prelude.Ord,
      (forall x.
 OriginRequestPolicyHeaderBehavior
 -> Rep OriginRequestPolicyHeaderBehavior x)
-> (forall x.
    Rep OriginRequestPolicyHeaderBehavior x
    -> OriginRequestPolicyHeaderBehavior)
-> Generic OriginRequestPolicyHeaderBehavior
forall x.
Rep OriginRequestPolicyHeaderBehavior x
-> OriginRequestPolicyHeaderBehavior
forall x.
OriginRequestPolicyHeaderBehavior
-> Rep OriginRequestPolicyHeaderBehavior x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep OriginRequestPolicyHeaderBehavior x
-> OriginRequestPolicyHeaderBehavior
$cfrom :: forall x.
OriginRequestPolicyHeaderBehavior
-> Rep OriginRequestPolicyHeaderBehavior x
Prelude.Generic
    )
  deriving newtype
    ( Int -> OriginRequestPolicyHeaderBehavior -> Int
OriginRequestPolicyHeaderBehavior -> Int
(Int -> OriginRequestPolicyHeaderBehavior -> Int)
-> (OriginRequestPolicyHeaderBehavior -> Int)
-> Hashable OriginRequestPolicyHeaderBehavior
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: OriginRequestPolicyHeaderBehavior -> Int
$chash :: OriginRequestPolicyHeaderBehavior -> Int
hashWithSalt :: Int -> OriginRequestPolicyHeaderBehavior -> Int
$chashWithSalt :: Int -> OriginRequestPolicyHeaderBehavior -> Int
Prelude.Hashable,
      OriginRequestPolicyHeaderBehavior -> ()
(OriginRequestPolicyHeaderBehavior -> ())
-> NFData OriginRequestPolicyHeaderBehavior
forall a. (a -> ()) -> NFData a
rnf :: OriginRequestPolicyHeaderBehavior -> ()
$crnf :: OriginRequestPolicyHeaderBehavior -> ()
Prelude.NFData,
      Text -> Either String OriginRequestPolicyHeaderBehavior
(Text -> Either String OriginRequestPolicyHeaderBehavior)
-> FromText OriginRequestPolicyHeaderBehavior
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String OriginRequestPolicyHeaderBehavior
$cfromText :: Text -> Either String OriginRequestPolicyHeaderBehavior
Core.FromText,
      OriginRequestPolicyHeaderBehavior -> Text
(OriginRequestPolicyHeaderBehavior -> Text)
-> ToText OriginRequestPolicyHeaderBehavior
forall a. (a -> Text) -> ToText a
toText :: OriginRequestPolicyHeaderBehavior -> Text
$ctoText :: OriginRequestPolicyHeaderBehavior -> Text
Core.ToText,
      OriginRequestPolicyHeaderBehavior -> ByteString
(OriginRequestPolicyHeaderBehavior -> ByteString)
-> ToByteString OriginRequestPolicyHeaderBehavior
forall a. (a -> ByteString) -> ToByteString a
toBS :: OriginRequestPolicyHeaderBehavior -> ByteString
$ctoBS :: OriginRequestPolicyHeaderBehavior -> ByteString
Core.ToByteString,
      OriginRequestPolicyHeaderBehavior -> ByteStringBuilder
(OriginRequestPolicyHeaderBehavior -> ByteStringBuilder)
-> ToLog OriginRequestPolicyHeaderBehavior
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: OriginRequestPolicyHeaderBehavior -> ByteStringBuilder
$cbuild :: OriginRequestPolicyHeaderBehavior -> ByteStringBuilder
Core.ToLog,
      HeaderName -> OriginRequestPolicyHeaderBehavior -> [Header]
(HeaderName -> OriginRequestPolicyHeaderBehavior -> [Header])
-> ToHeader OriginRequestPolicyHeaderBehavior
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> OriginRequestPolicyHeaderBehavior -> [Header]
$ctoHeader :: HeaderName -> OriginRequestPolicyHeaderBehavior -> [Header]
Core.ToHeader,
      OriginRequestPolicyHeaderBehavior -> QueryString
(OriginRequestPolicyHeaderBehavior -> QueryString)
-> ToQuery OriginRequestPolicyHeaderBehavior
forall a. (a -> QueryString) -> ToQuery a
toQuery :: OriginRequestPolicyHeaderBehavior -> QueryString
$ctoQuery :: OriginRequestPolicyHeaderBehavior -> QueryString
Core.ToQuery,
      Value -> Parser [OriginRequestPolicyHeaderBehavior]
Value -> Parser OriginRequestPolicyHeaderBehavior
(Value -> Parser OriginRequestPolicyHeaderBehavior)
-> (Value -> Parser [OriginRequestPolicyHeaderBehavior])
-> FromJSON OriginRequestPolicyHeaderBehavior
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [OriginRequestPolicyHeaderBehavior]
$cparseJSONList :: Value -> Parser [OriginRequestPolicyHeaderBehavior]
parseJSON :: Value -> Parser OriginRequestPolicyHeaderBehavior
$cparseJSON :: Value -> Parser OriginRequestPolicyHeaderBehavior
Core.FromJSON,
      FromJSONKeyFunction [OriginRequestPolicyHeaderBehavior]
FromJSONKeyFunction OriginRequestPolicyHeaderBehavior
FromJSONKeyFunction OriginRequestPolicyHeaderBehavior
-> FromJSONKeyFunction [OriginRequestPolicyHeaderBehavior]
-> FromJSONKey OriginRequestPolicyHeaderBehavior
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [OriginRequestPolicyHeaderBehavior]
$cfromJSONKeyList :: FromJSONKeyFunction [OriginRequestPolicyHeaderBehavior]
fromJSONKey :: FromJSONKeyFunction OriginRequestPolicyHeaderBehavior
$cfromJSONKey :: FromJSONKeyFunction OriginRequestPolicyHeaderBehavior
Core.FromJSONKey,
      [OriginRequestPolicyHeaderBehavior] -> Encoding
[OriginRequestPolicyHeaderBehavior] -> Value
OriginRequestPolicyHeaderBehavior -> Encoding
OriginRequestPolicyHeaderBehavior -> Value
(OriginRequestPolicyHeaderBehavior -> Value)
-> (OriginRequestPolicyHeaderBehavior -> Encoding)
-> ([OriginRequestPolicyHeaderBehavior] -> Value)
-> ([OriginRequestPolicyHeaderBehavior] -> Encoding)
-> ToJSON OriginRequestPolicyHeaderBehavior
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [OriginRequestPolicyHeaderBehavior] -> Encoding
$ctoEncodingList :: [OriginRequestPolicyHeaderBehavior] -> Encoding
toJSONList :: [OriginRequestPolicyHeaderBehavior] -> Value
$ctoJSONList :: [OriginRequestPolicyHeaderBehavior] -> Value
toEncoding :: OriginRequestPolicyHeaderBehavior -> Encoding
$ctoEncoding :: OriginRequestPolicyHeaderBehavior -> Encoding
toJSON :: OriginRequestPolicyHeaderBehavior -> Value
$ctoJSON :: OriginRequestPolicyHeaderBehavior -> Value
Core.ToJSON,
      ToJSONKeyFunction [OriginRequestPolicyHeaderBehavior]
ToJSONKeyFunction OriginRequestPolicyHeaderBehavior
ToJSONKeyFunction OriginRequestPolicyHeaderBehavior
-> ToJSONKeyFunction [OriginRequestPolicyHeaderBehavior]
-> ToJSONKey OriginRequestPolicyHeaderBehavior
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [OriginRequestPolicyHeaderBehavior]
$ctoJSONKeyList :: ToJSONKeyFunction [OriginRequestPolicyHeaderBehavior]
toJSONKey :: ToJSONKeyFunction OriginRequestPolicyHeaderBehavior
$ctoJSONKey :: ToJSONKeyFunction OriginRequestPolicyHeaderBehavior
Core.ToJSONKey,
      [Node] -> Either String OriginRequestPolicyHeaderBehavior
([Node] -> Either String OriginRequestPolicyHeaderBehavior)
-> FromXML OriginRequestPolicyHeaderBehavior
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String OriginRequestPolicyHeaderBehavior
$cparseXML :: [Node] -> Either String OriginRequestPolicyHeaderBehavior
Core.FromXML,
      OriginRequestPolicyHeaderBehavior -> XML
(OriginRequestPolicyHeaderBehavior -> XML)
-> ToXML OriginRequestPolicyHeaderBehavior
forall a. (a -> XML) -> ToXML a
toXML :: OriginRequestPolicyHeaderBehavior -> XML
$ctoXML :: OriginRequestPolicyHeaderBehavior -> XML
Core.ToXML
    )

pattern OriginRequestPolicyHeaderBehavior_AllViewer :: OriginRequestPolicyHeaderBehavior
pattern $bOriginRequestPolicyHeaderBehavior_AllViewer :: OriginRequestPolicyHeaderBehavior
$mOriginRequestPolicyHeaderBehavior_AllViewer :: forall r.
OriginRequestPolicyHeaderBehavior
-> (Void# -> r) -> (Void# -> r) -> r
OriginRequestPolicyHeaderBehavior_AllViewer = OriginRequestPolicyHeaderBehavior' "allViewer"

pattern OriginRequestPolicyHeaderBehavior_AllViewerAndWhitelistCloudFront :: OriginRequestPolicyHeaderBehavior
pattern $bOriginRequestPolicyHeaderBehavior_AllViewerAndWhitelistCloudFront :: OriginRequestPolicyHeaderBehavior
$mOriginRequestPolicyHeaderBehavior_AllViewerAndWhitelistCloudFront :: forall r.
OriginRequestPolicyHeaderBehavior
-> (Void# -> r) -> (Void# -> r) -> r
OriginRequestPolicyHeaderBehavior_AllViewerAndWhitelistCloudFront = OriginRequestPolicyHeaderBehavior' "allViewerAndWhitelistCloudFront"

pattern OriginRequestPolicyHeaderBehavior_None :: OriginRequestPolicyHeaderBehavior
pattern $bOriginRequestPolicyHeaderBehavior_None :: OriginRequestPolicyHeaderBehavior
$mOriginRequestPolicyHeaderBehavior_None :: forall r.
OriginRequestPolicyHeaderBehavior
-> (Void# -> r) -> (Void# -> r) -> r
OriginRequestPolicyHeaderBehavior_None = OriginRequestPolicyHeaderBehavior' "none"

pattern OriginRequestPolicyHeaderBehavior_Whitelist :: OriginRequestPolicyHeaderBehavior
pattern $bOriginRequestPolicyHeaderBehavior_Whitelist :: OriginRequestPolicyHeaderBehavior
$mOriginRequestPolicyHeaderBehavior_Whitelist :: forall r.
OriginRequestPolicyHeaderBehavior
-> (Void# -> r) -> (Void# -> r) -> r
OriginRequestPolicyHeaderBehavior_Whitelist = OriginRequestPolicyHeaderBehavior' "whitelist"

{-# COMPLETE
  OriginRequestPolicyHeaderBehavior_AllViewer,
  OriginRequestPolicyHeaderBehavior_AllViewerAndWhitelistCloudFront,
  OriginRequestPolicyHeaderBehavior_None,
  OriginRequestPolicyHeaderBehavior_Whitelist,
  OriginRequestPolicyHeaderBehavior'
  #-}