{-# 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.Lens as Lens
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
(ResultRowValue -> ResultRowValue -> Bool)
-> (ResultRowValue -> ResultRowValue -> Bool) -> Eq ResultRowValue
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]
(Int -> ReadS ResultRowValue)
-> ReadS [ResultRowValue]
-> ReadPrec ResultRowValue
-> ReadPrec [ResultRowValue]
-> Read 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
(Int -> ResultRowValue -> ShowS)
-> (ResultRowValue -> String)
-> ([ResultRowValue] -> ShowS)
-> Show ResultRowValue
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. ResultRowValue -> Rep ResultRowValue x)
-> (forall x. Rep ResultRowValue x -> ResultRowValue)
-> Generic ResultRowValue
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' :: Text -> Text -> Text -> ResultRowValue
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 :: (Text -> f Text) -> ResultRowValue -> f ResultRowValue
resultRowValue_type = (ResultRowValue -> Text)
-> (ResultRowValue -> Text -> ResultRowValue)
-> Lens ResultRowValue ResultRowValue Text Text
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 :: (Text -> f Text) -> ResultRowValue -> f ResultRowValue
resultRowValue_value = (ResultRowValue -> Text)
-> (ResultRowValue -> Text -> ResultRowValue)
-> Lens ResultRowValue ResultRowValue Text Text
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 :: (Text -> f Text) -> ResultRowValue -> f ResultRowValue
resultRowValue_key = (ResultRowValue -> Text)
-> (ResultRowValue -> Text -> ResultRowValue)
-> Lens ResultRowValue ResultRowValue Text Text
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 Core.FromJSON ResultRowValue where
parseJSON :: Value -> Parser ResultRowValue
parseJSON =
String
-> (Object -> Parser ResultRowValue)
-> Value
-> Parser ResultRowValue
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ResultRowValue"
( \Object
x ->
Text -> Text -> Text -> ResultRowValue
ResultRowValue'
(Text -> Text -> Text -> ResultRowValue)
-> Parser Text -> Parser (Text -> Text -> ResultRowValue)
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
"Type")
Parser (Text -> Text -> ResultRowValue)
-> Parser Text -> Parser (Text -> ResultRowValue)
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
"Value")
Parser (Text -> ResultRowValue)
-> Parser Text -> Parser ResultRowValue
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
"Key")
)
instance Prelude.Hashable ResultRowValue
instance Prelude.NFData ResultRowValue