{-# 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.Personalize.Types.SolutionSummary 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 SolutionSummary = SolutionSummary'
{
SolutionSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
SolutionSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
SolutionSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
SolutionSummary -> Maybe Text
recipeArn :: Prelude.Maybe Prelude.Text,
SolutionSummary -> Maybe Text
solutionArn :: Prelude.Maybe Prelude.Text,
SolutionSummary -> Maybe Text
status :: Prelude.Maybe Prelude.Text
}
deriving (SolutionSummary -> SolutionSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SolutionSummary -> SolutionSummary -> Bool
$c/= :: SolutionSummary -> SolutionSummary -> Bool
== :: SolutionSummary -> SolutionSummary -> Bool
$c== :: SolutionSummary -> SolutionSummary -> Bool
Prelude.Eq, ReadPrec [SolutionSummary]
ReadPrec SolutionSummary
Int -> ReadS SolutionSummary
ReadS [SolutionSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SolutionSummary]
$creadListPrec :: ReadPrec [SolutionSummary]
readPrec :: ReadPrec SolutionSummary
$creadPrec :: ReadPrec SolutionSummary
readList :: ReadS [SolutionSummary]
$creadList :: ReadS [SolutionSummary]
readsPrec :: Int -> ReadS SolutionSummary
$creadsPrec :: Int -> ReadS SolutionSummary
Prelude.Read, Int -> SolutionSummary -> ShowS
[SolutionSummary] -> ShowS
SolutionSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SolutionSummary] -> ShowS
$cshowList :: [SolutionSummary] -> ShowS
show :: SolutionSummary -> String
$cshow :: SolutionSummary -> String
showsPrec :: Int -> SolutionSummary -> ShowS
$cshowsPrec :: Int -> SolutionSummary -> ShowS
Prelude.Show, forall x. Rep SolutionSummary x -> SolutionSummary
forall x. SolutionSummary -> Rep SolutionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SolutionSummary x -> SolutionSummary
$cfrom :: forall x. SolutionSummary -> Rep SolutionSummary x
Prelude.Generic)
newSolutionSummary ::
SolutionSummary
newSolutionSummary :: SolutionSummary
newSolutionSummary =
SolutionSummary'
{ $sel:creationDateTime:SolutionSummary' :: Maybe POSIX
creationDateTime =
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:SolutionSummary' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:name:SolutionSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:recipeArn:SolutionSummary' :: Maybe Text
recipeArn = forall a. Maybe a
Prelude.Nothing,
$sel:solutionArn:SolutionSummary' :: Maybe Text
solutionArn = forall a. Maybe a
Prelude.Nothing,
$sel:status:SolutionSummary' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing
}
solutionSummary_creationDateTime :: Lens.Lens' SolutionSummary (Prelude.Maybe Prelude.UTCTime)
solutionSummary_creationDateTime :: Lens' SolutionSummary (Maybe UTCTime)
solutionSummary_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:SolutionSummary' :: SolutionSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: SolutionSummary
s@SolutionSummary' {} Maybe POSIX
a -> SolutionSummary
s {$sel:creationDateTime:SolutionSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: SolutionSummary) 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
solutionSummary_lastUpdatedDateTime :: Lens.Lens' SolutionSummary (Prelude.Maybe Prelude.UTCTime)
solutionSummary_lastUpdatedDateTime :: Lens' SolutionSummary (Maybe UTCTime)
solutionSummary_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:SolutionSummary' :: SolutionSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: SolutionSummary
s@SolutionSummary' {} Maybe POSIX
a -> SolutionSummary
s {$sel:lastUpdatedDateTime:SolutionSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: SolutionSummary) 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
solutionSummary_name :: Lens.Lens' SolutionSummary (Prelude.Maybe Prelude.Text)
solutionSummary_name :: Lens' SolutionSummary (Maybe Text)
solutionSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionSummary' {Maybe Text
name :: Maybe Text
$sel:name:SolutionSummary' :: SolutionSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: SolutionSummary
s@SolutionSummary' {} Maybe Text
a -> SolutionSummary
s {$sel:name:SolutionSummary' :: Maybe Text
name = Maybe Text
a} :: SolutionSummary)
solutionSummary_recipeArn :: Lens.Lens' SolutionSummary (Prelude.Maybe Prelude.Text)
solutionSummary_recipeArn :: Lens' SolutionSummary (Maybe Text)
solutionSummary_recipeArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionSummary' {Maybe Text
recipeArn :: Maybe Text
$sel:recipeArn:SolutionSummary' :: SolutionSummary -> Maybe Text
recipeArn} -> Maybe Text
recipeArn) (\s :: SolutionSummary
s@SolutionSummary' {} Maybe Text
a -> SolutionSummary
s {$sel:recipeArn:SolutionSummary' :: Maybe Text
recipeArn = Maybe Text
a} :: SolutionSummary)
solutionSummary_solutionArn :: Lens.Lens' SolutionSummary (Prelude.Maybe Prelude.Text)
solutionSummary_solutionArn :: Lens' SolutionSummary (Maybe Text)
solutionSummary_solutionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionSummary' {Maybe Text
solutionArn :: Maybe Text
$sel:solutionArn:SolutionSummary' :: SolutionSummary -> Maybe Text
solutionArn} -> Maybe Text
solutionArn) (\s :: SolutionSummary
s@SolutionSummary' {} Maybe Text
a -> SolutionSummary
s {$sel:solutionArn:SolutionSummary' :: Maybe Text
solutionArn = Maybe Text
a} :: SolutionSummary)
solutionSummary_status :: Lens.Lens' SolutionSummary (Prelude.Maybe Prelude.Text)
solutionSummary_status :: Lens' SolutionSummary (Maybe Text)
solutionSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SolutionSummary' {Maybe Text
status :: Maybe Text
$sel:status:SolutionSummary' :: SolutionSummary -> Maybe Text
status} -> Maybe Text
status) (\s :: SolutionSummary
s@SolutionSummary' {} Maybe Text
a -> SolutionSummary
s {$sel:status:SolutionSummary' :: Maybe Text
status = Maybe Text
a} :: SolutionSummary)
instance Data.FromJSON SolutionSummary where
parseJSON :: Value -> Parser SolutionSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SolutionSummary"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SolutionSummary
SolutionSummary'
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
"creationDateTime")
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
"lastUpdatedDateTime")
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
"name")
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
"recipeArn")
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
"solutionArn")
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")
)
instance Prelude.Hashable SolutionSummary where
hashWithSalt :: Int -> SolutionSummary -> Int
hashWithSalt Int
_salt SolutionSummary' {Maybe Text
Maybe POSIX
status :: Maybe Text
solutionArn :: Maybe Text
recipeArn :: Maybe Text
name :: Maybe Text
lastUpdatedDateTime :: Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:status:SolutionSummary' :: SolutionSummary -> Maybe Text
$sel:solutionArn:SolutionSummary' :: SolutionSummary -> Maybe Text
$sel:recipeArn:SolutionSummary' :: SolutionSummary -> Maybe Text
$sel:name:SolutionSummary' :: SolutionSummary -> Maybe Text
$sel:lastUpdatedDateTime:SolutionSummary' :: SolutionSummary -> Maybe POSIX
$sel:creationDateTime:SolutionSummary' :: SolutionSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastUpdatedDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
recipeArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
solutionArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
instance Prelude.NFData SolutionSummary where
rnf :: SolutionSummary -> ()
rnf SolutionSummary' {Maybe Text
Maybe POSIX
status :: Maybe Text
solutionArn :: Maybe Text
recipeArn :: Maybe Text
name :: Maybe Text
lastUpdatedDateTime :: Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:status:SolutionSummary' :: SolutionSummary -> Maybe Text
$sel:solutionArn:SolutionSummary' :: SolutionSummary -> Maybe Text
$sel:recipeArn:SolutionSummary' :: SolutionSummary -> Maybe Text
$sel:name:SolutionSummary' :: SolutionSummary -> Maybe Text
$sel:lastUpdatedDateTime:SolutionSummary' :: SolutionSummary -> Maybe POSIX
$sel:creationDateTime:SolutionSummary' :: SolutionSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastUpdatedDateTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
recipeArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
solutionArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status