{-# 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.JsonClassifier 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 JsonClassifier = JsonClassifier'
{
JsonClassifier -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
JsonClassifier -> Maybe POSIX
lastUpdated :: Prelude.Maybe Data.POSIX,
JsonClassifier -> Maybe Integer
version :: Prelude.Maybe Prelude.Integer,
JsonClassifier -> Text
name :: Prelude.Text,
JsonClassifier -> Text
jsonPath :: Prelude.Text
}
deriving (JsonClassifier -> JsonClassifier -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JsonClassifier -> JsonClassifier -> Bool
$c/= :: JsonClassifier -> JsonClassifier -> Bool
== :: JsonClassifier -> JsonClassifier -> Bool
$c== :: JsonClassifier -> JsonClassifier -> Bool
Prelude.Eq, ReadPrec [JsonClassifier]
ReadPrec JsonClassifier
Int -> ReadS JsonClassifier
ReadS [JsonClassifier]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JsonClassifier]
$creadListPrec :: ReadPrec [JsonClassifier]
readPrec :: ReadPrec JsonClassifier
$creadPrec :: ReadPrec JsonClassifier
readList :: ReadS [JsonClassifier]
$creadList :: ReadS [JsonClassifier]
readsPrec :: Int -> ReadS JsonClassifier
$creadsPrec :: Int -> ReadS JsonClassifier
Prelude.Read, Int -> JsonClassifier -> ShowS
[JsonClassifier] -> ShowS
JsonClassifier -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JsonClassifier] -> ShowS
$cshowList :: [JsonClassifier] -> ShowS
show :: JsonClassifier -> String
$cshow :: JsonClassifier -> String
showsPrec :: Int -> JsonClassifier -> ShowS
$cshowsPrec :: Int -> JsonClassifier -> ShowS
Prelude.Show, forall x. Rep JsonClassifier x -> JsonClassifier
forall x. JsonClassifier -> Rep JsonClassifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JsonClassifier x -> JsonClassifier
$cfrom :: forall x. JsonClassifier -> Rep JsonClassifier x
Prelude.Generic)
newJsonClassifier ::
Prelude.Text ->
Prelude.Text ->
JsonClassifier
newJsonClassifier :: Text -> Text -> JsonClassifier
newJsonClassifier Text
pName_ Text
pJsonPath_ =
JsonClassifier'
{ $sel:creationTime:JsonClassifier' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdated:JsonClassifier' :: Maybe POSIX
lastUpdated = forall a. Maybe a
Prelude.Nothing,
$sel:version:JsonClassifier' :: Maybe Integer
version = forall a. Maybe a
Prelude.Nothing,
$sel:name:JsonClassifier' :: Text
name = Text
pName_,
$sel:jsonPath:JsonClassifier' :: Text
jsonPath = Text
pJsonPath_
}
jsonClassifier_creationTime :: Lens.Lens' JsonClassifier (Prelude.Maybe Prelude.UTCTime)
jsonClassifier_creationTime :: Lens' JsonClassifier (Maybe UTCTime)
jsonClassifier_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JsonClassifier' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:JsonClassifier' :: JsonClassifier -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: JsonClassifier
s@JsonClassifier' {} Maybe POSIX
a -> JsonClassifier
s {$sel:creationTime:JsonClassifier' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: JsonClassifier) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
jsonClassifier_lastUpdated :: Lens.Lens' JsonClassifier (Prelude.Maybe Prelude.UTCTime)
jsonClassifier_lastUpdated :: Lens' JsonClassifier (Maybe UTCTime)
jsonClassifier_lastUpdated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JsonClassifier' {Maybe POSIX
lastUpdated :: Maybe POSIX
$sel:lastUpdated:JsonClassifier' :: JsonClassifier -> Maybe POSIX
lastUpdated} -> Maybe POSIX
lastUpdated) (\s :: JsonClassifier
s@JsonClassifier' {} Maybe POSIX
a -> JsonClassifier
s {$sel:lastUpdated:JsonClassifier' :: Maybe POSIX
lastUpdated = Maybe POSIX
a} :: JsonClassifier) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
jsonClassifier_version :: Lens.Lens' JsonClassifier (Prelude.Maybe Prelude.Integer)
jsonClassifier_version :: Lens' JsonClassifier (Maybe Integer)
jsonClassifier_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JsonClassifier' {Maybe Integer
version :: Maybe Integer
$sel:version:JsonClassifier' :: JsonClassifier -> Maybe Integer
version} -> Maybe Integer
version) (\s :: JsonClassifier
s@JsonClassifier' {} Maybe Integer
a -> JsonClassifier
s {$sel:version:JsonClassifier' :: Maybe Integer
version = Maybe Integer
a} :: JsonClassifier)
jsonClassifier_name :: Lens.Lens' JsonClassifier Prelude.Text
jsonClassifier_name :: Lens' JsonClassifier Text
jsonClassifier_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JsonClassifier' {Text
name :: Text
$sel:name:JsonClassifier' :: JsonClassifier -> Text
name} -> Text
name) (\s :: JsonClassifier
s@JsonClassifier' {} Text
a -> JsonClassifier
s {$sel:name:JsonClassifier' :: Text
name = Text
a} :: JsonClassifier)
jsonClassifier_jsonPath :: Lens.Lens' JsonClassifier Prelude.Text
jsonClassifier_jsonPath :: Lens' JsonClassifier Text
jsonClassifier_jsonPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JsonClassifier' {Text
jsonPath :: Text
$sel:jsonPath:JsonClassifier' :: JsonClassifier -> Text
jsonPath} -> Text
jsonPath) (\s :: JsonClassifier
s@JsonClassifier' {} Text
a -> JsonClassifier
s {$sel:jsonPath:JsonClassifier' :: Text
jsonPath = Text
a} :: JsonClassifier)
instance Data.FromJSON JsonClassifier where
parseJSON :: Value -> Parser JsonClassifier
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"JsonClassifier"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX -> Maybe Integer -> Text -> Text -> JsonClassifier
JsonClassifier'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastUpdated")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Version")
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
"Name")
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
"JsonPath")
)
instance Prelude.Hashable JsonClassifier where
hashWithSalt :: Int -> JsonClassifier -> Int
hashWithSalt Int
_salt JsonClassifier' {Maybe Integer
Maybe POSIX
Text
jsonPath :: Text
name :: Text
version :: Maybe Integer
lastUpdated :: Maybe POSIX
creationTime :: Maybe POSIX
$sel:jsonPath:JsonClassifier' :: JsonClassifier -> Text
$sel:name:JsonClassifier' :: JsonClassifier -> Text
$sel:version:JsonClassifier' :: JsonClassifier -> Maybe Integer
$sel:lastUpdated:JsonClassifier' :: JsonClassifier -> Maybe POSIX
$sel:creationTime:JsonClassifier' :: JsonClassifier -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdated
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
version
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jsonPath
instance Prelude.NFData JsonClassifier where
rnf :: JsonClassifier -> ()
rnf JsonClassifier' {Maybe Integer
Maybe POSIX
Text
jsonPath :: Text
name :: Text
version :: Maybe Integer
lastUpdated :: Maybe POSIX
creationTime :: Maybe POSIX
$sel:jsonPath:JsonClassifier' :: JsonClassifier -> Text
$sel:name:JsonClassifier' :: JsonClassifier -> Text
$sel:version:JsonClassifier' :: JsonClassifier -> Maybe Integer
$sel:lastUpdated:JsonClassifier' :: JsonClassifier -> Maybe POSIX
$sel:creationTime:JsonClassifier' :: JsonClassifier -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdated
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
version
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
jsonPath