{-# 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.WhatIfForecastSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data WhatIfForecastSummary = WhatIfForecastSummary'
{
WhatIfForecastSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
WhatIfForecastSummary -> Maybe POSIX
lastModificationTime :: Prelude.Maybe Data.POSIX,
WhatIfForecastSummary -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
WhatIfForecastSummary -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
WhatIfForecastSummary -> Maybe Text
whatIfAnalysisArn :: Prelude.Maybe Prelude.Text,
WhatIfForecastSummary -> Maybe Text
whatIfForecastArn :: Prelude.Maybe Prelude.Text,
WhatIfForecastSummary -> Maybe Text
whatIfForecastName :: Prelude.Maybe Prelude.Text
}
deriving (WhatIfForecastSummary -> WhatIfForecastSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WhatIfForecastSummary -> WhatIfForecastSummary -> Bool
$c/= :: WhatIfForecastSummary -> WhatIfForecastSummary -> Bool
== :: WhatIfForecastSummary -> WhatIfForecastSummary -> Bool
$c== :: WhatIfForecastSummary -> WhatIfForecastSummary -> Bool
Prelude.Eq, ReadPrec [WhatIfForecastSummary]
ReadPrec WhatIfForecastSummary
Int -> ReadS WhatIfForecastSummary
ReadS [WhatIfForecastSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WhatIfForecastSummary]
$creadListPrec :: ReadPrec [WhatIfForecastSummary]
readPrec :: ReadPrec WhatIfForecastSummary
$creadPrec :: ReadPrec WhatIfForecastSummary
readList :: ReadS [WhatIfForecastSummary]
$creadList :: ReadS [WhatIfForecastSummary]
readsPrec :: Int -> ReadS WhatIfForecastSummary
$creadsPrec :: Int -> ReadS WhatIfForecastSummary
Prelude.Read, Int -> WhatIfForecastSummary -> ShowS
[WhatIfForecastSummary] -> ShowS
WhatIfForecastSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WhatIfForecastSummary] -> ShowS
$cshowList :: [WhatIfForecastSummary] -> ShowS
show :: WhatIfForecastSummary -> String
$cshow :: WhatIfForecastSummary -> String
showsPrec :: Int -> WhatIfForecastSummary -> ShowS
$cshowsPrec :: Int -> WhatIfForecastSummary -> ShowS
Prelude.Show, forall x. Rep WhatIfForecastSummary x -> WhatIfForecastSummary
forall x. WhatIfForecastSummary -> Rep WhatIfForecastSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WhatIfForecastSummary x -> WhatIfForecastSummary
$cfrom :: forall x. WhatIfForecastSummary -> Rep WhatIfForecastSummary x
Prelude.Generic)
newWhatIfForecastSummary ::
WhatIfForecastSummary
newWhatIfForecastSummary :: WhatIfForecastSummary
newWhatIfForecastSummary =
WhatIfForecastSummary'
{ $sel:creationTime:WhatIfForecastSummary' :: Maybe POSIX
creationTime =
forall a. Maybe a
Prelude.Nothing,
$sel:lastModificationTime:WhatIfForecastSummary' :: Maybe POSIX
lastModificationTime = forall a. Maybe a
Prelude.Nothing,
$sel:message:WhatIfForecastSummary' :: Maybe Text
message = forall a. Maybe a
Prelude.Nothing,
$sel:status:WhatIfForecastSummary' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing,
$sel:whatIfAnalysisArn:WhatIfForecastSummary' :: Maybe Text
whatIfAnalysisArn = forall a. Maybe a
Prelude.Nothing,
$sel:whatIfForecastArn:WhatIfForecastSummary' :: Maybe Text
whatIfForecastArn = forall a. Maybe a
Prelude.Nothing,
$sel:whatIfForecastName:WhatIfForecastSummary' :: Maybe Text
whatIfForecastName = forall a. Maybe a
Prelude.Nothing
}
whatIfForecastSummary_creationTime :: Lens.Lens' WhatIfForecastSummary (Prelude.Maybe Prelude.UTCTime)
whatIfForecastSummary_creationTime :: Lens' WhatIfForecastSummary (Maybe UTCTime)
whatIfForecastSummary_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WhatIfForecastSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: WhatIfForecastSummary
s@WhatIfForecastSummary' {} Maybe POSIX
a -> WhatIfForecastSummary
s {$sel:creationTime:WhatIfForecastSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: WhatIfForecastSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
whatIfForecastSummary_lastModificationTime :: Lens.Lens' WhatIfForecastSummary (Prelude.Maybe Prelude.UTCTime)
whatIfForecastSummary_lastModificationTime :: Lens' WhatIfForecastSummary (Maybe UTCTime)
whatIfForecastSummary_lastModificationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WhatIfForecastSummary' {Maybe POSIX
lastModificationTime :: Maybe POSIX
$sel:lastModificationTime:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe POSIX
lastModificationTime} -> Maybe POSIX
lastModificationTime) (\s :: WhatIfForecastSummary
s@WhatIfForecastSummary' {} Maybe POSIX
a -> WhatIfForecastSummary
s {$sel:lastModificationTime:WhatIfForecastSummary' :: Maybe POSIX
lastModificationTime = Maybe POSIX
a} :: WhatIfForecastSummary) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
whatIfForecastSummary_message :: Lens.Lens' WhatIfForecastSummary (Prelude.Maybe Prelude.Text)
whatIfForecastSummary_message :: Lens' WhatIfForecastSummary (Maybe Text)
whatIfForecastSummary_message = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WhatIfForecastSummary' {Maybe Text
message :: Maybe Text
$sel:message:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
message} -> Maybe Text
message) (\s :: WhatIfForecastSummary
s@WhatIfForecastSummary' {} Maybe Text
a -> WhatIfForecastSummary
s {$sel:message:WhatIfForecastSummary' :: Maybe Text
message = Maybe Text
a} :: WhatIfForecastSummary)
whatIfForecastSummary_status :: Lens.Lens' WhatIfForecastSummary (Prelude.Maybe Prelude.Text)
whatIfForecastSummary_status :: Lens' WhatIfForecastSummary (Maybe Text)
whatIfForecastSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WhatIfForecastSummary' {Maybe Text
status :: Maybe Text
$sel:status:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
status} -> Maybe Text
status) (\s :: WhatIfForecastSummary
s@WhatIfForecastSummary' {} Maybe Text
a -> WhatIfForecastSummary
s {$sel:status:WhatIfForecastSummary' :: Maybe Text
status = Maybe Text
a} :: WhatIfForecastSummary)
whatIfForecastSummary_whatIfAnalysisArn :: Lens.Lens' WhatIfForecastSummary (Prelude.Maybe Prelude.Text)
whatIfForecastSummary_whatIfAnalysisArn :: Lens' WhatIfForecastSummary (Maybe Text)
whatIfForecastSummary_whatIfAnalysisArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WhatIfForecastSummary' {Maybe Text
whatIfAnalysisArn :: Maybe Text
$sel:whatIfAnalysisArn:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
whatIfAnalysisArn} -> Maybe Text
whatIfAnalysisArn) (\s :: WhatIfForecastSummary
s@WhatIfForecastSummary' {} Maybe Text
a -> WhatIfForecastSummary
s {$sel:whatIfAnalysisArn:WhatIfForecastSummary' :: Maybe Text
whatIfAnalysisArn = Maybe Text
a} :: WhatIfForecastSummary)
whatIfForecastSummary_whatIfForecastArn :: Lens.Lens' WhatIfForecastSummary (Prelude.Maybe Prelude.Text)
whatIfForecastSummary_whatIfForecastArn :: Lens' WhatIfForecastSummary (Maybe Text)
whatIfForecastSummary_whatIfForecastArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WhatIfForecastSummary' {Maybe Text
whatIfForecastArn :: Maybe Text
$sel:whatIfForecastArn:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
whatIfForecastArn} -> Maybe Text
whatIfForecastArn) (\s :: WhatIfForecastSummary
s@WhatIfForecastSummary' {} Maybe Text
a -> WhatIfForecastSummary
s {$sel:whatIfForecastArn:WhatIfForecastSummary' :: Maybe Text
whatIfForecastArn = Maybe Text
a} :: WhatIfForecastSummary)
whatIfForecastSummary_whatIfForecastName :: Lens.Lens' WhatIfForecastSummary (Prelude.Maybe Prelude.Text)
whatIfForecastSummary_whatIfForecastName :: Lens' WhatIfForecastSummary (Maybe Text)
whatIfForecastSummary_whatIfForecastName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WhatIfForecastSummary' {Maybe Text
whatIfForecastName :: Maybe Text
$sel:whatIfForecastName:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
whatIfForecastName} -> Maybe Text
whatIfForecastName) (\s :: WhatIfForecastSummary
s@WhatIfForecastSummary' {} Maybe Text
a -> WhatIfForecastSummary
s {$sel:whatIfForecastName:WhatIfForecastSummary' :: Maybe Text
whatIfForecastName = Maybe Text
a} :: WhatIfForecastSummary)
instance Data.FromJSON WhatIfForecastSummary where
parseJSON :: Value -> Parser WhatIfForecastSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WhatIfForecastSummary"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> WhatIfForecastSummary
WhatIfForecastSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModificationTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Message")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WhatIfAnalysisArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WhatIfForecastArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"WhatIfForecastName")
)
instance Prelude.Hashable WhatIfForecastSummary where
hashWithSalt :: Int -> WhatIfForecastSummary -> Int
hashWithSalt Int
_salt WhatIfForecastSummary' {Maybe Text
Maybe POSIX
whatIfForecastName :: Maybe Text
whatIfForecastArn :: Maybe Text
whatIfAnalysisArn :: Maybe Text
status :: Maybe Text
message :: Maybe Text
lastModificationTime :: Maybe POSIX
creationTime :: Maybe POSIX
$sel:whatIfForecastName:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:whatIfForecastArn:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:whatIfAnalysisArn:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:status:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:message:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:lastModificationTime:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe POSIX
$sel:creationTime:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModificationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
message
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
whatIfAnalysisArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
whatIfForecastArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
whatIfForecastName
instance Prelude.NFData WhatIfForecastSummary where
rnf :: WhatIfForecastSummary -> ()
rnf WhatIfForecastSummary' {Maybe Text
Maybe POSIX
whatIfForecastName :: Maybe Text
whatIfForecastArn :: Maybe Text
whatIfAnalysisArn :: Maybe Text
status :: Maybe Text
message :: Maybe Text
lastModificationTime :: Maybe POSIX
creationTime :: Maybe POSIX
$sel:whatIfForecastName:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:whatIfForecastArn:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:whatIfAnalysisArn:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:status:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:message:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe Text
$sel:lastModificationTime:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe POSIX
$sel:creationTime:WhatIfForecastSummary' :: WhatIfForecastSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModificationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
message
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
whatIfAnalysisArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
whatIfForecastArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
whatIfForecastName