{-# 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.DocumentClassifierSummary 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 DocumentClassifierSummary = DocumentClassifierSummary'
{
DocumentClassifierSummary -> Maybe POSIX
latestVersionCreatedAt :: Prelude.Maybe Core.POSIX,
DocumentClassifierSummary -> Maybe Text
documentClassifierName :: Prelude.Maybe Prelude.Text,
DocumentClassifierSummary -> Maybe ModelStatus
latestVersionStatus :: Prelude.Maybe ModelStatus,
DocumentClassifierSummary -> Maybe Int
numberOfVersions :: Prelude.Maybe Prelude.Int,
DocumentClassifierSummary -> Maybe Text
latestVersionName :: Prelude.Maybe Prelude.Text
}
deriving (DocumentClassifierSummary -> DocumentClassifierSummary -> Bool
(DocumentClassifierSummary -> DocumentClassifierSummary -> Bool)
-> (DocumentClassifierSummary -> DocumentClassifierSummary -> Bool)
-> Eq DocumentClassifierSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DocumentClassifierSummary -> DocumentClassifierSummary -> Bool
$c/= :: DocumentClassifierSummary -> DocumentClassifierSummary -> Bool
== :: DocumentClassifierSummary -> DocumentClassifierSummary -> Bool
$c== :: DocumentClassifierSummary -> DocumentClassifierSummary -> Bool
Prelude.Eq, ReadPrec [DocumentClassifierSummary]
ReadPrec DocumentClassifierSummary
Int -> ReadS DocumentClassifierSummary
ReadS [DocumentClassifierSummary]
(Int -> ReadS DocumentClassifierSummary)
-> ReadS [DocumentClassifierSummary]
-> ReadPrec DocumentClassifierSummary
-> ReadPrec [DocumentClassifierSummary]
-> Read DocumentClassifierSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DocumentClassifierSummary]
$creadListPrec :: ReadPrec [DocumentClassifierSummary]
readPrec :: ReadPrec DocumentClassifierSummary
$creadPrec :: ReadPrec DocumentClassifierSummary
readList :: ReadS [DocumentClassifierSummary]
$creadList :: ReadS [DocumentClassifierSummary]
readsPrec :: Int -> ReadS DocumentClassifierSummary
$creadsPrec :: Int -> ReadS DocumentClassifierSummary
Prelude.Read, Int -> DocumentClassifierSummary -> ShowS
[DocumentClassifierSummary] -> ShowS
DocumentClassifierSummary -> String
(Int -> DocumentClassifierSummary -> ShowS)
-> (DocumentClassifierSummary -> String)
-> ([DocumentClassifierSummary] -> ShowS)
-> Show DocumentClassifierSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DocumentClassifierSummary] -> ShowS
$cshowList :: [DocumentClassifierSummary] -> ShowS
show :: DocumentClassifierSummary -> String
$cshow :: DocumentClassifierSummary -> String
showsPrec :: Int -> DocumentClassifierSummary -> ShowS
$cshowsPrec :: Int -> DocumentClassifierSummary -> ShowS
Prelude.Show, (forall x.
DocumentClassifierSummary -> Rep DocumentClassifierSummary x)
-> (forall x.
Rep DocumentClassifierSummary x -> DocumentClassifierSummary)
-> Generic DocumentClassifierSummary
forall x.
Rep DocumentClassifierSummary x -> DocumentClassifierSummary
forall x.
DocumentClassifierSummary -> Rep DocumentClassifierSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DocumentClassifierSummary x -> DocumentClassifierSummary
$cfrom :: forall x.
DocumentClassifierSummary -> Rep DocumentClassifierSummary x
Prelude.Generic)
newDocumentClassifierSummary ::
DocumentClassifierSummary
newDocumentClassifierSummary :: DocumentClassifierSummary
newDocumentClassifierSummary =
DocumentClassifierSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> DocumentClassifierSummary
DocumentClassifierSummary'
{ $sel:latestVersionCreatedAt:DocumentClassifierSummary' :: Maybe POSIX
latestVersionCreatedAt =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:documentClassifierName:DocumentClassifierSummary' :: Maybe Text
documentClassifierName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:latestVersionStatus:DocumentClassifierSummary' :: Maybe ModelStatus
latestVersionStatus = Maybe ModelStatus
forall a. Maybe a
Prelude.Nothing,
$sel:numberOfVersions:DocumentClassifierSummary' :: Maybe Int
numberOfVersions = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:latestVersionName:DocumentClassifierSummary' :: Maybe Text
latestVersionName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
documentClassifierSummary_latestVersionCreatedAt :: Lens.Lens' DocumentClassifierSummary (Prelude.Maybe Prelude.UTCTime)
documentClassifierSummary_latestVersionCreatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentClassifierSummary -> f DocumentClassifierSummary
documentClassifierSummary_latestVersionCreatedAt = (DocumentClassifierSummary -> Maybe POSIX)
-> (DocumentClassifierSummary
-> Maybe POSIX -> DocumentClassifierSummary)
-> Lens
DocumentClassifierSummary
DocumentClassifierSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierSummary' {Maybe POSIX
latestVersionCreatedAt :: Maybe POSIX
$sel:latestVersionCreatedAt:DocumentClassifierSummary' :: DocumentClassifierSummary -> Maybe POSIX
latestVersionCreatedAt} -> Maybe POSIX
latestVersionCreatedAt) (\s :: DocumentClassifierSummary
s@DocumentClassifierSummary' {} Maybe POSIX
a -> DocumentClassifierSummary
s {$sel:latestVersionCreatedAt:DocumentClassifierSummary' :: Maybe POSIX
latestVersionCreatedAt = Maybe POSIX
a} :: DocumentClassifierSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> DocumentClassifierSummary -> f DocumentClassifierSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DocumentClassifierSummary
-> f DocumentClassifierSummary
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
documentClassifierSummary_documentClassifierName :: Lens.Lens' DocumentClassifierSummary (Prelude.Maybe Prelude.Text)
documentClassifierSummary_documentClassifierName :: (Maybe Text -> f (Maybe Text))
-> DocumentClassifierSummary -> f DocumentClassifierSummary
documentClassifierSummary_documentClassifierName = (DocumentClassifierSummary -> Maybe Text)
-> (DocumentClassifierSummary
-> Maybe Text -> DocumentClassifierSummary)
-> Lens
DocumentClassifierSummary
DocumentClassifierSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierSummary' {Maybe Text
documentClassifierName :: Maybe Text
$sel:documentClassifierName:DocumentClassifierSummary' :: DocumentClassifierSummary -> Maybe Text
documentClassifierName} -> Maybe Text
documentClassifierName) (\s :: DocumentClassifierSummary
s@DocumentClassifierSummary' {} Maybe Text
a -> DocumentClassifierSummary
s {$sel:documentClassifierName:DocumentClassifierSummary' :: Maybe Text
documentClassifierName = Maybe Text
a} :: DocumentClassifierSummary)
documentClassifierSummary_latestVersionStatus :: Lens.Lens' DocumentClassifierSummary (Prelude.Maybe ModelStatus)
documentClassifierSummary_latestVersionStatus :: (Maybe ModelStatus -> f (Maybe ModelStatus))
-> DocumentClassifierSummary -> f DocumentClassifierSummary
documentClassifierSummary_latestVersionStatus = (DocumentClassifierSummary -> Maybe ModelStatus)
-> (DocumentClassifierSummary
-> Maybe ModelStatus -> DocumentClassifierSummary)
-> Lens
DocumentClassifierSummary
DocumentClassifierSummary
(Maybe ModelStatus)
(Maybe ModelStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierSummary' {Maybe ModelStatus
latestVersionStatus :: Maybe ModelStatus
$sel:latestVersionStatus:DocumentClassifierSummary' :: DocumentClassifierSummary -> Maybe ModelStatus
latestVersionStatus} -> Maybe ModelStatus
latestVersionStatus) (\s :: DocumentClassifierSummary
s@DocumentClassifierSummary' {} Maybe ModelStatus
a -> DocumentClassifierSummary
s {$sel:latestVersionStatus:DocumentClassifierSummary' :: Maybe ModelStatus
latestVersionStatus = Maybe ModelStatus
a} :: DocumentClassifierSummary)
documentClassifierSummary_numberOfVersions :: Lens.Lens' DocumentClassifierSummary (Prelude.Maybe Prelude.Int)
documentClassifierSummary_numberOfVersions :: (Maybe Int -> f (Maybe Int))
-> DocumentClassifierSummary -> f DocumentClassifierSummary
documentClassifierSummary_numberOfVersions = (DocumentClassifierSummary -> Maybe Int)
-> (DocumentClassifierSummary
-> Maybe Int -> DocumentClassifierSummary)
-> Lens
DocumentClassifierSummary
DocumentClassifierSummary
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierSummary' {Maybe Int
numberOfVersions :: Maybe Int
$sel:numberOfVersions:DocumentClassifierSummary' :: DocumentClassifierSummary -> Maybe Int
numberOfVersions} -> Maybe Int
numberOfVersions) (\s :: DocumentClassifierSummary
s@DocumentClassifierSummary' {} Maybe Int
a -> DocumentClassifierSummary
s {$sel:numberOfVersions:DocumentClassifierSummary' :: Maybe Int
numberOfVersions = Maybe Int
a} :: DocumentClassifierSummary)
documentClassifierSummary_latestVersionName :: Lens.Lens' DocumentClassifierSummary (Prelude.Maybe Prelude.Text)
documentClassifierSummary_latestVersionName :: (Maybe Text -> f (Maybe Text))
-> DocumentClassifierSummary -> f DocumentClassifierSummary
documentClassifierSummary_latestVersionName = (DocumentClassifierSummary -> Maybe Text)
-> (DocumentClassifierSummary
-> Maybe Text -> DocumentClassifierSummary)
-> Lens
DocumentClassifierSummary
DocumentClassifierSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DocumentClassifierSummary' {Maybe Text
latestVersionName :: Maybe Text
$sel:latestVersionName:DocumentClassifierSummary' :: DocumentClassifierSummary -> Maybe Text
latestVersionName} -> Maybe Text
latestVersionName) (\s :: DocumentClassifierSummary
s@DocumentClassifierSummary' {} Maybe Text
a -> DocumentClassifierSummary
s {$sel:latestVersionName:DocumentClassifierSummary' :: Maybe Text
latestVersionName = Maybe Text
a} :: DocumentClassifierSummary)
instance Core.FromJSON DocumentClassifierSummary where
parseJSON :: Value -> Parser DocumentClassifierSummary
parseJSON =
String
-> (Object -> Parser DocumentClassifierSummary)
-> Value
-> Parser DocumentClassifierSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DocumentClassifierSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> DocumentClassifierSummary
DocumentClassifierSummary'
(Maybe POSIX
-> Maybe Text
-> Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> DocumentClassifierSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> DocumentClassifierSummary)
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 Text
-> Maybe ModelStatus
-> Maybe Int
-> Maybe Text
-> DocumentClassifierSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe ModelStatus
-> Maybe Int -> Maybe Text -> DocumentClassifierSummary)
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
"DocumentClassifierName")
Parser
(Maybe ModelStatus
-> Maybe Int -> Maybe Text -> DocumentClassifierSummary)
-> Parser (Maybe ModelStatus)
-> Parser (Maybe Int -> Maybe Text -> DocumentClassifierSummary)
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 -> DocumentClassifierSummary)
-> Parser (Maybe Int)
-> Parser (Maybe Text -> DocumentClassifierSummary)
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 -> DocumentClassifierSummary)
-> Parser (Maybe Text) -> Parser DocumentClassifierSummary
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")
)
instance Prelude.Hashable DocumentClassifierSummary
instance Prelude.NFData DocumentClassifierSummary