{-# 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.DynamoDBStreams.Types.ShardIteratorType
-- 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.DynamoDBStreams.Types.ShardIteratorType
  ( ShardIteratorType
      ( ..,
        ShardIteratorType_AFTER_SEQUENCE_NUMBER,
        ShardIteratorType_AT_SEQUENCE_NUMBER,
        ShardIteratorType_LATEST,
        ShardIteratorType_TRIM_HORIZON
      ),
  )
where

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

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

pattern ShardIteratorType_AFTER_SEQUENCE_NUMBER :: ShardIteratorType
pattern $bShardIteratorType_AFTER_SEQUENCE_NUMBER :: ShardIteratorType
$mShardIteratorType_AFTER_SEQUENCE_NUMBER :: forall r. ShardIteratorType -> (Void# -> r) -> (Void# -> r) -> r
ShardIteratorType_AFTER_SEQUENCE_NUMBER = ShardIteratorType' "AFTER_SEQUENCE_NUMBER"

pattern ShardIteratorType_AT_SEQUENCE_NUMBER :: ShardIteratorType
pattern $bShardIteratorType_AT_SEQUENCE_NUMBER :: ShardIteratorType
$mShardIteratorType_AT_SEQUENCE_NUMBER :: forall r. ShardIteratorType -> (Void# -> r) -> (Void# -> r) -> r
ShardIteratorType_AT_SEQUENCE_NUMBER = ShardIteratorType' "AT_SEQUENCE_NUMBER"

pattern ShardIteratorType_LATEST :: ShardIteratorType
pattern $bShardIteratorType_LATEST :: ShardIteratorType
$mShardIteratorType_LATEST :: forall r. ShardIteratorType -> (Void# -> r) -> (Void# -> r) -> r
ShardIteratorType_LATEST = ShardIteratorType' "LATEST"

pattern ShardIteratorType_TRIM_HORIZON :: ShardIteratorType
pattern $bShardIteratorType_TRIM_HORIZON :: ShardIteratorType
$mShardIteratorType_TRIM_HORIZON :: forall r. ShardIteratorType -> (Void# -> r) -> (Void# -> r) -> r
ShardIteratorType_TRIM_HORIZON = ShardIteratorType' "TRIM_HORIZON"

{-# COMPLETE
  ShardIteratorType_AFTER_SEQUENCE_NUMBER,
  ShardIteratorType_AT_SEQUENCE_NUMBER,
  ShardIteratorType_LATEST,
  ShardIteratorType_TRIM_HORIZON,
  ShardIteratorType'
  #-}