{-# 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.Forecast.Types.PredictorSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PredictorSummary = PredictorSummary'
{
PredictorSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
PredictorSummary -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
PredictorSummary -> Maybe Text
predictorArn :: Prelude.Maybe Prelude.Text,
PredictorSummary -> Maybe Text
predictorName :: Prelude.Maybe Prelude.Text,
PredictorSummary -> Maybe Text
datasetGroupArn :: Prelude.Maybe Prelude.Text,
PredictorSummary -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
PredictorSummary -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Core.POSIX
}
deriving (PredictorSummary -> PredictorSummary -> Bool
(PredictorSummary -> PredictorSummary -> Bool)
-> (PredictorSummary -> PredictorSummary -> Bool)
-> Eq PredictorSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PredictorSummary -> PredictorSummary -> Bool
$c/= :: PredictorSummary -> PredictorSummary -> Bool
== :: PredictorSummary -> PredictorSummary -> Bool
$c== :: PredictorSummary -> PredictorSummary -> Bool
Prelude.Eq, ReadPrec [PredictorSummary]
ReadPrec PredictorSummary
Int -> ReadS PredictorSummary
ReadS [PredictorSummary]
(Int -> ReadS PredictorSummary)
-> ReadS [PredictorSummary]
-> ReadPrec PredictorSummary
-> ReadPrec [PredictorSummary]
-> Read PredictorSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PredictorSummary]
$creadListPrec :: ReadPrec [PredictorSummary]
readPrec :: ReadPrec PredictorSummary
$creadPrec :: ReadPrec PredictorSummary
readList :: ReadS [PredictorSummary]
$creadList :: ReadS [PredictorSummary]
readsPrec :: Int -> ReadS PredictorSummary
$creadsPrec :: Int -> ReadS PredictorSummary
Prelude.Read, Int -> PredictorSummary -> ShowS
[PredictorSummary] -> ShowS
PredictorSummary -> String
(Int -> PredictorSummary -> ShowS)
-> (PredictorSummary -> String)
-> ([PredictorSummary] -> ShowS)
-> Show PredictorSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PredictorSummary] -> ShowS
$cshowList :: [PredictorSummary] -> ShowS
show :: PredictorSummary -> String
$cshow :: PredictorSummary -> String
showsPrec :: Int -> PredictorSummary -> ShowS
$cshowsPrec :: Int -> PredictorSummary -> ShowS
Prelude.Show, (forall x. PredictorSummary -> Rep PredictorSummary x)
-> (forall x. Rep PredictorSummary x -> PredictorSummary)
-> Generic PredictorSummary
forall x. Rep PredictorSummary x -> PredictorSummary
forall x. PredictorSummary -> Rep PredictorSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PredictorSummary x -> PredictorSummary
$cfrom :: forall x. PredictorSummary -> Rep PredictorSummary x
Prelude.Generic)
newPredictorSummary ::
PredictorSummary
newPredictorSummary :: PredictorSummary
newPredictorSummary =
PredictorSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> PredictorSummary
PredictorSummary'
{ $sel:creationTime:PredictorSummary' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:status:PredictorSummary' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:predictorArn:PredictorSummary' :: Maybe Text
predictorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:predictorName:PredictorSummary' :: Maybe Text
predictorName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:datasetGroupArn:PredictorSummary' :: Maybe Text
datasetGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:PredictorSummary' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModificationTime:PredictorSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
predictorSummary_creationTime :: Lens.Lens' PredictorSummary (Prelude.Maybe Prelude.UTCTime)
predictorSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PredictorSummary -> f PredictorSummary
predictorSummary_creationTime = (PredictorSummary -> Maybe POSIX)
-> (PredictorSummary -> Maybe POSIX -> PredictorSummary)
-> Lens
PredictorSummary PredictorSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:PredictorSummary' :: PredictorSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: PredictorSummary
s@PredictorSummary' {} Maybe POSIX
a -> PredictorSummary
s {$sel:creationTime:PredictorSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: PredictorSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> PredictorSummary -> f PredictorSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PredictorSummary
-> f PredictorSummary
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
predictorSummary_status :: Lens.Lens' PredictorSummary (Prelude.Maybe Prelude.Text)
predictorSummary_status :: (Maybe Text -> f (Maybe Text))
-> PredictorSummary -> f PredictorSummary
predictorSummary_status = (PredictorSummary -> Maybe Text)
-> (PredictorSummary -> Maybe Text -> PredictorSummary)
-> Lens PredictorSummary PredictorSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorSummary' {Maybe Text
status :: Maybe Text
$sel:status:PredictorSummary' :: PredictorSummary -> Maybe Text
status} -> Maybe Text
status) (\s :: PredictorSummary
s@PredictorSummary' {} Maybe Text
a -> PredictorSummary
s {$sel:status:PredictorSummary' :: Maybe Text
status = Maybe Text
a} :: PredictorSummary)
predictorSummary_predictorArn :: Lens.Lens' PredictorSummary (Prelude.Maybe Prelude.Text)
predictorSummary_predictorArn :: (Maybe Text -> f (Maybe Text))
-> PredictorSummary -> f PredictorSummary
predictorSummary_predictorArn = (PredictorSummary -> Maybe Text)
-> (PredictorSummary -> Maybe Text -> PredictorSummary)
-> Lens PredictorSummary PredictorSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorSummary' {Maybe Text
predictorArn :: Maybe Text
$sel:predictorArn:PredictorSummary' :: PredictorSummary -> Maybe Text
predictorArn} -> Maybe Text
predictorArn) (\s :: PredictorSummary
s@PredictorSummary' {} Maybe Text
a -> PredictorSummary
s {$sel:predictorArn:PredictorSummary' :: Maybe Text
predictorArn = Maybe Text
a} :: PredictorSummary)
predictorSummary_predictorName :: Lens.Lens' PredictorSummary (Prelude.Maybe Prelude.Text)
predictorSummary_predictorName :: (Maybe Text -> f (Maybe Text))
-> PredictorSummary -> f PredictorSummary
predictorSummary_predictorName = (PredictorSummary -> Maybe Text)
-> (PredictorSummary -> Maybe Text -> PredictorSummary)
-> Lens PredictorSummary PredictorSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorSummary' {Maybe Text
predictorName :: Maybe Text
$sel:predictorName:PredictorSummary' :: PredictorSummary -> Maybe Text
predictorName} -> Maybe Text
predictorName) (\s :: PredictorSummary
s@PredictorSummary' {} Maybe Text
a -> PredictorSummary
s {$sel:predictorName:PredictorSummary' :: Maybe Text
predictorName = Maybe Text
a} :: PredictorSummary)
predictorSummary_datasetGroupArn :: Lens.Lens' PredictorSummary (Prelude.Maybe Prelude.Text)
predictorSummary_datasetGroupArn :: (Maybe Text -> f (Maybe Text))
-> PredictorSummary -> f PredictorSummary
predictorSummary_datasetGroupArn = (PredictorSummary -> Maybe Text)
-> (PredictorSummary -> Maybe Text -> PredictorSummary)
-> Lens PredictorSummary PredictorSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorSummary' {Maybe Text
datasetGroupArn :: Maybe Text
$sel:datasetGroupArn:PredictorSummary' :: PredictorSummary -> Maybe Text
datasetGroupArn} -> Maybe Text
datasetGroupArn) (\s :: PredictorSummary
s@PredictorSummary' {} Maybe Text
a -> PredictorSummary
s {$sel:datasetGroupArn:PredictorSummary' :: Maybe Text
datasetGroupArn = Maybe Text
a} :: PredictorSummary)
predictorSummary_message :: Lens.Lens' PredictorSummary (Prelude.Maybe Prelude.Text)
predictorSummary_message :: (Maybe Text -> f (Maybe Text))
-> PredictorSummary -> f PredictorSummary
predictorSummary_message = (PredictorSummary -> Maybe Text)
-> (PredictorSummary -> Maybe Text -> PredictorSummary)
-> Lens PredictorSummary PredictorSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorSummary' {Maybe Text
message :: Maybe Text
$sel:message:PredictorSummary' :: PredictorSummary -> Maybe Text
message} -> Maybe Text
message) (\s :: PredictorSummary
s@PredictorSummary' {} Maybe Text
a -> PredictorSummary
s {$sel:message:PredictorSummary' :: Maybe Text
message = Maybe Text
a} :: PredictorSummary)
predictorSummary_lastModificationTime :: Lens.Lens' PredictorSummary (Prelude.Maybe Prelude.UTCTime)
predictorSummary_lastModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> PredictorSummary -> f PredictorSummary
predictorSummary_lastModificationTime = (PredictorSummary -> Maybe POSIX)
-> (PredictorSummary -> Maybe POSIX -> PredictorSummary)
-> Lens
PredictorSummary PredictorSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorSummary' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:PredictorSummary' :: PredictorSummary -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: PredictorSummary
s@PredictorSummary' {} Maybe POSIX
a -> PredictorSummary
s {$sel:lastModificationTime:PredictorSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: PredictorSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> PredictorSummary -> f PredictorSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> PredictorSummary
-> f PredictorSummary
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
instance Core.FromJSON PredictorSummary where
parseJSON :: Value -> Parser PredictorSummary
parseJSON =
String
-> (Object -> Parser PredictorSummary)
-> Value
-> Parser PredictorSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PredictorSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> PredictorSummary
PredictorSummary'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> PredictorSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> PredictorSummary)
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 Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> PredictorSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> PredictorSummary)
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
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> PredictorSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe POSIX -> PredictorSummary)
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
"PredictorArn")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe POSIX -> PredictorSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> PredictorSummary)
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
"PredictorName")
Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> PredictorSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> PredictorSummary)
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
"DatasetGroupArn")
Parser (Maybe Text -> Maybe POSIX -> PredictorSummary)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> PredictorSummary)
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
"Message")
Parser (Maybe POSIX -> PredictorSummary)
-> Parser (Maybe POSIX) -> Parser PredictorSummary
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
"LastModificationTime")
)
instance Prelude.Hashable PredictorSummary
instance Prelude.NFData PredictorSummary