{-# 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.ItemSelection
-- 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.ItemSelection
  ( ItemSelection
      ( ..,
        ItemSelection_All,
        ItemSelection_None,
        ItemSelection_Whitelist
      ),
  )
where

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

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

pattern ItemSelection_All :: ItemSelection
pattern $bItemSelection_All :: ItemSelection
$mItemSelection_All :: forall r. ItemSelection -> (Void# -> r) -> (Void# -> r) -> r
ItemSelection_All = ItemSelection' "all"

pattern ItemSelection_None :: ItemSelection
pattern $bItemSelection_None :: ItemSelection
$mItemSelection_None :: forall r. ItemSelection -> (Void# -> r) -> (Void# -> r) -> r
ItemSelection_None = ItemSelection' "none"

pattern ItemSelection_Whitelist :: ItemSelection
pattern $bItemSelection_Whitelist :: ItemSelection
$mItemSelection_Whitelist :: forall r. ItemSelection -> (Void# -> r) -> (Void# -> r) -> r
ItemSelection_Whitelist = ItemSelection' "whitelist"

{-# COMPLETE
  ItemSelection_All,
  ItemSelection_None,
  ItemSelection_Whitelist,
  ItemSelection'
  #-}