{-# 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.WorkMail.Types.MailboxExportJob 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.WorkMail.Types.MailboxExportJobState
data MailboxExportJob = MailboxExportJob'
{
MailboxExportJob -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
MailboxExportJob -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
MailboxExportJob -> Maybe Text
entityId :: Prelude.Maybe Prelude.Text,
MailboxExportJob -> Maybe Natural
estimatedProgress :: Prelude.Maybe Prelude.Natural,
MailboxExportJob -> Maybe Text
jobId :: Prelude.Maybe Prelude.Text,
MailboxExportJob -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text,
MailboxExportJob -> Maybe Text
s3Path :: Prelude.Maybe Prelude.Text,
MailboxExportJob -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
MailboxExportJob -> Maybe MailboxExportJobState
state :: Prelude.Maybe MailboxExportJobState
}
deriving (MailboxExportJob -> MailboxExportJob -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MailboxExportJob -> MailboxExportJob -> Bool
$c/= :: MailboxExportJob -> MailboxExportJob -> Bool
== :: MailboxExportJob -> MailboxExportJob -> Bool
$c== :: MailboxExportJob -> MailboxExportJob -> Bool
Prelude.Eq, ReadPrec [MailboxExportJob]
ReadPrec MailboxExportJob
Int -> ReadS MailboxExportJob
ReadS [MailboxExportJob]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MailboxExportJob]
$creadListPrec :: ReadPrec [MailboxExportJob]
readPrec :: ReadPrec MailboxExportJob
$creadPrec :: ReadPrec MailboxExportJob
readList :: ReadS [MailboxExportJob]
$creadList :: ReadS [MailboxExportJob]
readsPrec :: Int -> ReadS MailboxExportJob
$creadsPrec :: Int -> ReadS MailboxExportJob
Prelude.Read, Int -> MailboxExportJob -> ShowS
[MailboxExportJob] -> ShowS
MailboxExportJob -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MailboxExportJob] -> ShowS
$cshowList :: [MailboxExportJob] -> ShowS
show :: MailboxExportJob -> String
$cshow :: MailboxExportJob -> String
showsPrec :: Int -> MailboxExportJob -> ShowS
$cshowsPrec :: Int -> MailboxExportJob -> ShowS
Prelude.Show, forall x. Rep MailboxExportJob x -> MailboxExportJob
forall x. MailboxExportJob -> Rep MailboxExportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MailboxExportJob x -> MailboxExportJob
$cfrom :: forall x. MailboxExportJob -> Rep MailboxExportJob x
Prelude.Generic)
newMailboxExportJob ::
MailboxExportJob
newMailboxExportJob :: MailboxExportJob
newMailboxExportJob =
MailboxExportJob'
{ $sel:description:MailboxExportJob' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:endTime:MailboxExportJob' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
$sel:entityId:MailboxExportJob' :: Maybe Text
entityId = forall a. Maybe a
Prelude.Nothing,
$sel:estimatedProgress:MailboxExportJob' :: Maybe Natural
estimatedProgress = forall a. Maybe a
Prelude.Nothing,
$sel:jobId:MailboxExportJob' :: Maybe Text
jobId = forall a. Maybe a
Prelude.Nothing,
$sel:s3BucketName:MailboxExportJob' :: Maybe Text
s3BucketName = forall a. Maybe a
Prelude.Nothing,
$sel:s3Path:MailboxExportJob' :: Maybe Text
s3Path = forall a. Maybe a
Prelude.Nothing,
$sel:startTime:MailboxExportJob' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
$sel:state:MailboxExportJob' :: Maybe MailboxExportJobState
state = forall a. Maybe a
Prelude.Nothing
}
mailboxExportJob_description :: Lens.Lens' MailboxExportJob (Prelude.Maybe Prelude.Text)
mailboxExportJob_description :: Lens' MailboxExportJob (Maybe Text)
mailboxExportJob_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailboxExportJob' {Maybe Text
description :: Maybe Text
$sel:description:MailboxExportJob' :: MailboxExportJob -> Maybe Text
description} -> Maybe Text
description) (\s :: MailboxExportJob
s@MailboxExportJob' {} Maybe Text
a -> MailboxExportJob
s {$sel:description:MailboxExportJob' :: Maybe Text
description = Maybe Text
a} :: MailboxExportJob)
mailboxExportJob_endTime :: Lens.Lens' MailboxExportJob (Prelude.Maybe Prelude.UTCTime)
mailboxExportJob_endTime :: Lens' MailboxExportJob (Maybe UTCTime)
mailboxExportJob_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailboxExportJob' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:MailboxExportJob' :: MailboxExportJob -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: MailboxExportJob
s@MailboxExportJob' {} Maybe POSIX
a -> MailboxExportJob
s {$sel:endTime:MailboxExportJob' :: Maybe POSIX
endTime = Maybe POSIX
a} :: MailboxExportJob) 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
mailboxExportJob_entityId :: Lens.Lens' MailboxExportJob (Prelude.Maybe Prelude.Text)
mailboxExportJob_entityId :: Lens' MailboxExportJob (Maybe Text)
mailboxExportJob_entityId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailboxExportJob' {Maybe Text
entityId :: Maybe Text
$sel:entityId:MailboxExportJob' :: MailboxExportJob -> Maybe Text
entityId} -> Maybe Text
entityId) (\s :: MailboxExportJob
s@MailboxExportJob' {} Maybe Text
a -> MailboxExportJob
s {$sel:entityId:MailboxExportJob' :: Maybe Text
entityId = Maybe Text
a} :: MailboxExportJob)
mailboxExportJob_estimatedProgress :: Lens.Lens' MailboxExportJob (Prelude.Maybe Prelude.Natural)
mailboxExportJob_estimatedProgress :: Lens' MailboxExportJob (Maybe Natural)
mailboxExportJob_estimatedProgress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailboxExportJob' {Maybe Natural
estimatedProgress :: Maybe Natural
$sel:estimatedProgress:MailboxExportJob' :: MailboxExportJob -> Maybe Natural
estimatedProgress} -> Maybe Natural
estimatedProgress) (\s :: MailboxExportJob
s@MailboxExportJob' {} Maybe Natural
a -> MailboxExportJob
s {$sel:estimatedProgress:MailboxExportJob' :: Maybe Natural
estimatedProgress = Maybe Natural
a} :: MailboxExportJob)
mailboxExportJob_jobId :: Lens.Lens' MailboxExportJob (Prelude.Maybe Prelude.Text)
mailboxExportJob_jobId :: Lens' MailboxExportJob (Maybe Text)
mailboxExportJob_jobId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailboxExportJob' {Maybe Text
jobId :: Maybe Text
$sel:jobId:MailboxExportJob' :: MailboxExportJob -> Maybe Text
jobId} -> Maybe Text
jobId) (\s :: MailboxExportJob
s@MailboxExportJob' {} Maybe Text
a -> MailboxExportJob
s {$sel:jobId:MailboxExportJob' :: Maybe Text
jobId = Maybe Text
a} :: MailboxExportJob)
mailboxExportJob_s3BucketName :: Lens.Lens' MailboxExportJob (Prelude.Maybe Prelude.Text)
mailboxExportJob_s3BucketName :: Lens' MailboxExportJob (Maybe Text)
mailboxExportJob_s3BucketName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailboxExportJob' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:MailboxExportJob' :: MailboxExportJob -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: MailboxExportJob
s@MailboxExportJob' {} Maybe Text
a -> MailboxExportJob
s {$sel:s3BucketName:MailboxExportJob' :: Maybe Text
s3BucketName = Maybe Text
a} :: MailboxExportJob)
mailboxExportJob_s3Path :: Lens.Lens' MailboxExportJob (Prelude.Maybe Prelude.Text)
mailboxExportJob_s3Path :: Lens' MailboxExportJob (Maybe Text)
mailboxExportJob_s3Path = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailboxExportJob' {Maybe Text
s3Path :: Maybe Text
$sel:s3Path:MailboxExportJob' :: MailboxExportJob -> Maybe Text
s3Path} -> Maybe Text
s3Path) (\s :: MailboxExportJob
s@MailboxExportJob' {} Maybe Text
a -> MailboxExportJob
s {$sel:s3Path:MailboxExportJob' :: Maybe Text
s3Path = Maybe Text
a} :: MailboxExportJob)
mailboxExportJob_startTime :: Lens.Lens' MailboxExportJob (Prelude.Maybe Prelude.UTCTime)
mailboxExportJob_startTime :: Lens' MailboxExportJob (Maybe UTCTime)
mailboxExportJob_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailboxExportJob' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:MailboxExportJob' :: MailboxExportJob -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: MailboxExportJob
s@MailboxExportJob' {} Maybe POSIX
a -> MailboxExportJob
s {$sel:startTime:MailboxExportJob' :: Maybe POSIX
startTime = Maybe POSIX
a} :: MailboxExportJob) 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
mailboxExportJob_state :: Lens.Lens' MailboxExportJob (Prelude.Maybe MailboxExportJobState)
mailboxExportJob_state :: Lens' MailboxExportJob (Maybe MailboxExportJobState)
mailboxExportJob_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MailboxExportJob' {Maybe MailboxExportJobState
state :: Maybe MailboxExportJobState
$sel:state:MailboxExportJob' :: MailboxExportJob -> Maybe MailboxExportJobState
state} -> Maybe MailboxExportJobState
state) (\s :: MailboxExportJob
s@MailboxExportJob' {} Maybe MailboxExportJobState
a -> MailboxExportJob
s {$sel:state:MailboxExportJob' :: Maybe MailboxExportJobState
state = Maybe MailboxExportJobState
a} :: MailboxExportJob)
instance Data.FromJSON MailboxExportJob where
parseJSON :: Value -> Parser MailboxExportJob
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"MailboxExportJob"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe MailboxExportJobState
-> MailboxExportJob
MailboxExportJob'
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
"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
"EndTime")
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
"EntityId")
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
"EstimatedProgress")
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
"S3BucketName")
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
"S3Path")
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
"StartTime")
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
"State")
)
instance Prelude.Hashable MailboxExportJob where
hashWithSalt :: Int -> MailboxExportJob -> Int
hashWithSalt Int
_salt MailboxExportJob' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe MailboxExportJobState
state :: Maybe MailboxExportJobState
startTime :: Maybe POSIX
s3Path :: Maybe Text
s3BucketName :: Maybe Text
jobId :: Maybe Text
estimatedProgress :: Maybe Natural
entityId :: Maybe Text
endTime :: Maybe POSIX
description :: Maybe Text
$sel:state:MailboxExportJob' :: MailboxExportJob -> Maybe MailboxExportJobState
$sel:startTime:MailboxExportJob' :: MailboxExportJob -> Maybe POSIX
$sel:s3Path:MailboxExportJob' :: MailboxExportJob -> Maybe Text
$sel:s3BucketName:MailboxExportJob' :: MailboxExportJob -> Maybe Text
$sel:jobId:MailboxExportJob' :: MailboxExportJob -> Maybe Text
$sel:estimatedProgress:MailboxExportJob' :: MailboxExportJob -> Maybe Natural
$sel:entityId:MailboxExportJob' :: MailboxExportJob -> Maybe Text
$sel:endTime:MailboxExportJob' :: MailboxExportJob -> Maybe POSIX
$sel:description:MailboxExportJob' :: MailboxExportJob -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
endTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
entityId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
estimatedProgress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
jobId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3BucketName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3Path
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe MailboxExportJobState
state
instance Prelude.NFData MailboxExportJob where
rnf :: MailboxExportJob -> ()
rnf MailboxExportJob' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe MailboxExportJobState
state :: Maybe MailboxExportJobState
startTime :: Maybe POSIX
s3Path :: Maybe Text
s3BucketName :: Maybe Text
jobId :: Maybe Text
estimatedProgress :: Maybe Natural
entityId :: Maybe Text
endTime :: Maybe POSIX
description :: Maybe Text
$sel:state:MailboxExportJob' :: MailboxExportJob -> Maybe MailboxExportJobState
$sel:startTime:MailboxExportJob' :: MailboxExportJob -> Maybe POSIX
$sel:s3Path:MailboxExportJob' :: MailboxExportJob -> Maybe Text
$sel:s3BucketName:MailboxExportJob' :: MailboxExportJob -> Maybe Text
$sel:jobId:MailboxExportJob' :: MailboxExportJob -> Maybe Text
$sel:estimatedProgress:MailboxExportJob' :: MailboxExportJob -> Maybe Natural
$sel:entityId:MailboxExportJob' :: MailboxExportJob -> Maybe Text
$sel:endTime:MailboxExportJob' :: MailboxExportJob -> Maybe POSIX
$sel:description:MailboxExportJob' :: MailboxExportJob -> Maybe Text
..} =
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 POSIX
endTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
entityId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
estimatedProgress
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 Text
s3BucketName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3Path
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
startTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe MailboxExportJobState
state