{-# 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.DynamoDB.Types.ProjectionType
-- 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.DynamoDB.Types.ProjectionType
  ( ProjectionType
      ( ..,
        ProjectionType_ALL,
        ProjectionType_INCLUDE,
        ProjectionType_KEYS_ONLY
      ),
  )
where

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

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

pattern ProjectionType_ALL :: ProjectionType
pattern $bProjectionType_ALL :: ProjectionType
$mProjectionType_ALL :: forall r. ProjectionType -> (Void# -> r) -> (Void# -> r) -> r
ProjectionType_ALL = ProjectionType' "ALL"

pattern ProjectionType_INCLUDE :: ProjectionType
pattern $bProjectionType_INCLUDE :: ProjectionType
$mProjectionType_INCLUDE :: forall r. ProjectionType -> (Void# -> r) -> (Void# -> r) -> r
ProjectionType_INCLUDE = ProjectionType' "INCLUDE"

pattern ProjectionType_KEYS_ONLY :: ProjectionType
pattern $bProjectionType_KEYS_ONLY :: ProjectionType
$mProjectionType_KEYS_ONLY :: forall r. ProjectionType -> (Void# -> r) -> (Void# -> r) -> r
ProjectionType_KEYS_ONLY = ProjectionType' "KEYS_ONLY"

{-# COMPLETE
  ProjectionType_ALL,
  ProjectionType_INCLUDE,
  ProjectionType_KEYS_ONLY,
  ProjectionType'
  #-}