{-# 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.Glue.Types.XMLClassifier where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data XMLClassifier = XMLClassifier'
{
XMLClassifier -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
XMLClassifier -> Maybe POSIX
lastUpdated :: Prelude.Maybe Core.POSIX,
XMLClassifier -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
XMLClassifier -> Maybe Text
rowTag :: Prelude.Maybe Prelude.Text,
XMLClassifier -> Text
name :: Prelude.Text,
XMLClassifier -> Text
classification :: Prelude.Text
}
deriving (XMLClassifier -> XMLClassifier -> Bool
(XMLClassifier -> XMLClassifier -> Bool)
-> (XMLClassifier -> XMLClassifier -> Bool) -> Eq XMLClassifier
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: XMLClassifier -> XMLClassifier -> Bool
$c/= :: XMLClassifier -> XMLClassifier -> Bool
== :: XMLClassifier -> XMLClassifier -> Bool
$c== :: XMLClassifier -> XMLClassifier -> Bool
Prelude.Eq, ReadPrec [XMLClassifier]
ReadPrec XMLClassifier
Int -> ReadS XMLClassifier
ReadS [XMLClassifier]
(Int -> ReadS XMLClassifier)
-> ReadS [XMLClassifier]
-> ReadPrec XMLClassifier
-> ReadPrec [XMLClassifier]
-> Read XMLClassifier
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [XMLClassifier]
$creadListPrec :: ReadPrec [XMLClassifier]
readPrec :: ReadPrec XMLClassifier
$creadPrec :: ReadPrec XMLClassifier
readList :: ReadS [XMLClassifier]
$creadList :: ReadS [XMLClassifier]
readsPrec :: Int -> ReadS XMLClassifier
$creadsPrec :: Int -> ReadS XMLClassifier
Prelude.Read, Int -> XMLClassifier -> ShowS
[XMLClassifier] -> ShowS
XMLClassifier -> String
(Int -> XMLClassifier -> ShowS)
-> (XMLClassifier -> String)
-> ([XMLClassifier] -> ShowS)
-> Show XMLClassifier
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [XMLClassifier] -> ShowS
$cshowList :: [XMLClassifier] -> ShowS
show :: XMLClassifier -> String
$cshow :: XMLClassifier -> String
showsPrec :: Int -> XMLClassifier -> ShowS
$cshowsPrec :: Int -> XMLClassifier -> ShowS
Prelude.Show, (forall x. XMLClassifier -> Rep XMLClassifier x)
-> (forall x. Rep XMLClassifier x -> XMLClassifier)
-> Generic XMLClassifier
forall x. Rep XMLClassifier x -> XMLClassifier
forall x. XMLClassifier -> Rep XMLClassifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep XMLClassifier x -> XMLClassifier
$cfrom :: forall x. XMLClassifier -> Rep XMLClassifier x
Prelude.Generic)
newXMLClassifier ::
Prelude.Text ->
Prelude.Text ->
XMLClassifier
newXMLClassifier :: Text -> Text -> XMLClassifier
newXMLClassifier Text
pName_ Text
pClassification_ =
XMLClassifier' :: Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Text
-> Text
-> XMLClassifier
XMLClassifier'
{ $sel:creationTime:XMLClassifier' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdated:XMLClassifier' :: Maybe POSIX
lastUpdated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:version:XMLClassifier' :: Maybe Integer
version = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
$sel:rowTag:XMLClassifier' :: Maybe Text
rowTag = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:XMLClassifier' :: Text
name = Text
pName_,
$sel:classification:XMLClassifier' :: Text
classification = Text
pClassification_
}
xMLClassifier_creationTime :: Lens.Lens' XMLClassifier (Prelude.Maybe Prelude.UTCTime)
xMLClassifier_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> XMLClassifier -> f XMLClassifier
xMLClassifier_creationTime = (XMLClassifier -> Maybe POSIX)
-> (XMLClassifier -> Maybe POSIX -> XMLClassifier)
-> Lens XMLClassifier XMLClassifier (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XMLClassifier' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:XMLClassifier' :: XMLClassifier -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: XMLClassifier
s@XMLClassifier' {} Maybe POSIX
a -> XMLClassifier
s {$sel:creationTime:XMLClassifier' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: XMLClassifier) ((Maybe POSIX -> f (Maybe POSIX))
-> XMLClassifier -> f XMLClassifier)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> XMLClassifier
-> f XMLClassifier
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
xMLClassifier_lastUpdated :: Lens.Lens' XMLClassifier (Prelude.Maybe Prelude.UTCTime)
xMLClassifier_lastUpdated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> XMLClassifier -> f XMLClassifier
xMLClassifier_lastUpdated = (XMLClassifier -> Maybe POSIX)
-> (XMLClassifier -> Maybe POSIX -> XMLClassifier)
-> Lens XMLClassifier XMLClassifier (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XMLClassifier' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:XMLClassifier' :: XMLClassifier -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: XMLClassifier
s@XMLClassifier' {} Maybe POSIX
a -> XMLClassifier
s {$sel:lastUpdated:XMLClassifier' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: XMLClassifier) ((Maybe POSIX -> f (Maybe POSIX))
-> XMLClassifier -> f XMLClassifier)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> XMLClassifier
-> f XMLClassifier
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
xMLClassifier_version :: Lens.Lens' XMLClassifier (Prelude.Maybe Prelude.Integer)
xMLClassifier_version :: (Maybe Integer -> f (Maybe Integer))
-> XMLClassifier -> f XMLClassifier
xMLClassifier_version = (XMLClassifier -> Maybe Integer)
-> (XMLClassifier -> Maybe Integer -> XMLClassifier)
-> Lens XMLClassifier XMLClassifier (Maybe Integer) (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XMLClassifier' {Maybe Integer
version :: Maybe Integer
$sel:version:XMLClassifier' :: XMLClassifier -> Maybe Integer
version} -> Maybe Integer
version) (\s :: XMLClassifier
s@XMLClassifier' {} Maybe Integer
a -> XMLClassifier
s {$sel:version:XMLClassifier' :: Maybe Integer
version = Maybe Integer
a} :: XMLClassifier)
xMLClassifier_rowTag :: Lens.Lens' XMLClassifier (Prelude.Maybe Prelude.Text)
xMLClassifier_rowTag :: (Maybe Text -> f (Maybe Text)) -> XMLClassifier -> f XMLClassifier
xMLClassifier_rowTag = (XMLClassifier -> Maybe Text)
-> (XMLClassifier -> Maybe Text -> XMLClassifier)
-> Lens XMLClassifier XMLClassifier (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XMLClassifier' {Maybe Text
rowTag :: Maybe Text
$sel:rowTag:XMLClassifier' :: XMLClassifier -> Maybe Text
rowTag} -> Maybe Text
rowTag) (\s :: XMLClassifier
s@XMLClassifier' {} Maybe Text
a -> XMLClassifier
s {$sel:rowTag:XMLClassifier' :: Maybe Text
rowTag = Maybe Text
a} :: XMLClassifier)
xMLClassifier_name :: Lens.Lens' XMLClassifier Prelude.Text
xMLClassifier_name :: (Text -> f Text) -> XMLClassifier -> f XMLClassifier
xMLClassifier_name = (XMLClassifier -> Text)
-> (XMLClassifier -> Text -> XMLClassifier)
-> Lens XMLClassifier XMLClassifier Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XMLClassifier' {Text
name :: Text
$sel:name:XMLClassifier' :: XMLClassifier -> Text
name} -> Text
name) (\s :: XMLClassifier
s@XMLClassifier' {} Text
a -> XMLClassifier
s {$sel:name:XMLClassifier' :: Text
name = Text
a} :: XMLClassifier)
xMLClassifier_classification :: Lens.Lens' XMLClassifier Prelude.Text
xMLClassifier_classification :: (Text -> f Text) -> XMLClassifier -> f XMLClassifier
xMLClassifier_classification = (XMLClassifier -> Text)
-> (XMLClassifier -> Text -> XMLClassifier)
-> Lens XMLClassifier XMLClassifier Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\XMLClassifier' {Text
classification :: Text
$sel:classification:XMLClassifier' :: XMLClassifier -> Text
classification} -> Text
classification) (\s :: XMLClassifier
s@XMLClassifier' {} Text
a -> XMLClassifier
s {$sel:classification:XMLClassifier' :: Text
classification = Text
a} :: XMLClassifier)
instance Core.FromJSON XMLClassifier where
parseJSON :: Value -> Parser XMLClassifier
parseJSON =
String
-> (Object -> Parser XMLClassifier)
-> Value
-> Parser XMLClassifier
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"XMLClassifier"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Text
-> Text
-> XMLClassifier
XMLClassifier'
(Maybe POSIX
-> Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Text
-> Text
-> XMLClassifier)
-> Parser (Maybe POSIX)
-> Parser
(Maybe POSIX
-> Maybe Integer -> Maybe Text -> Text -> Text -> XMLClassifier)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
Parser
(Maybe POSIX
-> Maybe Integer -> Maybe Text -> Text -> Text -> XMLClassifier)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Integer -> Maybe Text -> Text -> Text -> XMLClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdated")
Parser
(Maybe Integer -> Maybe Text -> Text -> Text -> XMLClassifier)
-> Parser (Maybe Integer)
-> Parser (Maybe Text -> Text -> Text -> XMLClassifier)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Version")
Parser (Maybe Text -> Text -> Text -> XMLClassifier)
-> Parser (Maybe Text) -> Parser (Text -> Text -> XMLClassifier)
forall (f :: * -> *) a b. Applicative f => 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
"RowTag")
Parser (Text -> Text -> XMLClassifier)
-> Parser Text -> Parser (Text -> XMLClassifier)
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
"Name")
Parser (Text -> XMLClassifier)
-> Parser Text -> Parser XMLClassifier
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
"Classification")
)
instance Prelude.Hashable XMLClassifier
instance Prelude.NFData XMLClassifier