{-# 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.PredictorExecutionDetails where
import qualified Amazonka.Core as Core
import Amazonka.Forecast.Types.PredictorExecution
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PredictorExecutionDetails = PredictorExecutionDetails'
{
PredictorExecutionDetails -> Maybe (NonEmpty PredictorExecution)
predictorExecutions :: Prelude.Maybe (Prelude.NonEmpty PredictorExecution)
}
deriving (PredictorExecutionDetails -> PredictorExecutionDetails -> Bool
(PredictorExecutionDetails -> PredictorExecutionDetails -> Bool)
-> (PredictorExecutionDetails -> PredictorExecutionDetails -> Bool)
-> Eq PredictorExecutionDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PredictorExecutionDetails -> PredictorExecutionDetails -> Bool
$c/= :: PredictorExecutionDetails -> PredictorExecutionDetails -> Bool
== :: PredictorExecutionDetails -> PredictorExecutionDetails -> Bool
$c== :: PredictorExecutionDetails -> PredictorExecutionDetails -> Bool
Prelude.Eq, ReadPrec [PredictorExecutionDetails]
ReadPrec PredictorExecutionDetails
Int -> ReadS PredictorExecutionDetails
ReadS [PredictorExecutionDetails]
(Int -> ReadS PredictorExecutionDetails)
-> ReadS [PredictorExecutionDetails]
-> ReadPrec PredictorExecutionDetails
-> ReadPrec [PredictorExecutionDetails]
-> Read PredictorExecutionDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PredictorExecutionDetails]
$creadListPrec :: ReadPrec [PredictorExecutionDetails]
readPrec :: ReadPrec PredictorExecutionDetails
$creadPrec :: ReadPrec PredictorExecutionDetails
readList :: ReadS [PredictorExecutionDetails]
$creadList :: ReadS [PredictorExecutionDetails]
readsPrec :: Int -> ReadS PredictorExecutionDetails
$creadsPrec :: Int -> ReadS PredictorExecutionDetails
Prelude.Read, Int -> PredictorExecutionDetails -> ShowS
[PredictorExecutionDetails] -> ShowS
PredictorExecutionDetails -> String
(Int -> PredictorExecutionDetails -> ShowS)
-> (PredictorExecutionDetails -> String)
-> ([PredictorExecutionDetails] -> ShowS)
-> Show PredictorExecutionDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PredictorExecutionDetails] -> ShowS
$cshowList :: [PredictorExecutionDetails] -> ShowS
show :: PredictorExecutionDetails -> String
$cshow :: PredictorExecutionDetails -> String
showsPrec :: Int -> PredictorExecutionDetails -> ShowS
$cshowsPrec :: Int -> PredictorExecutionDetails -> ShowS
Prelude.Show, (forall x.
PredictorExecutionDetails -> Rep PredictorExecutionDetails x)
-> (forall x.
Rep PredictorExecutionDetails x -> PredictorExecutionDetails)
-> Generic PredictorExecutionDetails
forall x.
Rep PredictorExecutionDetails x -> PredictorExecutionDetails
forall x.
PredictorExecutionDetails -> Rep PredictorExecutionDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PredictorExecutionDetails x -> PredictorExecutionDetails
$cfrom :: forall x.
PredictorExecutionDetails -> Rep PredictorExecutionDetails x
Prelude.Generic)
newPredictorExecutionDetails ::
PredictorExecutionDetails
newPredictorExecutionDetails :: PredictorExecutionDetails
newPredictorExecutionDetails =
PredictorExecutionDetails' :: Maybe (NonEmpty PredictorExecution) -> PredictorExecutionDetails
PredictorExecutionDetails'
{ $sel:predictorExecutions:PredictorExecutionDetails' :: Maybe (NonEmpty PredictorExecution)
predictorExecutions =
Maybe (NonEmpty PredictorExecution)
forall a. Maybe a
Prelude.Nothing
}
predictorExecutionDetails_predictorExecutions :: Lens.Lens' PredictorExecutionDetails (Prelude.Maybe (Prelude.NonEmpty PredictorExecution))
predictorExecutionDetails_predictorExecutions :: (Maybe (NonEmpty PredictorExecution)
-> f (Maybe (NonEmpty PredictorExecution)))
-> PredictorExecutionDetails -> f PredictorExecutionDetails
predictorExecutionDetails_predictorExecutions = (PredictorExecutionDetails -> Maybe (NonEmpty PredictorExecution))
-> (PredictorExecutionDetails
-> Maybe (NonEmpty PredictorExecution)
-> PredictorExecutionDetails)
-> Lens
PredictorExecutionDetails
PredictorExecutionDetails
(Maybe (NonEmpty PredictorExecution))
(Maybe (NonEmpty PredictorExecution))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PredictorExecutionDetails' {Maybe (NonEmpty PredictorExecution)
predictorExecutions :: Maybe (NonEmpty PredictorExecution)
$sel:predictorExecutions:PredictorExecutionDetails' :: PredictorExecutionDetails -> Maybe (NonEmpty PredictorExecution)
predictorExecutions} -> Maybe (NonEmpty PredictorExecution)
predictorExecutions) (\s :: PredictorExecutionDetails
s@PredictorExecutionDetails' {} Maybe (NonEmpty PredictorExecution)
a -> PredictorExecutionDetails
s {$sel:predictorExecutions:PredictorExecutionDetails' :: Maybe (NonEmpty PredictorExecution)
predictorExecutions = Maybe (NonEmpty PredictorExecution)
a} :: PredictorExecutionDetails) ((Maybe (NonEmpty PredictorExecution)
-> f (Maybe (NonEmpty PredictorExecution)))
-> PredictorExecutionDetails -> f PredictorExecutionDetails)
-> ((Maybe (NonEmpty PredictorExecution)
-> f (Maybe (NonEmpty PredictorExecution)))
-> Maybe (NonEmpty PredictorExecution)
-> f (Maybe (NonEmpty PredictorExecution)))
-> (Maybe (NonEmpty PredictorExecution)
-> f (Maybe (NonEmpty PredictorExecution)))
-> PredictorExecutionDetails
-> f PredictorExecutionDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty PredictorExecution)
(NonEmpty PredictorExecution)
(NonEmpty PredictorExecution)
(NonEmpty PredictorExecution)
-> Iso
(Maybe (NonEmpty PredictorExecution))
(Maybe (NonEmpty PredictorExecution))
(Maybe (NonEmpty PredictorExecution))
(Maybe (NonEmpty PredictorExecution))
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
(NonEmpty PredictorExecution)
(NonEmpty PredictorExecution)
(NonEmpty PredictorExecution)
(NonEmpty PredictorExecution)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON PredictorExecutionDetails where
parseJSON :: Value -> Parser PredictorExecutionDetails
parseJSON =
String
-> (Object -> Parser PredictorExecutionDetails)
-> Value
-> Parser PredictorExecutionDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PredictorExecutionDetails"
( \Object
x ->
Maybe (NonEmpty PredictorExecution) -> PredictorExecutionDetails
PredictorExecutionDetails'
(Maybe (NonEmpty PredictorExecution) -> PredictorExecutionDetails)
-> Parser (Maybe (NonEmpty PredictorExecution))
-> Parser PredictorExecutionDetails
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (NonEmpty PredictorExecution))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PredictorExecutions")
)
instance Prelude.Hashable PredictorExecutionDetails
instance Prelude.NFData PredictorExecutionDetails