{-# 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.Recipe 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 Recipe = Recipe'
{
Recipe -> Maybe Text
algorithmArn :: Prelude.Maybe Prelude.Text,
Recipe -> Maybe POSIX
creationDateTime :: Prelude.Maybe Data.POSIX,
Recipe -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Recipe -> Maybe Text
featureTransformationArn :: Prelude.Maybe Prelude.Text,
Recipe -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Data.POSIX,
Recipe -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Recipe -> Maybe Text
recipeArn :: Prelude.Maybe Prelude.Text,
Recipe -> Maybe Text
recipeType :: Prelude.Maybe Prelude.Text,
Recipe -> Maybe Text
status :: Prelude.Maybe Prelude.Text
}
deriving (Recipe -> Recipe -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Recipe -> Recipe -> Bool
$c/= :: Recipe -> Recipe -> Bool
== :: Recipe -> Recipe -> Bool
$c== :: Recipe -> Recipe -> Bool
Prelude.Eq, ReadPrec [Recipe]
ReadPrec Recipe
Int -> ReadS Recipe
ReadS [Recipe]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Recipe]
$creadListPrec :: ReadPrec [Recipe]
readPrec :: ReadPrec Recipe
$creadPrec :: ReadPrec Recipe
readList :: ReadS [Recipe]
$creadList :: ReadS [Recipe]
readsPrec :: Int -> ReadS Recipe
$creadsPrec :: Int -> ReadS Recipe
Prelude.Read, Int -> Recipe -> ShowS
[Recipe] -> ShowS
Recipe -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Recipe] -> ShowS
$cshowList :: [Recipe] -> ShowS
show :: Recipe -> String
$cshow :: Recipe -> String
showsPrec :: Int -> Recipe -> ShowS
$cshowsPrec :: Int -> Recipe -> ShowS
Prelude.Show, forall x. Rep Recipe x -> Recipe
forall x. Recipe -> Rep Recipe x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Recipe x -> Recipe
$cfrom :: forall x. Recipe -> Rep Recipe x
Prelude.Generic)
newRecipe ::
Recipe
newRecipe :: Recipe
newRecipe =
Recipe'
{ $sel:algorithmArn:Recipe' :: Maybe Text
algorithmArn = forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:Recipe' :: Maybe POSIX
creationDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:description:Recipe' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:featureTransformationArn:Recipe' :: Maybe Text
featureTransformationArn = forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:Recipe' :: Maybe POSIX
lastUpdatedDateTime = forall a. Maybe a
Prelude.Nothing,
$sel:name:Recipe' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:recipeArn:Recipe' :: Maybe Text
recipeArn = forall a. Maybe a
Prelude.Nothing,
$sel:recipeType:Recipe' :: Maybe Text
recipeType = forall a. Maybe a
Prelude.Nothing,
$sel:status:Recipe' :: Maybe Text
status = forall a. Maybe a
Prelude.Nothing
}
recipe_algorithmArn :: Lens.Lens' Recipe (Prelude.Maybe Prelude.Text)
recipe_algorithmArn :: Lens' Recipe (Maybe Text)
recipe_algorithmArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipe' {Maybe Text
algorithmArn :: Maybe Text
$sel:algorithmArn:Recipe' :: Recipe -> Maybe Text
algorithmArn} -> Maybe Text
algorithmArn) (\s :: Recipe
s@Recipe' {} Maybe Text
a -> Recipe
s {$sel:algorithmArn:Recipe' :: Maybe Text
algorithmArn = Maybe Text
a} :: Recipe)
recipe_creationDateTime :: Lens.Lens' Recipe (Prelude.Maybe Prelude.UTCTime)
recipe_creationDateTime :: Lens' Recipe (Maybe UTCTime)
recipe_creationDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipe' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:Recipe' :: Recipe -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: Recipe
s@Recipe' {} Maybe POSIX
a -> Recipe
s {$sel:creationDateTime:Recipe' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: Recipe) 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
recipe_description :: Lens.Lens' Recipe (Prelude.Maybe Prelude.Text)
recipe_description :: Lens' Recipe (Maybe Text)
recipe_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipe' {Maybe Text
description :: Maybe Text
$sel:description:Recipe' :: Recipe -> Maybe Text
description} -> Maybe Text
description) (\s :: Recipe
s@Recipe' {} Maybe Text
a -> Recipe
s {$sel:description:Recipe' :: Maybe Text
description = Maybe Text
a} :: Recipe)
recipe_featureTransformationArn :: Lens.Lens' Recipe (Prelude.Maybe Prelude.Text)
recipe_featureTransformationArn :: Lens' Recipe (Maybe Text)
recipe_featureTransformationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipe' {Maybe Text
featureTransformationArn :: Maybe Text
$sel:featureTransformationArn:Recipe' :: Recipe -> Maybe Text
featureTransformationArn} -> Maybe Text
featureTransformationArn) (\s :: Recipe
s@Recipe' {} Maybe Text
a -> Recipe
s {$sel:featureTransformationArn:Recipe' :: Maybe Text
featureTransformationArn = Maybe Text
a} :: Recipe)
recipe_lastUpdatedDateTime :: Lens.Lens' Recipe (Prelude.Maybe Prelude.UTCTime)
recipe_lastUpdatedDateTime :: Lens' Recipe (Maybe UTCTime)
recipe_lastUpdatedDateTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipe' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:Recipe' :: Recipe -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: Recipe
s@Recipe' {} Maybe POSIX
a -> Recipe
s {$sel:lastUpdatedDateTime:Recipe' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: Recipe) 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
recipe_name :: Lens.Lens' Recipe (Prelude.Maybe Prelude.Text)
recipe_name :: Lens' Recipe (Maybe Text)
recipe_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipe' {Maybe Text
name :: Maybe Text
$sel:name:Recipe' :: Recipe -> Maybe Text
name} -> Maybe Text
name) (\s :: Recipe
s@Recipe' {} Maybe Text
a -> Recipe
s {$sel:name:Recipe' :: Maybe Text
name = Maybe Text
a} :: Recipe)
recipe_recipeArn :: Lens.Lens' Recipe (Prelude.Maybe Prelude.Text)
recipe_recipeArn :: Lens' Recipe (Maybe Text)
recipe_recipeArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipe' {Maybe Text
recipeArn :: Maybe Text
$sel:recipeArn:Recipe' :: Recipe -> Maybe Text
recipeArn} -> Maybe Text
recipeArn) (\s :: Recipe
s@Recipe' {} Maybe Text
a -> Recipe
s {$sel:recipeArn:Recipe' :: Maybe Text
recipeArn = Maybe Text
a} :: Recipe)
recipe_recipeType :: Lens.Lens' Recipe (Prelude.Maybe Prelude.Text)
recipe_recipeType :: Lens' Recipe (Maybe Text)
recipe_recipeType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipe' {Maybe Text
recipeType :: Maybe Text
$sel:recipeType:Recipe' :: Recipe -> Maybe Text
recipeType} -> Maybe Text
recipeType) (\s :: Recipe
s@Recipe' {} Maybe Text
a -> Recipe
s {$sel:recipeType:Recipe' :: Maybe Text
recipeType = Maybe Text
a} :: Recipe)
recipe_status :: Lens.Lens' Recipe (Prelude.Maybe Prelude.Text)
recipe_status :: Lens' Recipe (Maybe Text)
recipe_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Recipe' {Maybe Text
status :: Maybe Text
$sel:status:Recipe' :: Recipe -> Maybe Text
status} -> Maybe Text
status) (\s :: Recipe
s@Recipe' {} Maybe Text
a -> Recipe
s {$sel:status:Recipe' :: Maybe Text
status = Maybe Text
a} :: Recipe)
instance Data.FromJSON Recipe where
parseJSON :: Value -> Parser Recipe
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Recipe"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Recipe
Recipe'
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
"algorithmArn")
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
"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
"description")
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
"featureTransformationArn")
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
"recipeType")
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 Recipe where
hashWithSalt :: Int -> Recipe -> Int
hashWithSalt Int
_salt Recipe' {Maybe Text
Maybe POSIX
status :: Maybe Text
recipeType :: Maybe Text
recipeArn :: Maybe Text
name :: Maybe Text
lastUpdatedDateTime :: Maybe POSIX
featureTransformationArn :: Maybe Text
description :: Maybe Text
creationDateTime :: Maybe POSIX
algorithmArn :: Maybe Text
$sel:status:Recipe' :: Recipe -> Maybe Text
$sel:recipeType:Recipe' :: Recipe -> Maybe Text
$sel:recipeArn:Recipe' :: Recipe -> Maybe Text
$sel:name:Recipe' :: Recipe -> Maybe Text
$sel:lastUpdatedDateTime:Recipe' :: Recipe -> Maybe POSIX
$sel:featureTransformationArn:Recipe' :: Recipe -> Maybe Text
$sel:description:Recipe' :: Recipe -> Maybe Text
$sel:creationDateTime:Recipe' :: Recipe -> Maybe POSIX
$sel:algorithmArn:Recipe' :: Recipe -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
algorithmArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationDateTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
featureTransformationArn
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
recipeType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
status
instance Prelude.NFData Recipe where
rnf :: Recipe -> ()
rnf Recipe' {Maybe Text
Maybe POSIX
status :: Maybe Text
recipeType :: Maybe Text
recipeArn :: Maybe Text
name :: Maybe Text
lastUpdatedDateTime :: Maybe POSIX
featureTransformationArn :: Maybe Text
description :: Maybe Text
creationDateTime :: Maybe POSIX
algorithmArn :: Maybe Text
$sel:status:Recipe' :: Recipe -> Maybe Text
$sel:recipeType:Recipe' :: Recipe -> Maybe Text
$sel:recipeArn:Recipe' :: Recipe -> Maybe Text
$sel:name:Recipe' :: Recipe -> Maybe Text
$sel:lastUpdatedDateTime:Recipe' :: Recipe -> Maybe POSIX
$sel:featureTransformationArn:Recipe' :: Recipe -> Maybe Text
$sel:description:Recipe' :: Recipe -> Maybe Text
$sel:creationDateTime:Recipe' :: Recipe -> Maybe POSIX
$sel:algorithmArn:Recipe' :: Recipe -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
algorithmArn
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
featureTransformationArn
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
recipeType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
status