{-# 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.Kinesis.Types.ShardFilterType
-- 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.Kinesis.Types.ShardFilterType
  ( ShardFilterType
      ( ..,
        ShardFilterType_AFTER_SHARD_ID,
        ShardFilterType_AT_LATEST,
        ShardFilterType_AT_TIMESTAMP,
        ShardFilterType_AT_TRIM_HORIZON,
        ShardFilterType_FROM_TIMESTAMP,
        ShardFilterType_FROM_TRIM_HORIZON
      ),
  )
where

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

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

pattern ShardFilterType_AFTER_SHARD_ID :: ShardFilterType
pattern $bShardFilterType_AFTER_SHARD_ID :: ShardFilterType
$mShardFilterType_AFTER_SHARD_ID :: forall r. ShardFilterType -> (Void# -> r) -> (Void# -> r) -> r
ShardFilterType_AFTER_SHARD_ID = ShardFilterType' "AFTER_SHARD_ID"

pattern ShardFilterType_AT_LATEST :: ShardFilterType
pattern $bShardFilterType_AT_LATEST :: ShardFilterType
$mShardFilterType_AT_LATEST :: forall r. ShardFilterType -> (Void# -> r) -> (Void# -> r) -> r
ShardFilterType_AT_LATEST = ShardFilterType' "AT_LATEST"

pattern ShardFilterType_AT_TIMESTAMP :: ShardFilterType
pattern $bShardFilterType_AT_TIMESTAMP :: ShardFilterType
$mShardFilterType_AT_TIMESTAMP :: forall r. ShardFilterType -> (Void# -> r) -> (Void# -> r) -> r
ShardFilterType_AT_TIMESTAMP = ShardFilterType' "AT_TIMESTAMP"

pattern ShardFilterType_AT_TRIM_HORIZON :: ShardFilterType
pattern $bShardFilterType_AT_TRIM_HORIZON :: ShardFilterType
$mShardFilterType_AT_TRIM_HORIZON :: forall r. ShardFilterType -> (Void# -> r) -> (Void# -> r) -> r
ShardFilterType_AT_TRIM_HORIZON = ShardFilterType' "AT_TRIM_HORIZON"

pattern ShardFilterType_FROM_TIMESTAMP :: ShardFilterType
pattern $bShardFilterType_FROM_TIMESTAMP :: ShardFilterType
$mShardFilterType_FROM_TIMESTAMP :: forall r. ShardFilterType -> (Void# -> r) -> (Void# -> r) -> r
ShardFilterType_FROM_TIMESTAMP = ShardFilterType' "FROM_TIMESTAMP"

pattern ShardFilterType_FROM_TRIM_HORIZON :: ShardFilterType
pattern $bShardFilterType_FROM_TRIM_HORIZON :: ShardFilterType
$mShardFilterType_FROM_TRIM_HORIZON :: forall r. ShardFilterType -> (Void# -> r) -> (Void# -> r) -> r
ShardFilterType_FROM_TRIM_HORIZON = ShardFilterType' "FROM_TRIM_HORIZON"

{-# COMPLETE
  ShardFilterType_AFTER_SHARD_ID,
  ShardFilterType_AT_LATEST,
  ShardFilterType_AT_TIMESTAMP,
  ShardFilterType_AT_TRIM_HORIZON,
  ShardFilterType_FROM_TIMESTAMP,
  ShardFilterType_FROM_TRIM_HORIZON,
  ShardFilterType'
  #-}