{-# 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.LookoutEquipment.Types.ModelSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutEquipment.Types.ModelStatus
import qualified Amazonka.Prelude as Prelude
data ModelSummary = ModelSummary'
{
ModelSummary -> Maybe ModelStatus
status :: Prelude.Maybe ModelStatus,
ModelSummary -> Maybe Text
datasetArn :: Prelude.Maybe Prelude.Text,
ModelSummary -> Maybe Text
modelArn :: Prelude.Maybe Prelude.Text,
ModelSummary -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
ModelSummary -> Maybe Text
modelName :: Prelude.Maybe Prelude.Text,
ModelSummary -> Maybe Text
datasetName :: Prelude.Maybe Prelude.Text
}
deriving (ModelSummary -> ModelSummary -> Bool
(ModelSummary -> ModelSummary -> Bool)
-> (ModelSummary -> ModelSummary -> Bool) -> Eq ModelSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelSummary -> ModelSummary -> Bool
$c/= :: ModelSummary -> ModelSummary -> Bool
== :: ModelSummary -> ModelSummary -> Bool
$c== :: ModelSummary -> ModelSummary -> Bool
Prelude.Eq, ReadPrec [ModelSummary]
ReadPrec ModelSummary
Int -> ReadS ModelSummary
ReadS [ModelSummary]
(Int -> ReadS ModelSummary)
-> ReadS [ModelSummary]
-> ReadPrec ModelSummary
-> ReadPrec [ModelSummary]
-> Read ModelSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelSummary]
$creadListPrec :: ReadPrec [ModelSummary]
readPrec :: ReadPrec ModelSummary
$creadPrec :: ReadPrec ModelSummary
readList :: ReadS [ModelSummary]
$creadList :: ReadS [ModelSummary]
readsPrec :: Int -> ReadS ModelSummary
$creadsPrec :: Int -> ReadS ModelSummary
Prelude.Read, Int -> ModelSummary -> ShowS
[ModelSummary] -> ShowS
ModelSummary -> String
(Int -> ModelSummary -> ShowS)
-> (ModelSummary -> String)
-> ([ModelSummary] -> ShowS)
-> Show ModelSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelSummary] -> ShowS
$cshowList :: [ModelSummary] -> ShowS
show :: ModelSummary -> String
$cshow :: ModelSummary -> String
showsPrec :: Int -> ModelSummary -> ShowS
$cshowsPrec :: Int -> ModelSummary -> ShowS
Prelude.Show, (forall x. ModelSummary -> Rep ModelSummary x)
-> (forall x. Rep ModelSummary x -> ModelSummary)
-> Generic ModelSummary
forall x. Rep ModelSummary x -> ModelSummary
forall x. ModelSummary -> Rep ModelSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelSummary x -> ModelSummary
$cfrom :: forall x. ModelSummary -> Rep ModelSummary x
Prelude.Generic)
newModelSummary ::
ModelSummary
newModelSummary :: ModelSummary
newModelSummary =
ModelSummary' :: Maybe ModelStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ModelSummary
ModelSummary'
{ $sel:status:ModelSummary' :: Maybe ModelStatus
status = Maybe ModelStatus
forall a. Maybe a
Prelude.Nothing,
$sel:datasetArn:ModelSummary' :: Maybe Text
datasetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:modelArn:ModelSummary' :: Maybe Text
modelArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:ModelSummary' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:modelName:ModelSummary' :: Maybe Text
modelName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:datasetName:ModelSummary' :: Maybe Text
datasetName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
modelSummary_status :: Lens.Lens' ModelSummary (Prelude.Maybe ModelStatus)
modelSummary_status :: (Maybe ModelStatus -> f (Maybe ModelStatus))
-> ModelSummary -> f ModelSummary
modelSummary_status = (ModelSummary -> Maybe ModelStatus)
-> (ModelSummary -> Maybe ModelStatus -> ModelSummary)
-> Lens
ModelSummary ModelSummary (Maybe ModelStatus) (Maybe ModelStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelSummary' {Maybe ModelStatus
status :: Maybe ModelStatus
$sel:status:ModelSummary' :: ModelSummary -> Maybe ModelStatus
status} -> Maybe ModelStatus
status) (\s :: ModelSummary
s@ModelSummary' {} Maybe ModelStatus
a -> ModelSummary
s {$sel:status:ModelSummary' :: Maybe ModelStatus
status = Maybe ModelStatus
a} :: ModelSummary)
modelSummary_datasetArn :: Lens.Lens' ModelSummary (Prelude.Maybe Prelude.Text)
modelSummary_datasetArn :: (Maybe Text -> f (Maybe Text)) -> ModelSummary -> f ModelSummary
modelSummary_datasetArn = (ModelSummary -> Maybe Text)
-> (ModelSummary -> Maybe Text -> ModelSummary)
-> Lens ModelSummary ModelSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelSummary' {Maybe Text
datasetArn :: Maybe Text
$sel:datasetArn:ModelSummary' :: ModelSummary -> Maybe Text
datasetArn} -> Maybe Text
datasetArn) (\s :: ModelSummary
s@ModelSummary' {} Maybe Text
a -> ModelSummary
s {$sel:datasetArn:ModelSummary' :: Maybe Text
datasetArn = Maybe Text
a} :: ModelSummary)
modelSummary_modelArn :: Lens.Lens' ModelSummary (Prelude.Maybe Prelude.Text)
modelSummary_modelArn :: (Maybe Text -> f (Maybe Text)) -> ModelSummary -> f ModelSummary
modelSummary_modelArn = (ModelSummary -> Maybe Text)
-> (ModelSummary -> Maybe Text -> ModelSummary)
-> Lens ModelSummary ModelSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelSummary' {Maybe Text
modelArn :: Maybe Text
$sel:modelArn:ModelSummary' :: ModelSummary -> Maybe Text
modelArn} -> Maybe Text
modelArn) (\s :: ModelSummary
s@ModelSummary' {} Maybe Text
a -> ModelSummary
s {$sel:modelArn:ModelSummary' :: Maybe Text
modelArn = Maybe Text
a} :: ModelSummary)
modelSummary_createdAt :: Lens.Lens' ModelSummary (Prelude.Maybe Prelude.UTCTime)
modelSummary_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ModelSummary -> f ModelSummary
modelSummary_createdAt = (ModelSummary -> Maybe POSIX)
-> (ModelSummary -> Maybe POSIX -> ModelSummary)
-> Lens ModelSummary ModelSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelSummary' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:ModelSummary' :: ModelSummary -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: ModelSummary
s@ModelSummary' {} Maybe POSIX
a -> ModelSummary
s {$sel:createdAt:ModelSummary' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: ModelSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ModelSummary -> f ModelSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ModelSummary
-> f ModelSummary
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
modelSummary_modelName :: Lens.Lens' ModelSummary (Prelude.Maybe Prelude.Text)
modelSummary_modelName :: (Maybe Text -> f (Maybe Text)) -> ModelSummary -> f ModelSummary
modelSummary_modelName = (ModelSummary -> Maybe Text)
-> (ModelSummary -> Maybe Text -> ModelSummary)
-> Lens ModelSummary ModelSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelSummary' {Maybe Text
modelName :: Maybe Text
$sel:modelName:ModelSummary' :: ModelSummary -> Maybe Text
modelName} -> Maybe Text
modelName) (\s :: ModelSummary
s@ModelSummary' {} Maybe Text
a -> ModelSummary
s {$sel:modelName:ModelSummary' :: Maybe Text
modelName = Maybe Text
a} :: ModelSummary)
modelSummary_datasetName :: Lens.Lens' ModelSummary (Prelude.Maybe Prelude.Text)
modelSummary_datasetName :: (Maybe Text -> f (Maybe Text)) -> ModelSummary -> f ModelSummary
modelSummary_datasetName = (ModelSummary -> Maybe Text)
-> (ModelSummary -> Maybe Text -> ModelSummary)
-> Lens ModelSummary ModelSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelSummary' {Maybe Text
datasetName :: Maybe Text
$sel:datasetName:ModelSummary' :: ModelSummary -> Maybe Text
datasetName} -> Maybe Text
datasetName) (\s :: ModelSummary
s@ModelSummary' {} Maybe Text
a -> ModelSummary
s {$sel:datasetName:ModelSummary' :: Maybe Text
datasetName = Maybe Text
a} :: ModelSummary)
instance Core.FromJSON ModelSummary where
parseJSON :: Value -> Parser ModelSummary
parseJSON =
String
-> (Object -> Parser ModelSummary) -> Value -> Parser ModelSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ModelSummary"
( \Object
x ->
Maybe ModelStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ModelSummary
ModelSummary'
(Maybe ModelStatus
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ModelSummary)
-> Parser (Maybe ModelStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ModelSummary)
forall (f :: * -> *) a b. Functor 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
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> ModelSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Maybe Text -> ModelSummary)
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
"DatasetArn")
Parser
(Maybe Text
-> Maybe POSIX -> Maybe Text -> Maybe Text -> ModelSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> ModelSummary)
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
"ModelArn")
Parser (Maybe POSIX -> Maybe Text -> Maybe Text -> ModelSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> Maybe Text -> ModelSummary)
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
"CreatedAt")
Parser (Maybe Text -> Maybe Text -> ModelSummary)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ModelSummary)
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
"ModelName")
Parser (Maybe Text -> ModelSummary)
-> Parser (Maybe Text) -> Parser ModelSummary
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
"DatasetName")
)
instance Prelude.Hashable ModelSummary
instance Prelude.NFData ModelSummary