{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Kinesis.Types.HashKeyRange where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data HashKeyRange = HashKeyRange'
{
HashKeyRange -> Text
startingHashKey :: Prelude.Text,
HashKeyRange -> Text
endingHashKey :: Prelude.Text
}
deriving (HashKeyRange -> HashKeyRange -> Bool
(HashKeyRange -> HashKeyRange -> Bool)
-> (HashKeyRange -> HashKeyRange -> Bool) -> Eq HashKeyRange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HashKeyRange -> HashKeyRange -> Bool
$c/= :: HashKeyRange -> HashKeyRange -> Bool
== :: HashKeyRange -> HashKeyRange -> Bool
$c== :: HashKeyRange -> HashKeyRange -> Bool
Prelude.Eq, ReadPrec [HashKeyRange]
ReadPrec HashKeyRange
Int -> ReadS HashKeyRange
ReadS [HashKeyRange]
(Int -> ReadS HashKeyRange)
-> ReadS [HashKeyRange]
-> ReadPrec HashKeyRange
-> ReadPrec [HashKeyRange]
-> Read HashKeyRange
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HashKeyRange]
$creadListPrec :: ReadPrec [HashKeyRange]
readPrec :: ReadPrec HashKeyRange
$creadPrec :: ReadPrec HashKeyRange
readList :: ReadS [HashKeyRange]
$creadList :: ReadS [HashKeyRange]
readsPrec :: Int -> ReadS HashKeyRange
$creadsPrec :: Int -> ReadS HashKeyRange
Prelude.Read, Int -> HashKeyRange -> ShowS
[HashKeyRange] -> ShowS
HashKeyRange -> String
(Int -> HashKeyRange -> ShowS)
-> (HashKeyRange -> String)
-> ([HashKeyRange] -> ShowS)
-> Show HashKeyRange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HashKeyRange] -> ShowS
$cshowList :: [HashKeyRange] -> ShowS
show :: HashKeyRange -> String
$cshow :: HashKeyRange -> String
showsPrec :: Int -> HashKeyRange -> ShowS
$cshowsPrec :: Int -> HashKeyRange -> ShowS
Prelude.Show, (forall x. HashKeyRange -> Rep HashKeyRange x)
-> (forall x. Rep HashKeyRange x -> HashKeyRange)
-> Generic HashKeyRange
forall x. Rep HashKeyRange x -> HashKeyRange
forall x. HashKeyRange -> Rep HashKeyRange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HashKeyRange x -> HashKeyRange
$cfrom :: forall x. HashKeyRange -> Rep HashKeyRange x
Prelude.Generic)
newHashKeyRange ::
Prelude.Text ->
Prelude.Text ->
HashKeyRange
newHashKeyRange :: Text -> Text -> HashKeyRange
newHashKeyRange Text
pStartingHashKey_ Text
pEndingHashKey_ =
HashKeyRange' :: Text -> Text -> HashKeyRange
HashKeyRange'
{ $sel:startingHashKey:HashKeyRange' :: Text
startingHashKey = Text
pStartingHashKey_,
$sel:endingHashKey:HashKeyRange' :: Text
endingHashKey = Text
pEndingHashKey_
}
hashKeyRange_startingHashKey :: Lens.Lens' HashKeyRange Prelude.Text
hashKeyRange_startingHashKey :: (Text -> f Text) -> HashKeyRange -> f HashKeyRange
hashKeyRange_startingHashKey = (HashKeyRange -> Text)
-> (HashKeyRange -> Text -> HashKeyRange)
-> Lens HashKeyRange HashKeyRange Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HashKeyRange' {Text
startingHashKey :: Text
$sel:startingHashKey:HashKeyRange' :: HashKeyRange -> Text
startingHashKey} -> Text
startingHashKey) (\s :: HashKeyRange
s@HashKeyRange' {} Text
a -> HashKeyRange
s {$sel:startingHashKey:HashKeyRange' :: Text
startingHashKey = Text
a} :: HashKeyRange)
hashKeyRange_endingHashKey :: Lens.Lens' HashKeyRange Prelude.Text
hashKeyRange_endingHashKey :: (Text -> f Text) -> HashKeyRange -> f HashKeyRange
hashKeyRange_endingHashKey = (HashKeyRange -> Text)
-> (HashKeyRange -> Text -> HashKeyRange)
-> Lens HashKeyRange HashKeyRange Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HashKeyRange' {Text
endingHashKey :: Text
$sel:endingHashKey:HashKeyRange' :: HashKeyRange -> Text
endingHashKey} -> Text
endingHashKey) (\s :: HashKeyRange
s@HashKeyRange' {} Text
a -> HashKeyRange
s {$sel:endingHashKey:HashKeyRange' :: Text
endingHashKey = Text
a} :: HashKeyRange)
instance Core.FromJSON HashKeyRange where
parseJSON :: Value -> Parser HashKeyRange
parseJSON =
String
-> (Object -> Parser HashKeyRange) -> Value -> Parser HashKeyRange
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"HashKeyRange"
( \Object
x ->
Text -> Text -> HashKeyRange
HashKeyRange'
(Text -> Text -> HashKeyRange)
-> Parser Text -> Parser (Text -> HashKeyRange)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"StartingHashKey")
Parser (Text -> HashKeyRange) -> Parser Text -> Parser HashKeyRange
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"EndingHashKey")
)
instance Prelude.Hashable HashKeyRange
instance Prelude.NFData HashKeyRange