{-# 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.SESV2.Types.ImportJobSummary 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
import Amazonka.SESV2.Types.ImportDestination
import Amazonka.SESV2.Types.JobStatus
data ImportJobSummary = ImportJobSummary'
{
ImportJobSummary -> Maybe POSIX
createdTimestamp :: Prelude.Maybe Data.POSIX,
ImportJobSummary -> Maybe Int
failedRecordsCount :: Prelude.Maybe Prelude.Int,
ImportJobSummary -> Maybe ImportDestination
importDestination :: Prelude.Maybe ImportDestination,
ImportJobSummary -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
ImportJobSummary -> Maybe JobStatus
jobStatus :: Prelude.Maybe JobStatus,
ImportJobSummary -> Maybe Int
processedRecordsCount :: Prelude.Maybe Prelude.Int
}
deriving (ImportJobSummary -> ImportJobSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportJobSummary -> ImportJobSummary -> Bool
$c/= :: ImportJobSummary -> ImportJobSummary -> Bool
== :: ImportJobSummary -> ImportJobSummary -> Bool
$c== :: ImportJobSummary -> ImportJobSummary -> Bool
Prelude.Eq, ReadPrec [ImportJobSummary]
ReadPrec ImportJobSummary
Int -> ReadS ImportJobSummary
ReadS [ImportJobSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportJobSummary]
$creadListPrec :: ReadPrec [ImportJobSummary]
readPrec :: ReadPrec ImportJobSummary
$creadPrec :: ReadPrec ImportJobSummary
readList :: ReadS [ImportJobSummary]
$creadList :: ReadS [ImportJobSummary]
readsPrec :: Int -> ReadS ImportJobSummary
$creadsPrec :: Int -> ReadS ImportJobSummary
Prelude.Read, Int -> ImportJobSummary -> ShowS
[ImportJobSummary] -> ShowS
ImportJobSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportJobSummary] -> ShowS
$cshowList :: [ImportJobSummary] -> ShowS
show :: ImportJobSummary -> String
$cshow :: ImportJobSummary -> String
showsPrec :: Int -> ImportJobSummary -> ShowS
$cshowsPrec :: Int -> ImportJobSummary -> ShowS
Prelude.Show, forall x. Rep ImportJobSummary x -> ImportJobSummary
forall x. ImportJobSummary -> Rep ImportJobSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportJobSummary x -> ImportJobSummary
$cfrom :: forall x. ImportJobSummary -> Rep ImportJobSummary x
Prelude.Generic)
newImportJobSummary ::
ImportJobSummary
newImportJobSummary :: ImportJobSummary
newImportJobSummary =
ImportJobSummary'
{ $sel:createdTimestamp:ImportJobSummary' :: Maybe POSIX
createdTimestamp =
forall a. Maybe a
Prelude.Nothing,
$sel:failedRecordsCount:ImportJobSummary' :: Maybe Int
failedRecordsCount = forall a. Maybe a
Prelude.Nothing,
$sel:importDestination:ImportJobSummary' :: Maybe ImportDestination
importDestination = forall a. Maybe a
Prelude.Nothing,
$sel:jobId:ImportJobSummary' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:ImportJobSummary' :: Maybe JobStatus
jobStatus = forall a. Maybe a
Prelude.Nothing,
$sel:processedRecordsCount:ImportJobSummary' :: Maybe Int
processedRecordsCount = forall a. Maybe a
Prelude.Nothing
}
importJobSummary_createdTimestamp :: Lens.Lens' ImportJobSummary (Prelude.Maybe Prelude.UTCTime)
importJobSummary_createdTimestamp :: Lens' ImportJobSummary (Maybe UTCTime)
importJobSummary_createdTimestamp = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobSummary' {Maybe POSIX
createdTimestamp :: Maybe POSIX
$sel:createdTimestamp:ImportJobSummary' :: ImportJobSummary -> Maybe POSIX
createdTimestamp} -> Maybe POSIX
createdTimestamp) (\s :: ImportJobSummary
s@ImportJobSummary' {} Maybe POSIX
a -> ImportJobSummary
s {$sel:createdTimestamp:ImportJobSummary' :: Maybe POSIX
createdTimestamp = Maybe POSIX
a} :: ImportJobSummary) 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
importJobSummary_failedRecordsCount :: Lens.Lens' ImportJobSummary (Prelude.Maybe Prelude.Int)
importJobSummary_failedRecordsCount :: Lens' ImportJobSummary (Maybe Int)
importJobSummary_failedRecordsCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobSummary' {Maybe Int
failedRecordsCount :: Maybe Int
$sel:failedRecordsCount:ImportJobSummary' :: ImportJobSummary -> Maybe Int
failedRecordsCount} -> Maybe Int
failedRecordsCount) (\s :: ImportJobSummary
s@ImportJobSummary' {} Maybe Int
a -> ImportJobSummary
s {$sel:failedRecordsCount:ImportJobSummary' :: Maybe Int
failedRecordsCount = Maybe Int
a} :: ImportJobSummary)
importJobSummary_importDestination :: Lens.Lens' ImportJobSummary (Prelude.Maybe ImportDestination)
importJobSummary_importDestination :: Lens' ImportJobSummary (Maybe ImportDestination)
importJobSummary_importDestination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobSummary' {Maybe ImportDestination
importDestination :: Maybe ImportDestination
$sel:importDestination:ImportJobSummary' :: ImportJobSummary -> Maybe ImportDestination
importDestination} -> Maybe ImportDestination
importDestination) (\s :: ImportJobSummary
s@ImportJobSummary' {} Maybe ImportDestination
a -> ImportJobSummary
s {$sel:importDestination:ImportJobSummary' :: Maybe ImportDestination
importDestination = Maybe ImportDestination
a} :: ImportJobSummary)
importJobSummary_jobId :: Lens.Lens' ImportJobSummary (Prelude.Maybe Prelude.Text)
importJobSummary_jobId :: Lens' ImportJobSummary (Maybe Text)
importJobSummary_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobSummary' {Maybe Text
jobId :: Maybe Text
$sel:jobId:ImportJobSummary' :: ImportJobSummary -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: ImportJobSummary
s@ImportJobSummary' {} Maybe Text
a -> ImportJobSummary
s {$sel:jobId:ImportJobSummary' :: Maybe Text
jobId = Maybe Text
a} :: ImportJobSummary)
importJobSummary_jobStatus :: Lens.Lens' ImportJobSummary (Prelude.Maybe JobStatus)
importJobSummary_jobStatus :: Lens' ImportJobSummary (Maybe JobStatus)
importJobSummary_jobStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobSummary' {Maybe JobStatus
jobStatus :: Maybe JobStatus
$sel:jobStatus:ImportJobSummary' :: ImportJobSummary -> Maybe JobStatus
jobStatus} -> Maybe JobStatus
jobStatus) (\s :: ImportJobSummary
s@ImportJobSummary' {} Maybe JobStatus
a -> ImportJobSummary
s {$sel:jobStatus:ImportJobSummary' :: Maybe JobStatus
jobStatus = Maybe JobStatus
a} :: ImportJobSummary)
importJobSummary_processedRecordsCount :: Lens.Lens' ImportJobSummary (Prelude.Maybe Prelude.Int)
importJobSummary_processedRecordsCount :: Lens' ImportJobSummary (Maybe Int)
importJobSummary_processedRecordsCount = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobSummary' {Maybe Int
processedRecordsCount :: Maybe Int
$sel:processedRecordsCount:ImportJobSummary' :: ImportJobSummary -> Maybe Int
processedRecordsCount} -> Maybe Int
processedRecordsCount) (\s :: ImportJobSummary
s@ImportJobSummary' {} Maybe Int
a -> ImportJobSummary
s {$sel:processedRecordsCount:ImportJobSummary' :: Maybe Int
processedRecordsCount = Maybe Int
a} :: ImportJobSummary)
instance Data.FromJSON ImportJobSummary where
parseJSON :: Value -> Parser ImportJobSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ImportJobSummary"
( \Object
x ->
Maybe POSIX
-> Maybe Int
-> Maybe ImportDestination
-> Maybe Text
-> Maybe JobStatus
-> Maybe Int
-> ImportJobSummary
ImportJobSummary'
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
"CreatedTimestamp")
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
"FailedRecordsCount")
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
"ImportDestination")
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
"JobId")
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
"JobStatus")
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
"ProcessedRecordsCount")
)
instance Prelude.Hashable ImportJobSummary where
hashWithSalt :: Int -> ImportJobSummary -> Int
hashWithSalt Int
_salt ImportJobSummary' {Maybe Int
Maybe Text
Maybe POSIX
Maybe JobStatus
Maybe ImportDestination
processedRecordsCount :: Maybe Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
importDestination :: Maybe ImportDestination
failedRecordsCount :: Maybe Int
createdTimestamp :: Maybe POSIX
$sel:processedRecordsCount:ImportJobSummary' :: ImportJobSummary -> Maybe Int
$sel:jobStatus:ImportJobSummary' :: ImportJobSummary -> Maybe JobStatus
$sel:jobId:ImportJobSummary' :: ImportJobSummary -> Maybe Text
$sel:importDestination:ImportJobSummary' :: ImportJobSummary -> Maybe ImportDestination
$sel:failedRecordsCount:ImportJobSummary' :: ImportJobSummary -> Maybe Int
$sel:createdTimestamp:ImportJobSummary' :: ImportJobSummary -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
createdTimestamp
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
failedRecordsCount
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImportDestination
importDestination
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe JobStatus
jobStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
processedRecordsCount
instance Prelude.NFData ImportJobSummary where
rnf :: ImportJobSummary -> ()
rnf ImportJobSummary' {Maybe Int
Maybe Text
Maybe POSIX
Maybe JobStatus
Maybe ImportDestination
processedRecordsCount :: Maybe Int
jobStatus :: Maybe JobStatus
jobId :: Maybe Text
importDestination :: Maybe ImportDestination
failedRecordsCount :: Maybe Int
createdTimestamp :: Maybe POSIX
$sel:processedRecordsCount:ImportJobSummary' :: ImportJobSummary -> Maybe Int
$sel:jobStatus:ImportJobSummary' :: ImportJobSummary -> Maybe JobStatus
$sel:jobId:ImportJobSummary' :: ImportJobSummary -> Maybe Text
$sel:importDestination:ImportJobSummary' :: ImportJobSummary -> Maybe ImportDestination
$sel:failedRecordsCount:ImportJobSummary' :: ImportJobSummary -> Maybe Int
$sel:createdTimestamp:ImportJobSummary' :: ImportJobSummary -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
createdTimestamp
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
failedRecordsCount
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportDestination
importDestination
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
jobId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe JobStatus
jobStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
processedRecordsCount