{-# 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.DynamoDB.Types.ImportSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DynamoDB.Types.AttributeValue
import Amazonka.DynamoDB.Types.ImportStatus
import Amazonka.DynamoDB.Types.InputFormat
import Amazonka.DynamoDB.Types.S3BucketSource
import Amazonka.DynamoDB.Types.WriteRequest
import qualified Amazonka.Prelude as Prelude
data ImportSummary = ImportSummary'
{
ImportSummary -> Maybe Text
cloudWatchLogGroupArn :: Prelude.Maybe Prelude.Text,
ImportSummary -> Maybe POSIX
endTime :: Prelude.Maybe Data.POSIX,
ImportSummary -> Maybe Text
importArn :: Prelude.Maybe Prelude.Text,
ImportSummary -> Maybe ImportStatus
importStatus :: Prelude.Maybe ImportStatus,
ImportSummary -> Maybe InputFormat
inputFormat :: Prelude.Maybe InputFormat,
ImportSummary -> Maybe S3BucketSource
s3BucketSource :: Prelude.Maybe S3BucketSource,
ImportSummary -> Maybe POSIX
startTime :: Prelude.Maybe Data.POSIX,
ImportSummary -> Maybe Text
tableArn :: Prelude.Maybe Prelude.Text
}
deriving (ImportSummary -> ImportSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportSummary -> ImportSummary -> Bool
$c/= :: ImportSummary -> ImportSummary -> Bool
== :: ImportSummary -> ImportSummary -> Bool
$c== :: ImportSummary -> ImportSummary -> Bool
Prelude.Eq, ReadPrec [ImportSummary]
ReadPrec ImportSummary
Int -> ReadS ImportSummary
ReadS [ImportSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportSummary]
$creadListPrec :: ReadPrec [ImportSummary]
readPrec :: ReadPrec ImportSummary
$creadPrec :: ReadPrec ImportSummary
readList :: ReadS [ImportSummary]
$creadList :: ReadS [ImportSummary]
readsPrec :: Int -> ReadS ImportSummary
$creadsPrec :: Int -> ReadS ImportSummary
Prelude.Read, Int -> ImportSummary -> ShowS
[ImportSummary] -> ShowS
ImportSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportSummary] -> ShowS
$cshowList :: [ImportSummary] -> ShowS
show :: ImportSummary -> String
$cshow :: ImportSummary -> String
showsPrec :: Int -> ImportSummary -> ShowS
$cshowsPrec :: Int -> ImportSummary -> ShowS
Prelude.Show, forall x. Rep ImportSummary x -> ImportSummary
forall x. ImportSummary -> Rep ImportSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportSummary x -> ImportSummary
$cfrom :: forall x. ImportSummary -> Rep ImportSummary x
Prelude.Generic)
newImportSummary ::
ImportSummary
newImportSummary :: ImportSummary
newImportSummary =
ImportSummary'
{ $sel:cloudWatchLogGroupArn:ImportSummary' :: Maybe Text
cloudWatchLogGroupArn =
forall a. Maybe a
Prelude.Nothing,
$sel:endTime:ImportSummary' :: Maybe POSIX
endTime = forall a. Maybe a
Prelude.Nothing,
$sel:importArn:ImportSummary' :: Maybe Text
importArn = forall a. Maybe a
Prelude.Nothing,
$sel:importStatus:ImportSummary' :: Maybe ImportStatus
importStatus = forall a. Maybe a
Prelude.Nothing,
$sel:inputFormat:ImportSummary' :: Maybe InputFormat
inputFormat = forall a. Maybe a
Prelude.Nothing,
$sel:s3BucketSource:ImportSummary' :: Maybe S3BucketSource
s3BucketSource = forall a. Maybe a
Prelude.Nothing,
$sel:startTime:ImportSummary' :: Maybe POSIX
startTime = forall a. Maybe a
Prelude.Nothing,
$sel:tableArn:ImportSummary' :: Maybe Text
tableArn = forall a. Maybe a
Prelude.Nothing
}
importSummary_cloudWatchLogGroupArn :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.Text)
importSummary_cloudWatchLogGroupArn :: Lens' ImportSummary (Maybe Text)
importSummary_cloudWatchLogGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe Text
cloudWatchLogGroupArn :: Maybe Text
$sel:cloudWatchLogGroupArn:ImportSummary' :: ImportSummary -> Maybe Text
cloudWatchLogGroupArn} -> Maybe Text
cloudWatchLogGroupArn) (\s :: ImportSummary
s@ImportSummary' {} Maybe Text
a -> ImportSummary
s {$sel:cloudWatchLogGroupArn:ImportSummary' :: Maybe Text
cloudWatchLogGroupArn = Maybe Text
a} :: ImportSummary)
importSummary_endTime :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.UTCTime)
importSummary_endTime :: Lens' ImportSummary (Maybe UTCTime)
importSummary_endTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe POSIX
endTime :: Maybe POSIX
$sel:endTime:ImportSummary' :: ImportSummary -> Maybe POSIX
endTime} -> Maybe POSIX
endTime) (\s :: ImportSummary
s@ImportSummary' {} Maybe POSIX
a -> ImportSummary
s {$sel:endTime:ImportSummary' :: Maybe POSIX
endTime = Maybe POSIX
a} :: ImportSummary) 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
importSummary_importArn :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.Text)
importSummary_importArn :: Lens' ImportSummary (Maybe Text)
importSummary_importArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe Text
importArn :: Maybe Text
$sel:importArn:ImportSummary' :: ImportSummary -> Maybe Text
importArn} -> Maybe Text
importArn) (\s :: ImportSummary
s@ImportSummary' {} Maybe Text
a -> ImportSummary
s {$sel:importArn:ImportSummary' :: Maybe Text
importArn = Maybe Text
a} :: ImportSummary)
importSummary_importStatus :: Lens.Lens' ImportSummary (Prelude.Maybe ImportStatus)
importSummary_importStatus :: Lens' ImportSummary (Maybe ImportStatus)
importSummary_importStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe ImportStatus
importStatus :: Maybe ImportStatus
$sel:importStatus:ImportSummary' :: ImportSummary -> Maybe ImportStatus
importStatus} -> Maybe ImportStatus
importStatus) (\s :: ImportSummary
s@ImportSummary' {} Maybe ImportStatus
a -> ImportSummary
s {$sel:importStatus:ImportSummary' :: Maybe ImportStatus
importStatus = Maybe ImportStatus
a} :: ImportSummary)
importSummary_inputFormat :: Lens.Lens' ImportSummary (Prelude.Maybe InputFormat)
importSummary_inputFormat :: Lens' ImportSummary (Maybe InputFormat)
importSummary_inputFormat = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe InputFormat
inputFormat :: Maybe InputFormat
$sel:inputFormat:ImportSummary' :: ImportSummary -> Maybe InputFormat
inputFormat} -> Maybe InputFormat
inputFormat) (\s :: ImportSummary
s@ImportSummary' {} Maybe InputFormat
a -> ImportSummary
s {$sel:inputFormat:ImportSummary' :: Maybe InputFormat
inputFormat = Maybe InputFormat
a} :: ImportSummary)
importSummary_s3BucketSource :: Lens.Lens' ImportSummary (Prelude.Maybe S3BucketSource)
importSummary_s3BucketSource :: Lens' ImportSummary (Maybe S3BucketSource)
importSummary_s3BucketSource = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe S3BucketSource
s3BucketSource :: Maybe S3BucketSource
$sel:s3BucketSource:ImportSummary' :: ImportSummary -> Maybe S3BucketSource
s3BucketSource} -> Maybe S3BucketSource
s3BucketSource) (\s :: ImportSummary
s@ImportSummary' {} Maybe S3BucketSource
a -> ImportSummary
s {$sel:s3BucketSource:ImportSummary' :: Maybe S3BucketSource
s3BucketSource = Maybe S3BucketSource
a} :: ImportSummary)
importSummary_startTime :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.UTCTime)
importSummary_startTime :: Lens' ImportSummary (Maybe UTCTime)
importSummary_startTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe POSIX
startTime :: Maybe POSIX
$sel:startTime:ImportSummary' :: ImportSummary -> Maybe POSIX
startTime} -> Maybe POSIX
startTime) (\s :: ImportSummary
s@ImportSummary' {} Maybe POSIX
a -> ImportSummary
s {$sel:startTime:ImportSummary' :: Maybe POSIX
startTime = Maybe POSIX
a} :: ImportSummary) 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
importSummary_tableArn :: Lens.Lens' ImportSummary (Prelude.Maybe Prelude.Text)
importSummary_tableArn :: Lens' ImportSummary (Maybe Text)
importSummary_tableArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportSummary' {Maybe Text
tableArn :: Maybe Text
$sel:tableArn:ImportSummary' :: ImportSummary -> Maybe Text
tableArn} -> Maybe Text
tableArn) (\s :: ImportSummary
s@ImportSummary' {} Maybe Text
a -> ImportSummary
s {$sel:tableArn:ImportSummary' :: Maybe Text
tableArn = Maybe Text
a} :: ImportSummary)
instance Data.FromJSON ImportSummary where
parseJSON :: Value -> Parser ImportSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ImportSummary"
( \Object
x ->
Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe ImportStatus
-> Maybe InputFormat
-> Maybe S3BucketSource
-> Maybe POSIX
-> Maybe Text
-> ImportSummary
ImportSummary'
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
"CloudWatchLogGroupArn")
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
"ImportArn")
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
"ImportStatus")
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
"InputFormat")
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
"S3BucketSource")
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
"TableArn")
)
instance Prelude.Hashable ImportSummary where
hashWithSalt :: Int -> ImportSummary -> Int
hashWithSalt Int
_salt ImportSummary' {Maybe Text
Maybe POSIX
Maybe S3BucketSource
Maybe InputFormat
Maybe ImportStatus
tableArn :: Maybe Text
startTime :: Maybe POSIX
s3BucketSource :: Maybe S3BucketSource
inputFormat :: Maybe InputFormat
importStatus :: Maybe ImportStatus
importArn :: Maybe Text
endTime :: Maybe POSIX
cloudWatchLogGroupArn :: Maybe Text
$sel:tableArn:ImportSummary' :: ImportSummary -> Maybe Text
$sel:startTime:ImportSummary' :: ImportSummary -> Maybe POSIX
$sel:s3BucketSource:ImportSummary' :: ImportSummary -> Maybe S3BucketSource
$sel:inputFormat:ImportSummary' :: ImportSummary -> Maybe InputFormat
$sel:importStatus:ImportSummary' :: ImportSummary -> Maybe ImportStatus
$sel:importArn:ImportSummary' :: ImportSummary -> Maybe Text
$sel:endTime:ImportSummary' :: ImportSummary -> Maybe POSIX
$sel:cloudWatchLogGroupArn:ImportSummary' :: ImportSummary -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cloudWatchLogGroupArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
endTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
importArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImportStatus
importStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InputFormat
inputFormat
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe S3BucketSource
s3BucketSource
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
startTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tableArn
instance Prelude.NFData ImportSummary where
rnf :: ImportSummary -> ()
rnf ImportSummary' {Maybe Text
Maybe POSIX
Maybe S3BucketSource
Maybe InputFormat
Maybe ImportStatus
tableArn :: Maybe Text
startTime :: Maybe POSIX
s3BucketSource :: Maybe S3BucketSource
inputFormat :: Maybe InputFormat
importStatus :: Maybe ImportStatus
importArn :: Maybe Text
endTime :: Maybe POSIX
cloudWatchLogGroupArn :: Maybe Text
$sel:tableArn:ImportSummary' :: ImportSummary -> Maybe Text
$sel:startTime:ImportSummary' :: ImportSummary -> Maybe POSIX
$sel:s3BucketSource:ImportSummary' :: ImportSummary -> Maybe S3BucketSource
$sel:inputFormat:ImportSummary' :: ImportSummary -> Maybe InputFormat
$sel:importStatus:ImportSummary' :: ImportSummary -> Maybe ImportStatus
$sel:importArn:ImportSummary' :: ImportSummary -> Maybe Text
$sel:endTime:ImportSummary' :: ImportSummary -> Maybe POSIX
$sel:cloudWatchLogGroupArn:ImportSummary' :: ImportSummary -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudWatchLogGroupArn
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
importArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ImportStatus
importStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InputFormat
inputFormat
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe S3BucketSource
s3BucketSource
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 Text
tableArn