{-# 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.Comprehend.Types.EntityRecognizerSummary where
import Amazonka.Comprehend.Types.ModelStatus
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EntityRecognizerSummary = EntityRecognizerSummary'
{
EntityRecognizerSummary -> Maybe POSIX
latestVersionCreatedAt :: Prelude.Maybe Core.POSIX,
EntityRecognizerSummary -> Maybe ModelStatus
latestVersionStatus :: Prelude.Maybe ModelStatus,
EntityRecognizerSummary -> Maybe Int
numberOfVersions :: Prelude.Maybe Prelude.Int,
EntityRecognizerSummary -> Maybe Text
latestVersionName :: Prelude.Maybe Prelude.Text,
EntityRecognizerSummary -> Maybe Text
recognizerName :: Prelude.Maybe Prelude.Text
}
deriving (EntityRecognizerSummary -> EntityRecognizerSummary -> Bool
(EntityRecognizerSummary -> EntityRecognizerSummary -> Bool)
-> (EntityRecognizerSummary -> EntityRecognizerSummary -> Bool)
-> Eq EntityRecognizerSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EntityRecognizerSummary -> EntityRecognizerSummary -> Bool
$c/= :: EntityRecognizerSummary -> EntityRecognizerSummary -> Bool
== :: EntityRecognizerSummary -> EntityRecognizerSummary -> Bool
$c== :: EntityRecognizerSummary -> EntityRecognizerSummary -> Bool
Prelude.Eq, ReadPrec [EntityRecognizerSummary]
ReadPrec EntityRecognizerSummary
Int -> ReadS EntityRecognizerSummary
ReadS [EntityRecognizerSummary]
(Int -> ReadS EntityRecognizerSummary)
-> ReadS [EntityRecognizerSummary]
-> ReadPrec EntityRecognizerSummary
-> ReadPrec [EntityRecognizerSummary]
-> Read EntityRecognizerSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EntityRecognizerSummary]
$creadListPrec :: ReadPrec [EntityRecognizerSummary]
readPrec :: ReadPrec EntityRecognizerSummary
$creadPrec :: ReadPrec EntityRecognizerSummary
readList :: ReadS [EntityRecognizerSummary]
$creadList :: ReadS [EntityRecognizerSummary]
readsPrec :: Int -> ReadS EntityRecognizerSummary
$creadsPrec :: Int -> ReadS EntityRecognizerSummary
Prelude.Read, Int -> EntityRecognizerSummary -> ShowS
[EntityRecognizerSummary] -> ShowS
EntityRecognizerSummary -> String
(Int -> EntityRecognizerSummary -> ShowS)
-> (EntityRecognizerSummary -> String)
-> ([EntityRecognizerSummary] -> ShowS)
-> Show EntityRecognizerSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EntityRecognizerSummary] -> ShowS
$cshowList :: [EntityRecognizerSummary] -> ShowS
show :: EntityRecognizerSummary -> String
$cshow :: EntityRecognizerSummary -> String
showsPrec :: Int -> EntityRecognizerSummary -> ShowS
$cshowsPrec :: Int -> EntityRecognizerSummary -> ShowS
Prelude.Show, (forall x.
EntityRecognizerSummary -> Rep EntityRecognizerSummary x)
-> (forall x.
Rep EntityRecognizerSummary x -> EntityRecognizerSummary)
-> Generic EntityRecognizerSummary
forall x. Rep EntityRecognizerSummary x -> EntityRecognizerSummary
forall x. EntityRecognizerSummary -> Rep EntityRecognizerSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EntityRecognizerSummary x -> EntityRecognizerSummary
$cfrom :: forall x. EntityRecognizerSummary -> Rep EntityRecognizerSummary x
Prelude.Generic)
newEntityRecognizerSummary ::
EntityRecognizerSummary
newEntityRecognizerSummary :: EntityRecognizerSummary
newEntityRecognizerSummary =
EntityRecognizerSummary' :: Maybe POSIX
-> Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> EntityRecognizerSummary
EntityRecognizerSummary'
{ $sel:latestVersionCreatedAt:EntityRecognizerSummary' :: Maybe POSIX
latestVersionCreatedAt =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:latestVersionStatus:EntityRecognizerSummary' :: Maybe ModelStatus
latestVersionStatus = Maybe ModelStatus
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfVersions:EntityRecognizerSummary' :: Maybe Int
numberOfVersions = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:latestVersionName:EntityRecognizerSummary' :: Maybe Text
latestVersionName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:recognizerName:EntityRecognizerSummary' :: Maybe Text
recognizerName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
entityRecognizerSummary_latestVersionCreatedAt :: Lens.Lens' EntityRecognizerSummary (Prelude.Maybe Prelude.UTCTime)
entityRecognizerSummary_latestVersionCreatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> EntityRecognizerSummary -> f EntityRecognizerSummary
entityRecognizerSummary_latestVersionCreatedAt = (EntityRecognizerSummary -> Maybe POSIX)
-> (EntityRecognizerSummary
-> Maybe POSIX -> EntityRecognizerSummary)
-> Lens
EntityRecognizerSummary
EntityRecognizerSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerSummary' {Maybe POSIX
latestVersionCreatedAt :: Maybe POSIX
$sel:latestVersionCreatedAt:EntityRecognizerSummary' :: EntityRecognizerSummary -> Maybe POSIX
latestVersionCreatedAt} -> Maybe POSIX
latestVersionCreatedAt) (\s :: EntityRecognizerSummary
s@EntityRecognizerSummary' {} Maybe POSIX
a -> EntityRecognizerSummary
s {$sel:latestVersionCreatedAt:EntityRecognizerSummary' :: Maybe POSIX
latestVersionCreatedAt = Maybe POSIX
a} :: EntityRecognizerSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> EntityRecognizerSummary -> f EntityRecognizerSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> EntityRecognizerSummary
-> f EntityRecognizerSummary
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
entityRecognizerSummary_latestVersionStatus :: Lens.Lens' EntityRecognizerSummary (Prelude.Maybe ModelStatus)
entityRecognizerSummary_latestVersionStatus :: (Maybe ModelStatus -> f (Maybe ModelStatus))
-> EntityRecognizerSummary -> f EntityRecognizerSummary
entityRecognizerSummary_latestVersionStatus = (EntityRecognizerSummary -> Maybe ModelStatus)
-> (EntityRecognizerSummary
-> Maybe ModelStatus -> EntityRecognizerSummary)
-> Lens
EntityRecognizerSummary
EntityRecognizerSummary
(Maybe ModelStatus)
(Maybe ModelStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerSummary' {Maybe ModelStatus
latestVersionStatus :: Maybe ModelStatus
$sel:latestVersionStatus:EntityRecognizerSummary' :: EntityRecognizerSummary -> Maybe ModelStatus
latestVersionStatus} -> Maybe ModelStatus
latestVersionStatus) (\s :: EntityRecognizerSummary
s@EntityRecognizerSummary' {} Maybe ModelStatus
a -> EntityRecognizerSummary
s {$sel:latestVersionStatus:EntityRecognizerSummary' :: Maybe ModelStatus
latestVersionStatus = Maybe ModelStatus
a} :: EntityRecognizerSummary)
entityRecognizerSummary_numberOfVersions :: Lens.Lens' EntityRecognizerSummary (Prelude.Maybe Prelude.Int)
entityRecognizerSummary_numberOfVersions :: (Maybe Int -> f (Maybe Int))
-> EntityRecognizerSummary -> f EntityRecognizerSummary
entityRecognizerSummary_numberOfVersions = (EntityRecognizerSummary -> Maybe Int)
-> (EntityRecognizerSummary
-> Maybe Int -> EntityRecognizerSummary)
-> Lens
EntityRecognizerSummary
EntityRecognizerSummary
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerSummary' {Maybe Int
numberOfVersions :: Maybe Int
$sel:numberOfVersions:EntityRecognizerSummary' :: EntityRecognizerSummary -> Maybe Int
numberOfVersions} -> Maybe Int
numberOfVersions) (\s :: EntityRecognizerSummary
s@EntityRecognizerSummary' {} Maybe Int
a -> EntityRecognizerSummary
s {$sel:numberOfVersions:EntityRecognizerSummary' :: Maybe Int
numberOfVersions = Maybe Int
a} :: EntityRecognizerSummary)
entityRecognizerSummary_latestVersionName :: Lens.Lens' EntityRecognizerSummary (Prelude.Maybe Prelude.Text)
entityRecognizerSummary_latestVersionName :: (Maybe Text -> f (Maybe Text))
-> EntityRecognizerSummary -> f EntityRecognizerSummary
entityRecognizerSummary_latestVersionName = (EntityRecognizerSummary -> Maybe Text)
-> (EntityRecognizerSummary
-> Maybe Text -> EntityRecognizerSummary)
-> Lens
EntityRecognizerSummary
EntityRecognizerSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerSummary' {Maybe Text
latestVersionName :: Maybe Text
$sel:latestVersionName:EntityRecognizerSummary' :: EntityRecognizerSummary -> Maybe Text
latestVersionName} -> Maybe Text
latestVersionName) (\s :: EntityRecognizerSummary
s@EntityRecognizerSummary' {} Maybe Text
a -> EntityRecognizerSummary
s {$sel:latestVersionName:EntityRecognizerSummary' :: Maybe Text
latestVersionName = Maybe Text
a} :: EntityRecognizerSummary)
entityRecognizerSummary_recognizerName :: Lens.Lens' EntityRecognizerSummary (Prelude.Maybe Prelude.Text)
entityRecognizerSummary_recognizerName :: (Maybe Text -> f (Maybe Text))
-> EntityRecognizerSummary -> f EntityRecognizerSummary
entityRecognizerSummary_recognizerName = (EntityRecognizerSummary -> Maybe Text)
-> (EntityRecognizerSummary
-> Maybe Text -> EntityRecognizerSummary)
-> Lens
EntityRecognizerSummary
EntityRecognizerSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EntityRecognizerSummary' {Maybe Text
recognizerName :: Maybe Text
$sel:recognizerName:EntityRecognizerSummary' :: EntityRecognizerSummary -> Maybe Text
recognizerName} -> Maybe Text
recognizerName) (\s :: EntityRecognizerSummary
s@EntityRecognizerSummary' {} Maybe Text
a -> EntityRecognizerSummary
s {$sel:recognizerName:EntityRecognizerSummary' :: Maybe Text
recognizerName = Maybe Text
a} :: EntityRecognizerSummary)
instance Core.FromJSON EntityRecognizerSummary where
parseJSON :: Value -> Parser EntityRecognizerSummary
parseJSON =
String
-> (Object -> Parser EntityRecognizerSummary)
-> Value
-> Parser EntityRecognizerSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EntityRecognizerSummary"
( \Object
x ->
Maybe POSIX
-> Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> EntityRecognizerSummary
EntityRecognizerSummary'
(Maybe POSIX
-> Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> EntityRecognizerSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> EntityRecognizerSummary)
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
"LatestVersionCreatedAt")
Parser
(Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> EntityRecognizerSummary)
-> Parser (Maybe ModelStatus)
-> Parser
(Maybe Int -> Maybe Text -> Maybe Text -> EntityRecognizerSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ModelStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LatestVersionStatus")
Parser
(Maybe Int -> Maybe Text -> Maybe Text -> EntityRecognizerSummary)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> Maybe Text -> EntityRecognizerSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NumberOfVersions")
Parser (Maybe Text -> Maybe Text -> EntityRecognizerSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> EntityRecognizerSummary)
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
"LatestVersionName")
Parser (Maybe Text -> EntityRecognizerSummary)
-> Parser (Maybe Text) -> Parser EntityRecognizerSummary
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
"RecognizerName")
)
instance Prelude.Hashable EntityRecognizerSummary
instance Prelude.NFData EntityRecognizerSummary