{-# 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.Pinpoint.Types.ImportJobResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.ImportJobResource
import Amazonka.Pinpoint.Types.JobStatus
import qualified Amazonka.Prelude as Prelude
data ImportJobResponse = ImportJobResponse'
{
ImportJobResponse -> Maybe Int
completedPieces :: Prelude.Maybe Prelude.Int,
ImportJobResponse -> Maybe Int
failedPieces :: Prelude.Maybe Prelude.Int,
ImportJobResponse -> Maybe Int
totalProcessed :: Prelude.Maybe Prelude.Int,
ImportJobResponse -> Maybe [Text]
failures :: Prelude.Maybe [Prelude.Text],
ImportJobResponse -> Maybe Int
totalPieces :: Prelude.Maybe Prelude.Int,
ImportJobResponse -> Maybe Text
completionDate :: Prelude.Maybe Prelude.Text,
ImportJobResponse -> Maybe Int
totalFailures :: Prelude.Maybe Prelude.Int,
ImportJobResponse -> JobStatus
jobStatus :: JobStatus,
ImportJobResponse -> Text
creationDate :: Prelude.Text,
ImportJobResponse -> Text
type' :: Prelude.Text,
ImportJobResponse -> ImportJobResource
definition :: ImportJobResource,
ImportJobResponse -> Text
id :: Prelude.Text,
ImportJobResponse -> Text
applicationId :: Prelude.Text
}
deriving (ImportJobResponse -> ImportJobResponse -> Bool
(ImportJobResponse -> ImportJobResponse -> Bool)
-> (ImportJobResponse -> ImportJobResponse -> Bool)
-> Eq ImportJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportJobResponse -> ImportJobResponse -> Bool
$c/= :: ImportJobResponse -> ImportJobResponse -> Bool
== :: ImportJobResponse -> ImportJobResponse -> Bool
$c== :: ImportJobResponse -> ImportJobResponse -> Bool
Prelude.Eq, ReadPrec [ImportJobResponse]
ReadPrec ImportJobResponse
Int -> ReadS ImportJobResponse
ReadS [ImportJobResponse]
(Int -> ReadS ImportJobResponse)
-> ReadS [ImportJobResponse]
-> ReadPrec ImportJobResponse
-> ReadPrec [ImportJobResponse]
-> Read ImportJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportJobResponse]
$creadListPrec :: ReadPrec [ImportJobResponse]
readPrec :: ReadPrec ImportJobResponse
$creadPrec :: ReadPrec ImportJobResponse
readList :: ReadS [ImportJobResponse]
$creadList :: ReadS [ImportJobResponse]
readsPrec :: Int -> ReadS ImportJobResponse
$creadsPrec :: Int -> ReadS ImportJobResponse
Prelude.Read, Int -> ImportJobResponse -> ShowS
[ImportJobResponse] -> ShowS
ImportJobResponse -> String
(Int -> ImportJobResponse -> ShowS)
-> (ImportJobResponse -> String)
-> ([ImportJobResponse] -> ShowS)
-> Show ImportJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportJobResponse] -> ShowS
$cshowList :: [ImportJobResponse] -> ShowS
show :: ImportJobResponse -> String
$cshow :: ImportJobResponse -> String
showsPrec :: Int -> ImportJobResponse -> ShowS
$cshowsPrec :: Int -> ImportJobResponse -> ShowS
Prelude.Show, (forall x. ImportJobResponse -> Rep ImportJobResponse x)
-> (forall x. Rep ImportJobResponse x -> ImportJobResponse)
-> Generic ImportJobResponse
forall x. Rep ImportJobResponse x -> ImportJobResponse
forall x. ImportJobResponse -> Rep ImportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportJobResponse x -> ImportJobResponse
$cfrom :: forall x. ImportJobResponse -> Rep ImportJobResponse x
Prelude.Generic)
newImportJobResponse ::
JobStatus ->
Prelude.Text ->
Prelude.Text ->
ImportJobResource ->
Prelude.Text ->
Prelude.Text ->
ImportJobResponse
newImportJobResponse :: JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse
newImportJobResponse
JobStatus
pJobStatus_
Text
pCreationDate_
Text
pType_
ImportJobResource
pDefinition_
Text
pId_
Text
pApplicationId_ =
ImportJobResponse' :: Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse
ImportJobResponse'
{ $sel:completedPieces:ImportJobResponse' :: Maybe Int
completedPieces =
Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:failedPieces:ImportJobResponse' :: Maybe Int
failedPieces = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:totalProcessed:ImportJobResponse' :: Maybe Int
totalProcessed = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:failures:ImportJobResponse' :: Maybe [Text]
failures = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:totalPieces:ImportJobResponse' :: Maybe Int
totalPieces = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:completionDate:ImportJobResponse' :: Maybe Text
completionDate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:totalFailures:ImportJobResponse' :: Maybe Int
totalFailures = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:jobStatus:ImportJobResponse' :: JobStatus
jobStatus = JobStatus
pJobStatus_,
$sel:creationDate:ImportJobResponse' :: Text
creationDate = Text
pCreationDate_,
$sel:type':ImportJobResponse' :: Text
type' = Text
pType_,
$sel:definition:ImportJobResponse' :: ImportJobResource
definition = ImportJobResource
pDefinition_,
$sel:id:ImportJobResponse' :: Text
id = Text
pId_,
$sel:applicationId:ImportJobResponse' :: Text
applicationId = Text
pApplicationId_
}
importJobResponse_completedPieces :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_completedPieces :: (Maybe Int -> f (Maybe Int))
-> ImportJobResponse -> f ImportJobResponse
importJobResponse_completedPieces = (ImportJobResponse -> Maybe Int)
-> (ImportJobResponse -> Maybe Int -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
completedPieces :: Maybe Int
$sel:completedPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
completedPieces} -> Maybe Int
completedPieces) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:completedPieces:ImportJobResponse' :: Maybe Int
completedPieces = Maybe Int
a} :: ImportJobResponse)
importJobResponse_failedPieces :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_failedPieces :: (Maybe Int -> f (Maybe Int))
-> ImportJobResponse -> f ImportJobResponse
importJobResponse_failedPieces = (ImportJobResponse -> Maybe Int)
-> (ImportJobResponse -> Maybe Int -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
failedPieces :: Maybe Int
$sel:failedPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
failedPieces} -> Maybe Int
failedPieces) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:failedPieces:ImportJobResponse' :: Maybe Int
failedPieces = Maybe Int
a} :: ImportJobResponse)
importJobResponse_totalProcessed :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_totalProcessed :: (Maybe Int -> f (Maybe Int))
-> ImportJobResponse -> f ImportJobResponse
importJobResponse_totalProcessed = (ImportJobResponse -> Maybe Int)
-> (ImportJobResponse -> Maybe Int -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
totalProcessed :: Maybe Int
$sel:totalProcessed:ImportJobResponse' :: ImportJobResponse -> Maybe Int
totalProcessed} -> Maybe Int
totalProcessed) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:totalProcessed:ImportJobResponse' :: Maybe Int
totalProcessed = Maybe Int
a} :: ImportJobResponse)
importJobResponse_failures :: Lens.Lens' ImportJobResponse (Prelude.Maybe [Prelude.Text])
importJobResponse_failures :: (Maybe [Text] -> f (Maybe [Text]))
-> ImportJobResponse -> f ImportJobResponse
importJobResponse_failures = (ImportJobResponse -> Maybe [Text])
-> (ImportJobResponse -> Maybe [Text] -> ImportJobResponse)
-> Lens
ImportJobResponse ImportJobResponse (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe [Text]
failures :: Maybe [Text]
$sel:failures:ImportJobResponse' :: ImportJobResponse -> Maybe [Text]
failures} -> Maybe [Text]
failures) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe [Text]
a -> ImportJobResponse
s {$sel:failures:ImportJobResponse' :: Maybe [Text]
failures = Maybe [Text]
a} :: ImportJobResponse) ((Maybe [Text] -> f (Maybe [Text]))
-> ImportJobResponse -> f ImportJobResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ImportJobResponse
-> f ImportJobResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
importJobResponse_totalPieces :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_totalPieces :: (Maybe Int -> f (Maybe Int))
-> ImportJobResponse -> f ImportJobResponse
importJobResponse_totalPieces = (ImportJobResponse -> Maybe Int)
-> (ImportJobResponse -> Maybe Int -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
totalPieces :: Maybe Int
$sel:totalPieces:ImportJobResponse' :: ImportJobResponse -> Maybe Int
totalPieces} -> Maybe Int
totalPieces) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:totalPieces:ImportJobResponse' :: Maybe Int
totalPieces = Maybe Int
a} :: ImportJobResponse)
importJobResponse_completionDate :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Text)
importJobResponse_completionDate :: (Maybe Text -> f (Maybe Text))
-> ImportJobResponse -> f ImportJobResponse
importJobResponse_completionDate = (ImportJobResponse -> Maybe Text)
-> (ImportJobResponse -> Maybe Text -> ImportJobResponse)
-> Lens
ImportJobResponse ImportJobResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Text
completionDate :: Maybe Text
$sel:completionDate:ImportJobResponse' :: ImportJobResponse -> Maybe Text
completionDate} -> Maybe Text
completionDate) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Text
a -> ImportJobResponse
s {$sel:completionDate:ImportJobResponse' :: Maybe Text
completionDate = Maybe Text
a} :: ImportJobResponse)
importJobResponse_totalFailures :: Lens.Lens' ImportJobResponse (Prelude.Maybe Prelude.Int)
importJobResponse_totalFailures :: (Maybe Int -> f (Maybe Int))
-> ImportJobResponse -> f ImportJobResponse
importJobResponse_totalFailures = (ImportJobResponse -> Maybe Int)
-> (ImportJobResponse -> Maybe Int -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Maybe Int
totalFailures :: Maybe Int
$sel:totalFailures:ImportJobResponse' :: ImportJobResponse -> Maybe Int
totalFailures} -> Maybe Int
totalFailures) (\s :: ImportJobResponse
s@ImportJobResponse' {} Maybe Int
a -> ImportJobResponse
s {$sel:totalFailures:ImportJobResponse' :: Maybe Int
totalFailures = Maybe Int
a} :: ImportJobResponse)
importJobResponse_jobStatus :: Lens.Lens' ImportJobResponse JobStatus
importJobResponse_jobStatus :: (JobStatus -> f JobStatus)
-> ImportJobResponse -> f ImportJobResponse
importJobResponse_jobStatus = (ImportJobResponse -> JobStatus)
-> (ImportJobResponse -> JobStatus -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse JobStatus JobStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {JobStatus
jobStatus :: JobStatus
$sel:jobStatus:ImportJobResponse' :: ImportJobResponse -> JobStatus
jobStatus} -> JobStatus
jobStatus) (\s :: ImportJobResponse
s@ImportJobResponse' {} JobStatus
a -> ImportJobResponse
s {$sel:jobStatus:ImportJobResponse' :: JobStatus
jobStatus = JobStatus
a} :: ImportJobResponse)
importJobResponse_creationDate :: Lens.Lens' ImportJobResponse Prelude.Text
importJobResponse_creationDate :: (Text -> f Text) -> ImportJobResponse -> f ImportJobResponse
importJobResponse_creationDate = (ImportJobResponse -> Text)
-> (ImportJobResponse -> Text -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Text
creationDate :: Text
$sel:creationDate:ImportJobResponse' :: ImportJobResponse -> Text
creationDate} -> Text
creationDate) (\s :: ImportJobResponse
s@ImportJobResponse' {} Text
a -> ImportJobResponse
s {$sel:creationDate:ImportJobResponse' :: Text
creationDate = Text
a} :: ImportJobResponse)
importJobResponse_type :: Lens.Lens' ImportJobResponse Prelude.Text
importJobResponse_type :: (Text -> f Text) -> ImportJobResponse -> f ImportJobResponse
importJobResponse_type = (ImportJobResponse -> Text)
-> (ImportJobResponse -> Text -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Text
type' :: Text
$sel:type':ImportJobResponse' :: ImportJobResponse -> Text
type'} -> Text
type') (\s :: ImportJobResponse
s@ImportJobResponse' {} Text
a -> ImportJobResponse
s {$sel:type':ImportJobResponse' :: Text
type' = Text
a} :: ImportJobResponse)
importJobResponse_definition :: Lens.Lens' ImportJobResponse ImportJobResource
importJobResponse_definition :: (ImportJobResource -> f ImportJobResource)
-> ImportJobResponse -> f ImportJobResponse
importJobResponse_definition = (ImportJobResponse -> ImportJobResource)
-> (ImportJobResponse -> ImportJobResource -> ImportJobResponse)
-> Lens
ImportJobResponse
ImportJobResponse
ImportJobResource
ImportJobResource
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {ImportJobResource
definition :: ImportJobResource
$sel:definition:ImportJobResponse' :: ImportJobResponse -> ImportJobResource
definition} -> ImportJobResource
definition) (\s :: ImportJobResponse
s@ImportJobResponse' {} ImportJobResource
a -> ImportJobResponse
s {$sel:definition:ImportJobResponse' :: ImportJobResource
definition = ImportJobResource
a} :: ImportJobResponse)
importJobResponse_id :: Lens.Lens' ImportJobResponse Prelude.Text
importJobResponse_id :: (Text -> f Text) -> ImportJobResponse -> f ImportJobResponse
importJobResponse_id = (ImportJobResponse -> Text)
-> (ImportJobResponse -> Text -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Text
id :: Text
$sel:id:ImportJobResponse' :: ImportJobResponse -> Text
id} -> Text
id) (\s :: ImportJobResponse
s@ImportJobResponse' {} Text
a -> ImportJobResponse
s {$sel:id:ImportJobResponse' :: Text
id = Text
a} :: ImportJobResponse)
importJobResponse_applicationId :: Lens.Lens' ImportJobResponse Prelude.Text
importJobResponse_applicationId :: (Text -> f Text) -> ImportJobResponse -> f ImportJobResponse
importJobResponse_applicationId = (ImportJobResponse -> Text)
-> (ImportJobResponse -> Text -> ImportJobResponse)
-> Lens ImportJobResponse ImportJobResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobResponse' {Text
applicationId :: Text
$sel:applicationId:ImportJobResponse' :: ImportJobResponse -> Text
applicationId} -> Text
applicationId) (\s :: ImportJobResponse
s@ImportJobResponse' {} Text
a -> ImportJobResponse
s {$sel:applicationId:ImportJobResponse' :: Text
applicationId = Text
a} :: ImportJobResponse)
instance Core.FromJSON ImportJobResponse where
parseJSON :: Value -> Parser ImportJobResponse
parseJSON =
String
-> (Object -> Parser ImportJobResponse)
-> Value
-> Parser ImportJobResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ImportJobResponse"
( \Object
x ->
Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse
ImportJobResponse'
(Maybe Int
-> Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CompletedPieces")
Parser
(Maybe Int
-> Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FailedPieces")
Parser
(Maybe Int
-> Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TotalProcessed")
Parser
(Maybe [Text]
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
-> Parser (Maybe [Text])
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Failures" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Int
-> Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TotalPieces")
Parser
(Maybe Text
-> Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
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
"CompletionDate")
Parser
(Maybe Int
-> JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
-> Parser (Maybe Int)
-> Parser
(JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TotalFailures")
Parser
(JobStatus
-> Text
-> Text
-> ImportJobResource
-> Text
-> Text
-> ImportJobResponse)
-> Parser JobStatus
-> Parser
(Text
-> Text -> ImportJobResource -> Text -> Text -> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser JobStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"JobStatus")
Parser
(Text
-> Text -> ImportJobResource -> Text -> Text -> ImportJobResponse)
-> Parser Text
-> Parser
(Text -> ImportJobResource -> Text -> Text -> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationDate")
Parser
(Text -> ImportJobResource -> Text -> Text -> ImportJobResponse)
-> Parser Text
-> Parser (ImportJobResource -> Text -> Text -> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Type")
Parser (ImportJobResource -> Text -> Text -> ImportJobResponse)
-> Parser ImportJobResource
-> Parser (Text -> Text -> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ImportJobResource
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Definition")
Parser (Text -> Text -> ImportJobResponse)
-> Parser Text -> Parser (Text -> ImportJobResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Id")
Parser (Text -> ImportJobResponse)
-> Parser Text -> Parser ImportJobResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ApplicationId")
)
instance Prelude.Hashable ImportJobResponse
instance Prelude.NFData ImportJobResponse