{-# 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.CampaignUpdateSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Personalize.Types.CampaignConfig
import qualified Amazonka.Prelude as Prelude
data CampaignUpdateSummary = CampaignUpdateSummary'
{
CampaignUpdateSummary -> Maybe Text
failureReason :: Prelude.Maybe Prelude.Text,
CampaignUpdateSummary -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
CampaignUpdateSummary -> Maybe POSIX
lastUpdatedDateTime :: Prelude.Maybe Core.POSIX,
CampaignUpdateSummary -> Maybe CampaignConfig
campaignConfig :: Prelude.Maybe CampaignConfig,
CampaignUpdateSummary -> Maybe Natural
minProvisionedTPS :: Prelude.Maybe Prelude.Natural,
CampaignUpdateSummary -> Maybe POSIX
creationDateTime :: Prelude.Maybe Core.POSIX,
CampaignUpdateSummary -> Maybe Text
solutionVersionArn :: Prelude.Maybe Prelude.Text
}
deriving (CampaignUpdateSummary -> CampaignUpdateSummary -> Bool
(CampaignUpdateSummary -> CampaignUpdateSummary -> Bool)
-> (CampaignUpdateSummary -> CampaignUpdateSummary -> Bool)
-> Eq CampaignUpdateSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CampaignUpdateSummary -> CampaignUpdateSummary -> Bool
$c/= :: CampaignUpdateSummary -> CampaignUpdateSummary -> Bool
== :: CampaignUpdateSummary -> CampaignUpdateSummary -> Bool
$c== :: CampaignUpdateSummary -> CampaignUpdateSummary -> Bool
Prelude.Eq, ReadPrec [CampaignUpdateSummary]
ReadPrec CampaignUpdateSummary
Int -> ReadS CampaignUpdateSummary
ReadS [CampaignUpdateSummary]
(Int -> ReadS CampaignUpdateSummary)
-> ReadS [CampaignUpdateSummary]
-> ReadPrec CampaignUpdateSummary
-> ReadPrec [CampaignUpdateSummary]
-> Read CampaignUpdateSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CampaignUpdateSummary]
$creadListPrec :: ReadPrec [CampaignUpdateSummary]
readPrec :: ReadPrec CampaignUpdateSummary
$creadPrec :: ReadPrec CampaignUpdateSummary
readList :: ReadS [CampaignUpdateSummary]
$creadList :: ReadS [CampaignUpdateSummary]
readsPrec :: Int -> ReadS CampaignUpdateSummary
$creadsPrec :: Int -> ReadS CampaignUpdateSummary
Prelude.Read, Int -> CampaignUpdateSummary -> ShowS
[CampaignUpdateSummary] -> ShowS
CampaignUpdateSummary -> String
(Int -> CampaignUpdateSummary -> ShowS)
-> (CampaignUpdateSummary -> String)
-> ([CampaignUpdateSummary] -> ShowS)
-> Show CampaignUpdateSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CampaignUpdateSummary] -> ShowS
$cshowList :: [CampaignUpdateSummary] -> ShowS
show :: CampaignUpdateSummary -> String
$cshow :: CampaignUpdateSummary -> String
showsPrec :: Int -> CampaignUpdateSummary -> ShowS
$cshowsPrec :: Int -> CampaignUpdateSummary -> ShowS
Prelude.Show, (forall x. CampaignUpdateSummary -> Rep CampaignUpdateSummary x)
-> (forall x. Rep CampaignUpdateSummary x -> CampaignUpdateSummary)
-> Generic CampaignUpdateSummary
forall x. Rep CampaignUpdateSummary x -> CampaignUpdateSummary
forall x. CampaignUpdateSummary -> Rep CampaignUpdateSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CampaignUpdateSummary x -> CampaignUpdateSummary
$cfrom :: forall x. CampaignUpdateSummary -> Rep CampaignUpdateSummary x
Prelude.Generic)
newCampaignUpdateSummary ::
CampaignUpdateSummary
newCampaignUpdateSummary :: CampaignUpdateSummary
newCampaignUpdateSummary =
CampaignUpdateSummary' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe CampaignConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> CampaignUpdateSummary
CampaignUpdateSummary'
{ $sel:failureReason:CampaignUpdateSummary' :: Maybe Text
failureReason =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:status:CampaignUpdateSummary' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:lastUpdatedDateTime:CampaignUpdateSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:campaignConfig:CampaignUpdateSummary' :: Maybe CampaignConfig
campaignConfig = Maybe CampaignConfig
forall a. Maybe a
Prelude.Nothing,
$sel:minProvisionedTPS:CampaignUpdateSummary' :: Maybe Natural
minProvisionedTPS = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:creationDateTime:CampaignUpdateSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:solutionVersionArn:CampaignUpdateSummary' :: Maybe Text
solutionVersionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
campaignUpdateSummary_failureReason :: Lens.Lens' CampaignUpdateSummary (Prelude.Maybe Prelude.Text)
campaignUpdateSummary_failureReason :: (Maybe Text -> f (Maybe Text))
-> CampaignUpdateSummary -> f CampaignUpdateSummary
campaignUpdateSummary_failureReason = (CampaignUpdateSummary -> Maybe Text)
-> (CampaignUpdateSummary -> Maybe Text -> CampaignUpdateSummary)
-> Lens
CampaignUpdateSummary
CampaignUpdateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignUpdateSummary' {Maybe Text
failureReason :: Maybe Text
$sel:failureReason:CampaignUpdateSummary' :: CampaignUpdateSummary -> Maybe Text
failureReason} -> Maybe Text
failureReason) (\s :: CampaignUpdateSummary
s@CampaignUpdateSummary' {} Maybe Text
a -> CampaignUpdateSummary
s {$sel:failureReason:CampaignUpdateSummary' :: Maybe Text
failureReason = Maybe Text
a} :: CampaignUpdateSummary)
campaignUpdateSummary_status :: Lens.Lens' CampaignUpdateSummary (Prelude.Maybe Prelude.Text)
campaignUpdateSummary_status :: (Maybe Text -> f (Maybe Text))
-> CampaignUpdateSummary -> f CampaignUpdateSummary
campaignUpdateSummary_status = (CampaignUpdateSummary -> Maybe Text)
-> (CampaignUpdateSummary -> Maybe Text -> CampaignUpdateSummary)
-> Lens
CampaignUpdateSummary
CampaignUpdateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignUpdateSummary' {Maybe Text
status :: Maybe Text
$sel:status:CampaignUpdateSummary' :: CampaignUpdateSummary -> Maybe Text
status} -> Maybe Text
status) (\s :: CampaignUpdateSummary
s@CampaignUpdateSummary' {} Maybe Text
a -> CampaignUpdateSummary
s {$sel:status:CampaignUpdateSummary' :: Maybe Text
status = Maybe Text
a} :: CampaignUpdateSummary)
campaignUpdateSummary_lastUpdatedDateTime :: Lens.Lens' CampaignUpdateSummary (Prelude.Maybe Prelude.UTCTime)
campaignUpdateSummary_lastUpdatedDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CampaignUpdateSummary -> f CampaignUpdateSummary
campaignUpdateSummary_lastUpdatedDateTime = (CampaignUpdateSummary -> Maybe POSIX)
-> (CampaignUpdateSummary -> Maybe POSIX -> CampaignUpdateSummary)
-> Lens
CampaignUpdateSummary
CampaignUpdateSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignUpdateSummary' {Maybe POSIX
lastUpdatedDateTime :: Maybe POSIX
$sel:lastUpdatedDateTime:CampaignUpdateSummary' :: CampaignUpdateSummary -> Maybe POSIX
lastUpdatedDateTime} -> Maybe POSIX
lastUpdatedDateTime) (\s :: CampaignUpdateSummary
s@CampaignUpdateSummary' {} Maybe POSIX
a -> CampaignUpdateSummary
s {$sel:lastUpdatedDateTime:CampaignUpdateSummary' :: Maybe POSIX
lastUpdatedDateTime = Maybe POSIX
a} :: CampaignUpdateSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> CampaignUpdateSummary -> f CampaignUpdateSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CampaignUpdateSummary
-> f CampaignUpdateSummary
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
campaignUpdateSummary_campaignConfig :: Lens.Lens' CampaignUpdateSummary (Prelude.Maybe CampaignConfig)
campaignUpdateSummary_campaignConfig :: (Maybe CampaignConfig -> f (Maybe CampaignConfig))
-> CampaignUpdateSummary -> f CampaignUpdateSummary
campaignUpdateSummary_campaignConfig = (CampaignUpdateSummary -> Maybe CampaignConfig)
-> (CampaignUpdateSummary
-> Maybe CampaignConfig -> CampaignUpdateSummary)
-> Lens
CampaignUpdateSummary
CampaignUpdateSummary
(Maybe CampaignConfig)
(Maybe CampaignConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignUpdateSummary' {Maybe CampaignConfig
campaignConfig :: Maybe CampaignConfig
$sel:campaignConfig:CampaignUpdateSummary' :: CampaignUpdateSummary -> Maybe CampaignConfig
campaignConfig} -> Maybe CampaignConfig
campaignConfig) (\s :: CampaignUpdateSummary
s@CampaignUpdateSummary' {} Maybe CampaignConfig
a -> CampaignUpdateSummary
s {$sel:campaignConfig:CampaignUpdateSummary' :: Maybe CampaignConfig
campaignConfig = Maybe CampaignConfig
a} :: CampaignUpdateSummary)
campaignUpdateSummary_minProvisionedTPS :: Lens.Lens' CampaignUpdateSummary (Prelude.Maybe Prelude.Natural)
campaignUpdateSummary_minProvisionedTPS :: (Maybe Natural -> f (Maybe Natural))
-> CampaignUpdateSummary -> f CampaignUpdateSummary
campaignUpdateSummary_minProvisionedTPS = (CampaignUpdateSummary -> Maybe Natural)
-> (CampaignUpdateSummary
-> Maybe Natural -> CampaignUpdateSummary)
-> Lens
CampaignUpdateSummary
CampaignUpdateSummary
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignUpdateSummary' {Maybe Natural
minProvisionedTPS :: Maybe Natural
$sel:minProvisionedTPS:CampaignUpdateSummary' :: CampaignUpdateSummary -> Maybe Natural
minProvisionedTPS} -> Maybe Natural
minProvisionedTPS) (\s :: CampaignUpdateSummary
s@CampaignUpdateSummary' {} Maybe Natural
a -> CampaignUpdateSummary
s {$sel:minProvisionedTPS:CampaignUpdateSummary' :: Maybe Natural
minProvisionedTPS = Maybe Natural
a} :: CampaignUpdateSummary)
campaignUpdateSummary_creationDateTime :: Lens.Lens' CampaignUpdateSummary (Prelude.Maybe Prelude.UTCTime)
campaignUpdateSummary_creationDateTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CampaignUpdateSummary -> f CampaignUpdateSummary
campaignUpdateSummary_creationDateTime = (CampaignUpdateSummary -> Maybe POSIX)
-> (CampaignUpdateSummary -> Maybe POSIX -> CampaignUpdateSummary)
-> Lens
CampaignUpdateSummary
CampaignUpdateSummary
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignUpdateSummary' {Maybe POSIX
creationDateTime :: Maybe POSIX
$sel:creationDateTime:CampaignUpdateSummary' :: CampaignUpdateSummary -> Maybe POSIX
creationDateTime} -> Maybe POSIX
creationDateTime) (\s :: CampaignUpdateSummary
s@CampaignUpdateSummary' {} Maybe POSIX
a -> CampaignUpdateSummary
s {$sel:creationDateTime:CampaignUpdateSummary' :: Maybe POSIX
creationDateTime = Maybe POSIX
a} :: CampaignUpdateSummary) ((Maybe POSIX -> f (Maybe POSIX))
-> CampaignUpdateSummary -> f CampaignUpdateSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CampaignUpdateSummary
-> f CampaignUpdateSummary
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
campaignUpdateSummary_solutionVersionArn :: Lens.Lens' CampaignUpdateSummary (Prelude.Maybe Prelude.Text)
campaignUpdateSummary_solutionVersionArn :: (Maybe Text -> f (Maybe Text))
-> CampaignUpdateSummary -> f CampaignUpdateSummary
campaignUpdateSummary_solutionVersionArn = (CampaignUpdateSummary -> Maybe Text)
-> (CampaignUpdateSummary -> Maybe Text -> CampaignUpdateSummary)
-> Lens
CampaignUpdateSummary
CampaignUpdateSummary
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CampaignUpdateSummary' {Maybe Text
solutionVersionArn :: Maybe Text
$sel:solutionVersionArn:CampaignUpdateSummary' :: CampaignUpdateSummary -> Maybe Text
solutionVersionArn} -> Maybe Text
solutionVersionArn) (\s :: CampaignUpdateSummary
s@CampaignUpdateSummary' {} Maybe Text
a -> CampaignUpdateSummary
s {$sel:solutionVersionArn:CampaignUpdateSummary' :: Maybe Text
solutionVersionArn = Maybe Text
a} :: CampaignUpdateSummary)
instance Core.FromJSON CampaignUpdateSummary where
parseJSON :: Value -> Parser CampaignUpdateSummary
parseJSON =
String
-> (Object -> Parser CampaignUpdateSummary)
-> Value
-> Parser CampaignUpdateSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CampaignUpdateSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe CampaignConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> CampaignUpdateSummary
CampaignUpdateSummary'
(Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe CampaignConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> CampaignUpdateSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe CampaignConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> CampaignUpdateSummary)
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
"failureReason")
Parser
(Maybe Text
-> Maybe POSIX
-> Maybe CampaignConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> CampaignUpdateSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe CampaignConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> CampaignUpdateSummary)
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
"status")
Parser
(Maybe POSIX
-> Maybe CampaignConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> CampaignUpdateSummary)
-> Parser (Maybe POSIX)
-> Parser
(Maybe CampaignConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> CampaignUpdateSummary)
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 CampaignConfig
-> Maybe Natural
-> Maybe POSIX
-> Maybe Text
-> CampaignUpdateSummary)
-> Parser (Maybe CampaignConfig)
-> Parser
(Maybe Natural
-> Maybe POSIX -> Maybe Text -> CampaignUpdateSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CampaignConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"campaignConfig")
Parser
(Maybe Natural
-> Maybe POSIX -> Maybe Text -> CampaignUpdateSummary)
-> Parser (Maybe Natural)
-> Parser (Maybe POSIX -> Maybe Text -> CampaignUpdateSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"minProvisionedTPS")
Parser (Maybe POSIX -> Maybe Text -> CampaignUpdateSummary)
-> Parser (Maybe POSIX)
-> Parser (Maybe Text -> CampaignUpdateSummary)
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 Text -> CampaignUpdateSummary)
-> Parser (Maybe Text) -> Parser CampaignUpdateSummary
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
"solutionVersionArn")
)
instance Prelude.Hashable CampaignUpdateSummary
instance Prelude.NFData CampaignUpdateSummary