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