{-# 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.ForecastSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ForecastSummary = ForecastSummary'
{
ForecastSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
ForecastSummary -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
ForecastSummary -> Maybe Text
predictorArn :: Prelude.Maybe Prelude.Text,
ForecastSummary -> Maybe Text
forecastArn :: Prelude.Maybe Prelude.Text,
ForecastSummary -> Maybe Text
forecastName :: Prelude.Maybe Prelude.Text,
ForecastSummary -> Maybe Text
datasetGroupArn :: Prelude.Maybe Prelude.Text,
ForecastSummary -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
ForecastSummary -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Core.POSIX
}
deriving (ForecastSummary -> ForecastSummary -> Bool
(ForecastSummary -> ForecastSummary -> Bool)
-> (ForecastSummary -> ForecastSummary -> Bool)
-> Eq ForecastSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ForecastSummary -> ForecastSummary -> Bool
$c/= :: ForecastSummary -> ForecastSummary -> Bool
== :: ForecastSummary -> ForecastSummary -> Bool
$c== :: ForecastSummary -> ForecastSummary -> Bool
Prelude.Eq, ReadPrec [ForecastSummary]
ReadPrec ForecastSummary
Int -> ReadS ForecastSummary
ReadS [ForecastSummary]
(Int -> ReadS ForecastSummary)
-> ReadS [ForecastSummary]
-> ReadPrec ForecastSummary
-> ReadPrec [ForecastSummary]
-> Read ForecastSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ForecastSummary]
$creadListPrec :: ReadPrec [ForecastSummary]
readPrec :: ReadPrec ForecastSummary
$creadPrec :: ReadPrec ForecastSummary
readList :: ReadS [ForecastSummary]
$creadList :: ReadS [ForecastSummary]
readsPrec :: Int -> ReadS ForecastSummary
$creadsPrec :: Int -> ReadS ForecastSummary
Prelude.Read, Int -> ForecastSummary -> ShowS
[ForecastSummary] -> ShowS
ForecastSummary -> String
(Int -> ForecastSummary -> ShowS)
-> (ForecastSummary -> String)
-> ([ForecastSummary] -> ShowS)
-> Show ForecastSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ForecastSummary] -> ShowS
$cshowList :: [ForecastSummary] -> ShowS
show :: ForecastSummary -> String
$cshow :: ForecastSummary -> String
showsPrec :: Int -> ForecastSummary -> ShowS
$cshowsPrec :: Int -> ForecastSummary -> ShowS
Prelude.Show, (forall x. ForecastSummary -> Rep ForecastSummary x)
-> (forall x. Rep ForecastSummary x -> ForecastSummary)
-> Generic ForecastSummary
forall x. Rep ForecastSummary x -> ForecastSummary
forall x. ForecastSummary -> Rep ForecastSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ForecastSummary x -> ForecastSummary
$cfrom :: forall x. ForecastSummary -> Rep ForecastSummary x
Prelude.Generic)
newForecastSummary ::
ForecastSummary
newForecastSummary :: ForecastSummary
newForecastSummary =
ForecastSummary' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ForecastSummary
ForecastSummary'
{ $sel:creationTime:ForecastSummary' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:status:ForecastSummary' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:predictorArn:ForecastSummary' :: Maybe Text
predictorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:forecastArn:ForecastSummary' :: Maybe Text
forecastArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:forecastName:ForecastSummary' :: Maybe Text
forecastName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:datasetGroupArn:ForecastSummary' :: Maybe Text
datasetGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:message:ForecastSummary' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastModificationTime:ForecastSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
forecastSummary_creationTime :: Lens.Lens' ForecastSummary (Prelude.Maybe Prelude.UTCTime)
forecastSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ForecastSummary -> f ForecastSummary
forecastSummary_creationTime = (ForecastSummary -> Maybe POSIX)
-> (ForecastSummary -> Maybe POSIX -> ForecastSummary)
-> Lens ForecastSummary ForecastSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ForecastSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:ForecastSummary' :: ForecastSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: ForecastSummary
s@ForecastSummary' {} Maybe POSIX
a -> ForecastSummary
s {$sel:creationTime:ForecastSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: ForecastSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ForecastSummary -> f ForecastSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ForecastSummary
-> f ForecastSummary
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
forecastSummary_status :: Lens.Lens' ForecastSummary (Prelude.Maybe Prelude.Text)
forecastSummary_status :: (Maybe Text -> f (Maybe Text))
-> ForecastSummary -> f ForecastSummary
forecastSummary_status = (ForecastSummary -> Maybe Text)
-> (ForecastSummary -> Maybe Text -> ForecastSummary)
-> Lens ForecastSummary ForecastSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ForecastSummary' {Maybe Text
status :: Maybe Text
$sel:status:ForecastSummary' :: ForecastSummary -> Maybe Text
status} -> Maybe Text
status) (\s :: ForecastSummary
s@ForecastSummary' {} Maybe Text
a -> ForecastSummary
s {$sel:status:ForecastSummary' :: Maybe Text
status = Maybe Text
a} :: ForecastSummary)
forecastSummary_predictorArn :: Lens.Lens' ForecastSummary (Prelude.Maybe Prelude.Text)
forecastSummary_predictorArn :: (Maybe Text -> f (Maybe Text))
-> ForecastSummary -> f ForecastSummary
forecastSummary_predictorArn = (ForecastSummary -> Maybe Text)
-> (ForecastSummary -> Maybe Text -> ForecastSummary)
-> Lens ForecastSummary ForecastSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ForecastSummary' {Maybe Text
predictorArn :: Maybe Text
$sel:predictorArn:ForecastSummary' :: ForecastSummary -> Maybe Text
predictorArn} -> Maybe Text
predictorArn) (\s :: ForecastSummary
s@ForecastSummary' {} Maybe Text
a -> ForecastSummary
s {$sel:predictorArn:ForecastSummary' :: Maybe Text
predictorArn = Maybe Text
a} :: ForecastSummary)
forecastSummary_forecastArn :: Lens.Lens' ForecastSummary (Prelude.Maybe Prelude.Text)
forecastSummary_forecastArn :: (Maybe Text -> f (Maybe Text))
-> ForecastSummary -> f ForecastSummary
forecastSummary_forecastArn = (ForecastSummary -> Maybe Text)
-> (ForecastSummary -> Maybe Text -> ForecastSummary)
-> Lens ForecastSummary ForecastSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ForecastSummary' {Maybe Text
forecastArn :: Maybe Text
$sel:forecastArn:ForecastSummary' :: ForecastSummary -> Maybe Text
forecastArn} -> Maybe Text
forecastArn) (\s :: ForecastSummary
s@ForecastSummary' {} Maybe Text
a -> ForecastSummary
s {$sel:forecastArn:ForecastSummary' :: Maybe Text
forecastArn = Maybe Text
a} :: ForecastSummary)
forecastSummary_forecastName :: Lens.Lens' ForecastSummary (Prelude.Maybe Prelude.Text)
forecastSummary_forecastName :: (Maybe Text -> f (Maybe Text))
-> ForecastSummary -> f ForecastSummary
forecastSummary_forecastName = (ForecastSummary -> Maybe Text)
-> (ForecastSummary -> Maybe Text -> ForecastSummary)
-> Lens ForecastSummary ForecastSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ForecastSummary' {Maybe Text
forecastName :: Maybe Text
$sel:forecastName:ForecastSummary' :: ForecastSummary -> Maybe Text
forecastName} -> Maybe Text
forecastName) (\s :: ForecastSummary
s@ForecastSummary' {} Maybe Text
a -> ForecastSummary
s {$sel:forecastName:ForecastSummary' :: Maybe Text
forecastName = Maybe Text
a} :: ForecastSummary)
forecastSummary_datasetGroupArn :: Lens.Lens' ForecastSummary (Prelude.Maybe Prelude.Text)
forecastSummary_datasetGroupArn :: (Maybe Text -> f (Maybe Text))
-> ForecastSummary -> f ForecastSummary
forecastSummary_datasetGroupArn = (ForecastSummary -> Maybe Text)
-> (ForecastSummary -> Maybe Text -> ForecastSummary)
-> Lens ForecastSummary ForecastSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ForecastSummary' {Maybe Text
datasetGroupArn :: Maybe Text
$sel:datasetGroupArn:ForecastSummary' :: ForecastSummary -> Maybe Text
datasetGroupArn} -> Maybe Text
datasetGroupArn) (\s :: ForecastSummary
s@ForecastSummary' {} Maybe Text
a -> ForecastSummary
s {$sel:datasetGroupArn:ForecastSummary' :: Maybe Text
datasetGroupArn = Maybe Text
a} :: ForecastSummary)
forecastSummary_message :: Lens.Lens' ForecastSummary (Prelude.Maybe Prelude.Text)
forecastSummary_message :: (Maybe Text -> f (Maybe Text))
-> ForecastSummary -> f ForecastSummary
forecastSummary_message = (ForecastSummary -> Maybe Text)
-> (ForecastSummary -> Maybe Text -> ForecastSummary)
-> Lens ForecastSummary ForecastSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ForecastSummary' {Maybe Text
message :: Maybe Text
$sel:message:ForecastSummary' :: ForecastSummary -> Maybe Text
message} -> Maybe Text
message) (\s :: ForecastSummary
s@ForecastSummary' {} Maybe Text
a -> ForecastSummary
s {$sel:message:ForecastSummary' :: Maybe Text
message = Maybe Text
a} :: ForecastSummary)
forecastSummary_lastModificationTime :: Lens.Lens' ForecastSummary (Prelude.Maybe Prelude.UTCTime)
forecastSummary_lastModificationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ForecastSummary -> f ForecastSummary
forecastSummary_lastModificationTime = (ForecastSummary -> Maybe POSIX)
-> (ForecastSummary -> Maybe POSIX -> ForecastSummary)
-> Lens ForecastSummary ForecastSummary (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ForecastSummary' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:ForecastSummary' :: ForecastSummary -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: ForecastSummary
s@ForecastSummary' {} Maybe POSIX
a -> ForecastSummary
s {$sel:lastModificationTime:ForecastSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: ForecastSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> ForecastSummary -> f ForecastSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ForecastSummary
-> f ForecastSummary
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 ForecastSummary where
parseJSON :: Value -> Parser ForecastSummary
parseJSON =
String
-> (Object -> Parser ForecastSummary)
-> Value
-> Parser ForecastSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ForecastSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ForecastSummary
ForecastSummary'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ForecastSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ForecastSummary)
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 Text
-> Maybe POSIX
-> ForecastSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ForecastSummary)
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 Text
-> Maybe POSIX
-> ForecastSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> ForecastSummary)
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 Text
-> Maybe POSIX
-> ForecastSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe POSIX -> ForecastSummary)
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
"ForecastArn")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe POSIX -> ForecastSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe POSIX -> ForecastSummary)
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
"ForecastName")
Parser (Maybe Text -> Maybe Text -> Maybe POSIX -> ForecastSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> ForecastSummary)
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 -> ForecastSummary)
-> Parser (Maybe Text) -> Parser (Maybe POSIX -> ForecastSummary)
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 -> ForecastSummary)
-> Parser (Maybe POSIX) -> Parser ForecastSummary
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 ForecastSummary
instance Prelude.NFData ForecastSummary