{-# 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.CachePolicyCookieBehavior
-- 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.CachePolicyCookieBehavior
  ( CachePolicyCookieBehavior
      ( ..,
        CachePolicyCookieBehavior_All,
        CachePolicyCookieBehavior_AllExcept,
        CachePolicyCookieBehavior_None,
        CachePolicyCookieBehavior_Whitelist
      ),
  )
where

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

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

pattern CachePolicyCookieBehavior_All :: CachePolicyCookieBehavior
pattern $bCachePolicyCookieBehavior_All :: CachePolicyCookieBehavior
$mCachePolicyCookieBehavior_All :: forall r.
CachePolicyCookieBehavior -> (Void# -> r) -> (Void# -> r) -> r
CachePolicyCookieBehavior_All = CachePolicyCookieBehavior' "all"

pattern CachePolicyCookieBehavior_AllExcept :: CachePolicyCookieBehavior
pattern $bCachePolicyCookieBehavior_AllExcept :: CachePolicyCookieBehavior
$mCachePolicyCookieBehavior_AllExcept :: forall r.
CachePolicyCookieBehavior -> (Void# -> r) -> (Void# -> r) -> r
CachePolicyCookieBehavior_AllExcept = CachePolicyCookieBehavior' "allExcept"

pattern CachePolicyCookieBehavior_None :: CachePolicyCookieBehavior
pattern $bCachePolicyCookieBehavior_None :: CachePolicyCookieBehavior
$mCachePolicyCookieBehavior_None :: forall r.
CachePolicyCookieBehavior -> (Void# -> r) -> (Void# -> r) -> r
CachePolicyCookieBehavior_None = CachePolicyCookieBehavior' "none"

pattern CachePolicyCookieBehavior_Whitelist :: CachePolicyCookieBehavior
pattern $bCachePolicyCookieBehavior_Whitelist :: CachePolicyCookieBehavior
$mCachePolicyCookieBehavior_Whitelist :: forall r.
CachePolicyCookieBehavior -> (Void# -> r) -> (Void# -> r) -> r
CachePolicyCookieBehavior_Whitelist = CachePolicyCookieBehavior' "whitelist"

{-# COMPLETE
  CachePolicyCookieBehavior_All,
  CachePolicyCookieBehavior_AllExcept,
  CachePolicyCookieBehavior_None,
  CachePolicyCookieBehavior_Whitelist,
  CachePolicyCookieBehavior'
  #-}