{-# 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.RecipeSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Personalize.Types.Domain
import qualified Amazonka.Prelude as Prelude
data RecipeSummary = RecipeSummary'
{
RecipeSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
RecipeSummary -> Maybe Domain
domain :: Prelude.Maybe Domain,
RecipeSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
RecipeSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
RecipeSummary -> Maybe Text
recipeArn :: Prelude.Maybe Prelude.Text,
RecipeSummary -> Maybe Text
status :: Prelude.Maybe Prelude.Text
}
deriving (RecipeSummary -> RecipeSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecipeSummary -> RecipeSummary -> Bool
$c/= :: RecipeSummary -> RecipeSummary -> Bool
== :: RecipeSummary -> RecipeSummary -> Bool
$c== :: RecipeSummary -> RecipeSummary -> Bool
Prelude.Eq, ReadPrec [RecipeSummary]
ReadPrec RecipeSummary
Int -> ReadS RecipeSummary
ReadS [RecipeSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecipeSummary]
$creadListPrec :: ReadPrec [RecipeSummary]
readPrec :: ReadPrec RecipeSummary
$creadPrec :: ReadPrec RecipeSummary
readList :: ReadS [RecipeSummary]
$creadList :: ReadS [RecipeSummary]
readsPrec :: Int -> ReadS RecipeSummary
$creadsPrec :: Int -> ReadS RecipeSummary
Prelude.Read, Int -> RecipeSummary -> ShowS
[RecipeSummary] -> ShowS
RecipeSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecipeSummary] -> ShowS
$cshowList :: [RecipeSummary] -> ShowS
show :: RecipeSummary -> String
$cshow :: RecipeSummary -> String
showsPrec :: Int -> RecipeSummary -> ShowS
$cshowsPrec :: Int -> RecipeSummary -> ShowS
Prelude.Show, forall x. Rep RecipeSummary x -> RecipeSummary
forall x. RecipeSummary -> Rep RecipeSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RecipeSummary x -> RecipeSummary
$cfrom :: forall x. RecipeSummary -> Rep RecipeSummary x
Prelude.Generic)
newRecipeSummary ::
RecipeSummary
newRecipeSummary :: RecipeSummary
newRecipeSummary =
RecipeSummary'
{ $sel:creationDateTime:RecipeSummary' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:domain:RecipeSummary' :: Maybe Domain
domain = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:RecipeSummary' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:name:RecipeSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:recipeArn:RecipeSummary' :: Maybe Text
recipeArn = forall a. Maybe a
Prelude.Nothing,
$sel:status:RecipeSummary' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing
}
recipeSummary_creationDateTime :: Lens.Lens' RecipeSummary (Prelude.Maybe Prelude.UTCTime)
recipeSummary_creationDateTime :: Lens' RecipeSummary (Maybe UTCTime)
recipeSummary_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipeSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:RecipeSummary' :: RecipeSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: RecipeSummary
s@RecipeSummary' {} Maybe POSIX
a -> RecipeSummary
s {$sel:creationDateTime:RecipeSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: RecipeSummary) 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
recipeSummary_domain :: Lens.Lens' RecipeSummary (Prelude.Maybe Domain)
recipeSummary_domain :: Lens' RecipeSummary (Maybe Domain)
recipeSummary_domain = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipeSummary' {Maybe Domain
domain :: Maybe Domain
$sel:domain:RecipeSummary' :: RecipeSummary -> Maybe Domain
domain} -> Maybe Domain
domain) (\s :: RecipeSummary
s@RecipeSummary' {} Maybe Domain
a -> RecipeSummary
s {$sel:domain:RecipeSummary' :: Maybe Domain
domain = Maybe Domain
a} :: RecipeSummary)
recipeSummary_lastUpdatedDateTime :: Lens.Lens' RecipeSummary (Prelude.Maybe Prelude.UTCTime)
recipeSummary_lastUpdatedDateTime :: Lens' RecipeSummary (Maybe UTCTime)
recipeSummary_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipeSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:RecipeSummary' :: RecipeSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: RecipeSummary
s@RecipeSummary' {} Maybe POSIX
a -> RecipeSummary
s {$sel:lastUpdatedDateTime:RecipeSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: RecipeSummary) 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
recipeSummary_name :: Lens.Lens' RecipeSummary (Prelude.Maybe Prelude.Text)
recipeSummary_name :: Lens' RecipeSummary (Maybe Text)
recipeSummary_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipeSummary' {Maybe Text
name :: Maybe Text
$sel:name:RecipeSummary' :: RecipeSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: RecipeSummary
s@RecipeSummary' {} Maybe Text
a -> RecipeSummary
s {$sel:name:RecipeSummary' :: Maybe Text
name = Maybe Text
a} :: RecipeSummary)
recipeSummary_recipeArn :: Lens.Lens' RecipeSummary (Prelude.Maybe Prelude.Text)
recipeSummary_recipeArn :: Lens' RecipeSummary (Maybe Text)
recipeSummary_recipeArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipeSummary' {Maybe Text
recipeArn :: Maybe Text
$sel:recipeArn:RecipeSummary' :: RecipeSummary -> Maybe Text
recipeArn} -> Maybe Text
recipeArn) (\s :: RecipeSummary
s@RecipeSummary' {} Maybe Text
a -> RecipeSummary
s {$sel:recipeArn:RecipeSummary' :: Maybe Text
recipeArn = Maybe Text
a} :: RecipeSummary)
recipeSummary_status :: Lens.Lens' RecipeSummary (Prelude.Maybe Prelude.Text)
recipeSummary_status :: Lens' RecipeSummary (Maybe Text)
recipeSummary_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecipeSummary' {Maybe Text
status :: Maybe Text
$sel:status:RecipeSummary' :: RecipeSummary -> Maybe Text
status} -> Maybe Text
status) (\s :: RecipeSummary
s@RecipeSummary' {} Maybe Text
a -> RecipeSummary
s {$sel:status:RecipeSummary' :: Maybe Text
status = Maybe Text
a} :: RecipeSummary)
instance Data.FromJSON RecipeSummary where
parseJSON :: Value -> Parser RecipeSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RecipeSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Domain
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> RecipeSummary
RecipeSummary'
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
"domain")
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
"status")
)
instance Prelude.Hashable RecipeSummary where
hashWithSalt :: Int -> RecipeSummary -> Int
hashWithSalt Int
_salt RecipeSummary' {Maybe Text
Maybe POSIX
Maybe Domain
status :: Maybe Text
recipeArn :: Maybe Text
name :: Maybe Text
lastUpdatedDateTime :: Maybe POSIX
domain :: Maybe Domain
creationDateTime :: Maybe POSIX
$sel:status:RecipeSummary' :: RecipeSummary -> Maybe Text
$sel:recipeArn:RecipeSummary' :: RecipeSummary -> Maybe Text
$sel:name:RecipeSummary' :: RecipeSummary -> Maybe Text
$sel:lastUpdatedDateTime:RecipeSummary' :: RecipeSummary -> Maybe POSIX
$sel:domain:RecipeSummary' :: RecipeSummary -> Maybe Domain
$sel:creationDateTime:RecipeSummary' :: RecipeSummary -> 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 Domain
domain
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
status
instance Prelude.NFData RecipeSummary where
rnf :: RecipeSummary -> ()
rnf RecipeSummary' {Maybe Text
Maybe POSIX
Maybe Domain
status :: Maybe Text
recipeArn :: Maybe Text
name :: Maybe Text
lastUpdatedDateTime :: Maybe POSIX
domain :: Maybe Domain
creationDateTime :: Maybe POSIX
$sel:status:RecipeSummary' :: RecipeSummary -> Maybe Text
$sel:recipeArn:RecipeSummary' :: RecipeSummary -> Maybe Text
$sel:name:RecipeSummary' :: RecipeSummary -> Maybe Text
$sel:lastUpdatedDateTime:RecipeSummary' :: RecipeSummary -> Maybe POSIX
$sel:domain:RecipeSummary' :: RecipeSummary -> Maybe Domain
$sel:creationDateTime:RecipeSummary' :: RecipeSummary -> 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 Domain
domain
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
status