{-# 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.ImportJobsResponse where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Pinpoint.Types.ImportJobResponse
import qualified Amazonka.Prelude as Prelude
data ImportJobsResponse = ImportJobsResponse'
{
ImportJobsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ImportJobsResponse -> [ImportJobResponse]
item :: [ImportJobResponse]
}
deriving (ImportJobsResponse -> ImportJobsResponse -> Bool
(ImportJobsResponse -> ImportJobsResponse -> Bool)
-> (ImportJobsResponse -> ImportJobsResponse -> Bool)
-> Eq ImportJobsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportJobsResponse -> ImportJobsResponse -> Bool
$c/= :: ImportJobsResponse -> ImportJobsResponse -> Bool
== :: ImportJobsResponse -> ImportJobsResponse -> Bool
$c== :: ImportJobsResponse -> ImportJobsResponse -> Bool
Prelude.Eq, ReadPrec [ImportJobsResponse]
ReadPrec ImportJobsResponse
Int -> ReadS ImportJobsResponse
ReadS [ImportJobsResponse]
(Int -> ReadS ImportJobsResponse)
-> ReadS [ImportJobsResponse]
-> ReadPrec ImportJobsResponse
-> ReadPrec [ImportJobsResponse]
-> Read ImportJobsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportJobsResponse]
$creadListPrec :: ReadPrec [ImportJobsResponse]
readPrec :: ReadPrec ImportJobsResponse
$creadPrec :: ReadPrec ImportJobsResponse
readList :: ReadS [ImportJobsResponse]
$creadList :: ReadS [ImportJobsResponse]
readsPrec :: Int -> ReadS ImportJobsResponse
$creadsPrec :: Int -> ReadS ImportJobsResponse
Prelude.Read, Int -> ImportJobsResponse -> ShowS
[ImportJobsResponse] -> ShowS
ImportJobsResponse -> String
(Int -> ImportJobsResponse -> ShowS)
-> (ImportJobsResponse -> String)
-> ([ImportJobsResponse] -> ShowS)
-> Show ImportJobsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportJobsResponse] -> ShowS
$cshowList :: [ImportJobsResponse] -> ShowS
show :: ImportJobsResponse -> String
$cshow :: ImportJobsResponse -> String
showsPrec :: Int -> ImportJobsResponse -> ShowS
$cshowsPrec :: Int -> ImportJobsResponse -> ShowS
Prelude.Show, (forall x. ImportJobsResponse -> Rep ImportJobsResponse x)
-> (forall x. Rep ImportJobsResponse x -> ImportJobsResponse)
-> Generic ImportJobsResponse
forall x. Rep ImportJobsResponse x -> ImportJobsResponse
forall x. ImportJobsResponse -> Rep ImportJobsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportJobsResponse x -> ImportJobsResponse
$cfrom :: forall x. ImportJobsResponse -> Rep ImportJobsResponse x
Prelude.Generic)
newImportJobsResponse ::
ImportJobsResponse
newImportJobsResponse :: ImportJobsResponse
newImportJobsResponse =
ImportJobsResponse' :: Maybe Text -> [ImportJobResponse] -> ImportJobsResponse
ImportJobsResponse'
{ $sel:nextToken:ImportJobsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:item:ImportJobsResponse' :: [ImportJobResponse]
item = [ImportJobResponse]
forall a. Monoid a => a
Prelude.mempty
}
importJobsResponse_nextToken :: Lens.Lens' ImportJobsResponse (Prelude.Maybe Prelude.Text)
importJobsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ImportJobsResponse -> f ImportJobsResponse
importJobsResponse_nextToken = (ImportJobsResponse -> Maybe Text)
-> (ImportJobsResponse -> Maybe Text -> ImportJobsResponse)
-> Lens
ImportJobsResponse ImportJobsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ImportJobsResponse' :: ImportJobsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ImportJobsResponse
s@ImportJobsResponse' {} Maybe Text
a -> ImportJobsResponse
s {$sel:nextToken:ImportJobsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ImportJobsResponse)
importJobsResponse_item :: Lens.Lens' ImportJobsResponse [ImportJobResponse]
importJobsResponse_item :: ([ImportJobResponse] -> f [ImportJobResponse])
-> ImportJobsResponse -> f ImportJobsResponse
importJobsResponse_item = (ImportJobsResponse -> [ImportJobResponse])
-> (ImportJobsResponse
-> [ImportJobResponse] -> ImportJobsResponse)
-> Lens
ImportJobsResponse
ImportJobsResponse
[ImportJobResponse]
[ImportJobResponse]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportJobsResponse' {[ImportJobResponse]
item :: [ImportJobResponse]
$sel:item:ImportJobsResponse' :: ImportJobsResponse -> [ImportJobResponse]
item} -> [ImportJobResponse]
item) (\s :: ImportJobsResponse
s@ImportJobsResponse' {} [ImportJobResponse]
a -> ImportJobsResponse
s {$sel:item:ImportJobsResponse' :: [ImportJobResponse]
item = [ImportJobResponse]
a} :: ImportJobsResponse) (([ImportJobResponse] -> f [ImportJobResponse])
-> ImportJobsResponse -> f ImportJobsResponse)
-> (([ImportJobResponse] -> f [ImportJobResponse])
-> [ImportJobResponse] -> f [ImportJobResponse])
-> ([ImportJobResponse] -> f [ImportJobResponse])
-> ImportJobsResponse
-> f ImportJobsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ImportJobResponse] -> f [ImportJobResponse])
-> [ImportJobResponse] -> f [ImportJobResponse]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ImportJobsResponse where
parseJSON :: Value -> Parser ImportJobsResponse
parseJSON =
String
-> (Object -> Parser ImportJobsResponse)
-> Value
-> Parser ImportJobsResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ImportJobsResponse"
( \Object
x ->
Maybe Text -> [ImportJobResponse] -> ImportJobsResponse
ImportJobsResponse'
(Maybe Text -> [ImportJobResponse] -> ImportJobsResponse)
-> Parser (Maybe Text)
-> Parser ([ImportJobResponse] -> ImportJobsResponse)
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
"NextToken")
Parser ([ImportJobResponse] -> ImportJobsResponse)
-> Parser [ImportJobResponse] -> Parser ImportJobsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe [ImportJobResponse])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Item" Parser (Maybe [ImportJobResponse])
-> [ImportJobResponse] -> Parser [ImportJobResponse]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [ImportJobResponse]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ImportJobsResponse
instance Prelude.NFData ImportJobsResponse