{-# 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.FeatureTransformation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FeatureTransformation = FeatureTransformation'
{
FeatureTransformation -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
FeatureTransformation -> Maybe Text
featureTransformationArn :: Prelude.Maybe Prelude.Text,
FeatureTransformation -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
FeatureTransformation -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
FeatureTransformation -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX,
FeatureTransformation -> Maybe (HashMap Text Text)
defaultParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (FeatureTransformation -> FeatureTransformation -> Bool
(FeatureTransformation -> FeatureTransformation -> Bool)
-> (FeatureTransformation -> FeatureTransformation -> Bool)
-> Eq FeatureTransformation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FeatureTransformation -> FeatureTransformation -> Bool
$c/= :: FeatureTransformation -> FeatureTransformation -> Bool
== :: FeatureTransformation -> FeatureTransformation -> Bool
$c== :: FeatureTransformation -> FeatureTransformation -> Bool
Prelude.Eq, ReadPrec [FeatureTransformation]
ReadPrec FeatureTransformation
Int -> ReadS FeatureTransformation
ReadS [FeatureTransformation]
(Int -> ReadS FeatureTransformation)
-> ReadS [FeatureTransformation]
-> ReadPrec FeatureTransformation
-> ReadPrec [FeatureTransformation]
-> Read FeatureTransformation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FeatureTransformation]
$creadListPrec :: ReadPrec [FeatureTransformation]
readPrec :: ReadPrec FeatureTransformation
$creadPrec :: ReadPrec FeatureTransformation
readList :: ReadS [FeatureTransformation]
$creadList :: ReadS [FeatureTransformation]
readsPrec :: Int -> ReadS FeatureTransformation
$creadsPrec :: Int -> ReadS FeatureTransformation
Prelude.Read, Int -> FeatureTransformation -> ShowS
[FeatureTransformation] -> ShowS
FeatureTransformation -> String
(Int -> FeatureTransformation -> ShowS)
-> (FeatureTransformation -> String)
-> ([FeatureTransformation] -> ShowS)
-> Show FeatureTransformation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FeatureTransformation] -> ShowS
$cshowList :: [FeatureTransformation] -> ShowS
show :: FeatureTransformation -> String
$cshow :: FeatureTransformation -> String
showsPrec :: Int -> FeatureTransformation -> ShowS
$cshowsPrec :: Int -> FeatureTransformation -> ShowS
Prelude.Show, (forall x. FeatureTransformation -> Rep FeatureTransformation x)
-> (forall x. Rep FeatureTransformation x -> FeatureTransformation)
-> Generic FeatureTransformation
forall x. Rep FeatureTransformation x -> FeatureTransformation
forall x. FeatureTransformation -> Rep FeatureTransformation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FeatureTransformation x -> FeatureTransformation
$cfrom :: forall x. FeatureTransformation -> Rep FeatureTransformation x
Prelude.Generic)
newFeatureTransformation ::
FeatureTransformation
newFeatureTransformation :: FeatureTransformation
newFeatureTransformation =
FeatureTransformation' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> FeatureTransformation
FeatureTransformation'
{ $sel:status:FeatureTransformation' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:featureTransformationArn:FeatureTransformation' :: Maybe Text
featureTransformationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:FeatureTransformation' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:name:FeatureTransformation' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:FeatureTransformation' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:defaultParameters:FeatureTransformation' :: Maybe (HashMap Text Text)
defaultParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing
}
featureTransformation_status :: Lens.Lens' FeatureTransformation (Prelude.Maybe Prelude.Text)
featureTransformation_status :: (Maybe Text -> f (Maybe Text))
-> FeatureTransformation -> f FeatureTransformation
featureTransformation_status = (FeatureTransformation -> Maybe Text)
-> (FeatureTransformation -> Maybe Text -> FeatureTransformation)
-> Lens
FeatureTransformation
FeatureTransformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FeatureTransformation' {Maybe Text
status :: Maybe Text
$sel:status:FeatureTransformation' :: FeatureTransformation -> Maybe Text
status} -> Maybe Text
status) (\s :: FeatureTransformation
s@FeatureTransformation' {} Maybe Text
a -> FeatureTransformation
s {$sel:status:FeatureTransformation' :: Maybe Text
status = Maybe Text
a} :: FeatureTransformation)
featureTransformation_featureTransformationArn :: Lens.Lens' FeatureTransformation (Prelude.Maybe Prelude.Text)
featureTransformation_featureTransformationArn :: (Maybe Text -> f (Maybe Text))
-> FeatureTransformation -> f FeatureTransformation
featureTransformation_featureTransformationArn = (FeatureTransformation -> Maybe Text)
-> (FeatureTransformation -> Maybe Text -> FeatureTransformation)
-> Lens
FeatureTransformation
FeatureTransformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FeatureTransformation' {Maybe Text
featureTransformationArn :: Maybe Text
$sel:featureTransformationArn:FeatureTransformation' :: FeatureTransformation -> Maybe Text
featureTransformationArn} -> Maybe Text
featureTransformationArn) (\s :: FeatureTransformation
s@FeatureTransformation' {} Maybe Text
a -> FeatureTransformation
s {$sel:featureTransformationArn:FeatureTransformation' :: Maybe Text
featureTransformationArn = Maybe Text
a} :: FeatureTransformation)
featureTransformation_lastUpdatedDateTime :: Lens.Lens' FeatureTransformation (Prelude.Maybe Prelude.UTCTime)
featureTransformation_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> FeatureTransformation -> f FeatureTransformation
featureTransformation_lastUpdatedDateTime = (FeatureTransformation -> Maybe POSIX)
-> (FeatureTransformation -> Maybe POSIX -> FeatureTransformation)
-> Lens
FeatureTransformation
FeatureTransformation
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FeatureTransformation' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:FeatureTransformation' :: FeatureTransformation -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: FeatureTransformation
s@FeatureTransformation' {} Maybe POSIX
a -> FeatureTransformation
s {$sel:lastUpdatedDateTime:FeatureTransformation' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: FeatureTransformation) ((Maybe POSIX -> f (Maybe POSIX))
-> FeatureTransformation -> f FeatureTransformation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> FeatureTransformation
-> f FeatureTransformation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
featureTransformation_name :: Lens.Lens' FeatureTransformation (Prelude.Maybe Prelude.Text)
featureTransformation_name :: (Maybe Text -> f (Maybe Text))
-> FeatureTransformation -> f FeatureTransformation
featureTransformation_name = (FeatureTransformation -> Maybe Text)
-> (FeatureTransformation -> Maybe Text -> FeatureTransformation)
-> Lens
FeatureTransformation
FeatureTransformation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FeatureTransformation' {Maybe Text
name :: Maybe Text
$sel:name:FeatureTransformation' :: FeatureTransformation -> Maybe Text
name} -> Maybe Text
name) (\s :: FeatureTransformation
s@FeatureTransformation' {} Maybe Text
a -> FeatureTransformation
s {$sel:name:FeatureTransformation' :: Maybe Text
name = Maybe Text
a} :: FeatureTransformation)
featureTransformation_creationDateTime :: Lens.Lens' FeatureTransformation (Prelude.Maybe Prelude.UTCTime)
featureTransformation_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> FeatureTransformation -> f FeatureTransformation
featureTransformation_creationDateTime = (FeatureTransformation -> Maybe POSIX)
-> (FeatureTransformation -> Maybe POSIX -> FeatureTransformation)
-> Lens
FeatureTransformation
FeatureTransformation
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FeatureTransformation' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:FeatureTransformation' :: FeatureTransformation -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: FeatureTransformation
s@FeatureTransformation' {} Maybe POSIX
a -> FeatureTransformation
s {$sel:creationDateTime:FeatureTransformation' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: FeatureTransformation) ((Maybe POSIX -> f (Maybe POSIX))
-> FeatureTransformation -> f FeatureTransformation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> FeatureTransformation
-> f FeatureTransformation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
featureTransformation_defaultParameters :: Lens.Lens' FeatureTransformation (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
featureTransformation_defaultParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> FeatureTransformation -> f FeatureTransformation
featureTransformation_defaultParameters = (FeatureTransformation -> Maybe (HashMap Text Text))
-> (FeatureTransformation
-> Maybe (HashMap Text Text) -> FeatureTransformation)
-> Lens
FeatureTransformation
FeatureTransformation
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FeatureTransformation' {Maybe (HashMap Text Text)
defaultParameters :: Maybe (HashMap Text Text)
$sel:defaultParameters:FeatureTransformation' :: FeatureTransformation -> Maybe (HashMap Text Text)
defaultParameters} -> Maybe (HashMap Text Text)
defaultParameters) (\s :: FeatureTransformation
s@FeatureTransformation' {} Maybe (HashMap Text Text)
a -> FeatureTransformation
s {$sel:defaultParameters:FeatureTransformation' :: Maybe (HashMap Text Text)
defaultParameters = Maybe (HashMap Text Text)
a} :: FeatureTransformation) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> FeatureTransformation -> f FeatureTransformation)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> FeatureTransformation
-> f FeatureTransformation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON FeatureTransformation where
parseJSON :: Value -> Parser FeatureTransformation
parseJSON =
String
-> (Object -> Parser FeatureTransformation)
-> Value
-> Parser FeatureTransformation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FeatureTransformation"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> FeatureTransformation
FeatureTransformation'
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> FeatureTransformation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> FeatureTransformation)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> FeatureTransformation)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> FeatureTransformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"featureTransformationArn")
Parser
(Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> FeatureTransformation)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> FeatureTransformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"lastUpdatedDateTime")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> FeatureTransformation)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX -> Maybe (HashMap Text Text) -> FeatureTransformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"name")
Parser
(Maybe POSIX -> Maybe (HashMap Text Text) -> FeatureTransformation)
-> Parser (Maybe POSIX)
-> Parser (Maybe (HashMap Text Text) -> FeatureTransformation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"creationDateTime")
Parser (Maybe (HashMap Text Text) -> FeatureTransformation)
-> Parser (Maybe (HashMap Text Text))
-> Parser FeatureTransformation
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"defaultParameters"
Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable FeatureTransformation
instance Prelude.NFData FeatureTransformation