{-# 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.Pinpoint.Types.ResultRowValue where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ResultRowValue = ResultRowValue'
{
ResultRowValue -> Text
type' :: Prelude.Text,
ResultRowValue -> Text
value :: Prelude.Text,
ResultRowValue -> Text
key :: Prelude.Text
}
deriving (ResultRowValue -> ResultRowValue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResultRowValue -> ResultRowValue -> Bool
$c/= :: ResultRowValue -> ResultRowValue -> Bool
== :: ResultRowValue -> ResultRowValue -> Bool
$c== :: ResultRowValue -> ResultRowValue -> Bool
Prelude.Eq, ReadPrec [ResultRowValue]
ReadPrec ResultRowValue
Int -> ReadS ResultRowValue
ReadS [ResultRowValue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResultRowValue]
$creadListPrec :: ReadPrec [ResultRowValue]
readPrec :: ReadPrec ResultRowValue
$creadPrec :: ReadPrec ResultRowValue
readList :: ReadS [ResultRowValue]
$creadList :: ReadS [ResultRowValue]
readsPrec :: Int -> ReadS ResultRowValue
$creadsPrec :: Int -> ReadS ResultRowValue
Prelude.Read, Int -> ResultRowValue -> ShowS
[ResultRowValue] -> ShowS
ResultRowValue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResultRowValue] -> ShowS
$cshowList :: [ResultRowValue] -> ShowS
show :: ResultRowValue -> String
$cshow :: ResultRowValue -> String
showsPrec :: Int -> ResultRowValue -> ShowS
$cshowsPrec :: Int -> ResultRowValue -> ShowS
Prelude.Show, forall x. Rep ResultRowValue x -> ResultRowValue
forall x. ResultRowValue -> Rep ResultRowValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResultRowValue x -> ResultRowValue
$cfrom :: forall x. ResultRowValue -> Rep ResultRowValue x
Prelude.Generic)
newResultRowValue ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ResultRowValue
newResultRowValue :: Text -> Text -> Text -> ResultRowValue
newResultRowValue Text
pType_ Text
pValue_ Text
pKey_ =
ResultRowValue'
{ $sel:type':ResultRowValue' :: Text
type' = Text
pType_,
$sel:value:ResultRowValue' :: Text
value = Text
pValue_,
$sel:key:ResultRowValue' :: Text
key = Text
pKey_
}
resultRowValue_type :: Lens.Lens' ResultRowValue Prelude.Text
resultRowValue_type :: Lens' ResultRowValue Text
resultRowValue_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultRowValue' {Text
type' :: Text
$sel:type':ResultRowValue' :: ResultRowValue -> Text
type'} -> Text
type') (\s :: ResultRowValue
s@ResultRowValue' {} Text
a -> ResultRowValue
s {$sel:type':ResultRowValue' :: Text
type' = Text
a} :: ResultRowValue)
resultRowValue_value :: Lens.Lens' ResultRowValue Prelude.Text
resultRowValue_value :: Lens' ResultRowValue Text
resultRowValue_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultRowValue' {Text
value :: Text
$sel:value:ResultRowValue' :: ResultRowValue -> Text
value} -> Text
value) (\s :: ResultRowValue
s@ResultRowValue' {} Text
a -> ResultRowValue
s {$sel:value:ResultRowValue' :: Text
value = Text
a} :: ResultRowValue)
resultRowValue_key :: Lens.Lens' ResultRowValue Prelude.Text
resultRowValue_key :: Lens' ResultRowValue Text
resultRowValue_key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResultRowValue' {Text
key :: Text
$sel:key:ResultRowValue' :: ResultRowValue -> Text
key} -> Text
key) (\s :: ResultRowValue
s@ResultRowValue' {} Text
a -> ResultRowValue
s {$sel:key:ResultRowValue' :: Text
key = Text
a} :: ResultRowValue)
instance Data.FromJSON ResultRowValue where
parseJSON :: Value -> Parser ResultRowValue
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ResultRowValue"
( \Object
x ->
Text -> Text -> Text -> ResultRowValue
ResultRowValue'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Type")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Value")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Key")
)
instance Prelude.Hashable ResultRowValue where
hashWithSalt :: Int -> ResultRowValue -> Int
hashWithSalt Int
_salt ResultRowValue' {Text
key :: Text
value :: Text
type' :: Text
$sel:key:ResultRowValue' :: ResultRowValue -> Text
$sel:value:ResultRowValue' :: ResultRowValue -> Text
$sel:type':ResultRowValue' :: ResultRowValue -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
value
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
key
instance Prelude.NFData ResultRowValue where
rnf :: ResultRowValue -> ()
rnf ResultRowValue' {Text
key :: Text
value :: Text
type' :: Text
$sel:key:ResultRowValue' :: ResultRowValue -> Text
$sel:value:ResultRowValue' :: ResultRowValue -> Text
$sel:type':ResultRowValue' :: ResultRowValue -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
value
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
key