{-# 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.Athena.Types.Datum where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Datum = Datum'
{
Datum -> Maybe Text
varCharValue :: Prelude.Maybe Prelude.Text
}
deriving (Datum -> Datum -> Bool
(Datum -> Datum -> Bool) -> (Datum -> Datum -> Bool) -> Eq Datum
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Datum -> Datum -> Bool
$c/= :: Datum -> Datum -> Bool
== :: Datum -> Datum -> Bool
$c== :: Datum -> Datum -> Bool
Prelude.Eq, ReadPrec [Datum]
ReadPrec Datum
Int -> ReadS Datum
ReadS [Datum]
(Int -> ReadS Datum)
-> ReadS [Datum]
-> ReadPrec Datum
-> ReadPrec [Datum]
-> Read Datum
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Datum]
$creadListPrec :: ReadPrec [Datum]
readPrec :: ReadPrec Datum
$creadPrec :: ReadPrec Datum
readList :: ReadS [Datum]
$creadList :: ReadS [Datum]
readsPrec :: Int -> ReadS Datum
$creadsPrec :: Int -> ReadS Datum
Prelude.Read, Int -> Datum -> ShowS
[Datum] -> ShowS
Datum -> String
(Int -> Datum -> ShowS)
-> (Datum -> String) -> ([Datum] -> ShowS) -> Show Datum
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Datum] -> ShowS
$cshowList :: [Datum] -> ShowS
show :: Datum -> String
$cshow :: Datum -> String
showsPrec :: Int -> Datum -> ShowS
$cshowsPrec :: Int -> Datum -> ShowS
Prelude.Show, (forall x. Datum -> Rep Datum x)
-> (forall x. Rep Datum x -> Datum) -> Generic Datum
forall x. Rep Datum x -> Datum
forall x. Datum -> Rep Datum x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Datum x -> Datum
$cfrom :: forall x. Datum -> Rep Datum x
Prelude.Generic)
newDatum ::
Datum
newDatum :: Datum
newDatum = Datum' :: Maybe Text -> Datum
Datum' {$sel:varCharValue:Datum' :: Maybe Text
varCharValue = Maybe Text
forall a. Maybe a
Prelude.Nothing}
datum_varCharValue :: Lens.Lens' Datum (Prelude.Maybe Prelude.Text)
datum_varCharValue :: (Maybe Text -> f (Maybe Text)) -> Datum -> f Datum
datum_varCharValue = (Datum -> Maybe Text)
-> (Datum -> Maybe Text -> Datum)
-> Lens Datum Datum (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Datum' {Maybe Text
varCharValue :: Maybe Text
$sel:varCharValue:Datum' :: Datum -> Maybe Text
varCharValue} -> Maybe Text
varCharValue) (\s :: Datum
s@Datum' {} Maybe Text
a -> Datum
s {$sel:varCharValue:Datum' :: Maybe Text
varCharValue = Maybe Text
a} :: Datum)
instance Core.FromJSON Datum where
parseJSON :: Value -> Parser Datum
parseJSON =
String -> (Object -> Parser Datum) -> Value -> Parser Datum
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Datum"
( \Object
x ->
Maybe Text -> Datum
Datum' (Maybe Text -> Datum) -> Parser (Maybe Text) -> Parser Datum
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VarCharValue")
)
instance Prelude.Hashable Datum
instance Prelude.NFData Datum