{-# 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.CloudDirectory.Types.BatchListObjectChildren where
import Amazonka.CloudDirectory.Types.ObjectReference
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchListObjectChildren = BatchListObjectChildren'
{
BatchListObjectChildren -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
BatchListObjectChildren -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
BatchListObjectChildren -> ObjectReference
objectReference :: ObjectReference
}
deriving (BatchListObjectChildren -> BatchListObjectChildren -> Bool
(BatchListObjectChildren -> BatchListObjectChildren -> Bool)
-> (BatchListObjectChildren -> BatchListObjectChildren -> Bool)
-> Eq BatchListObjectChildren
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchListObjectChildren -> BatchListObjectChildren -> Bool
$c/= :: BatchListObjectChildren -> BatchListObjectChildren -> Bool
== :: BatchListObjectChildren -> BatchListObjectChildren -> Bool
$c== :: BatchListObjectChildren -> BatchListObjectChildren -> Bool
Prelude.Eq, ReadPrec [BatchListObjectChildren]
ReadPrec BatchListObjectChildren
Int -> ReadS BatchListObjectChildren
ReadS [BatchListObjectChildren]
(Int -> ReadS BatchListObjectChildren)
-> ReadS [BatchListObjectChildren]
-> ReadPrec BatchListObjectChildren
-> ReadPrec [BatchListObjectChildren]
-> Read BatchListObjectChildren
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchListObjectChildren]
$creadListPrec :: ReadPrec [BatchListObjectChildren]
readPrec :: ReadPrec BatchListObjectChildren
$creadPrec :: ReadPrec BatchListObjectChildren
readList :: ReadS [BatchListObjectChildren]
$creadList :: ReadS [BatchListObjectChildren]
readsPrec :: Int -> ReadS BatchListObjectChildren
$creadsPrec :: Int -> ReadS BatchListObjectChildren
Prelude.Read, Int -> BatchListObjectChildren -> ShowS
[BatchListObjectChildren] -> ShowS
BatchListObjectChildren -> String
(Int -> BatchListObjectChildren -> ShowS)
-> (BatchListObjectChildren -> String)
-> ([BatchListObjectChildren] -> ShowS)
-> Show BatchListObjectChildren
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchListObjectChildren] -> ShowS
$cshowList :: [BatchListObjectChildren] -> ShowS
show :: BatchListObjectChildren -> String
$cshow :: BatchListObjectChildren -> String
showsPrec :: Int -> BatchListObjectChildren -> ShowS
$cshowsPrec :: Int -> BatchListObjectChildren -> ShowS
Prelude.Show, (forall x.
BatchListObjectChildren -> Rep BatchListObjectChildren x)
-> (forall x.
Rep BatchListObjectChildren x -> BatchListObjectChildren)
-> Generic BatchListObjectChildren
forall x. Rep BatchListObjectChildren x -> BatchListObjectChildren
forall x. BatchListObjectChildren -> Rep BatchListObjectChildren x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchListObjectChildren x -> BatchListObjectChildren
$cfrom :: forall x. BatchListObjectChildren -> Rep BatchListObjectChildren x
Prelude.Generic)
newBatchListObjectChildren ::
ObjectReference ->
BatchListObjectChildren
newBatchListObjectChildren :: ObjectReference -> BatchListObjectChildren
newBatchListObjectChildren ObjectReference
pObjectReference_ =
BatchListObjectChildren' :: Maybe Text
-> Maybe Natural -> ObjectReference -> BatchListObjectChildren
BatchListObjectChildren'
{ $sel:nextToken:BatchListObjectChildren' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:BatchListObjectChildren' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:objectReference:BatchListObjectChildren' :: ObjectReference
objectReference = ObjectReference
pObjectReference_
}
batchListObjectChildren_nextToken :: Lens.Lens' BatchListObjectChildren (Prelude.Maybe Prelude.Text)
batchListObjectChildren_nextToken :: (Maybe Text -> f (Maybe Text))
-> BatchListObjectChildren -> f BatchListObjectChildren
batchListObjectChildren_nextToken = (BatchListObjectChildren -> Maybe Text)
-> (BatchListObjectChildren
-> Maybe Text -> BatchListObjectChildren)
-> Lens
BatchListObjectChildren
BatchListObjectChildren
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListObjectChildren' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:BatchListObjectChildren' :: BatchListObjectChildren -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: BatchListObjectChildren
s@BatchListObjectChildren' {} Maybe Text
a -> BatchListObjectChildren
s {$sel:nextToken:BatchListObjectChildren' :: Maybe Text
nextToken = Maybe Text
a} :: BatchListObjectChildren)
batchListObjectChildren_maxResults :: Lens.Lens' BatchListObjectChildren (Prelude.Maybe Prelude.Natural)
batchListObjectChildren_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> BatchListObjectChildren -> f BatchListObjectChildren
batchListObjectChildren_maxResults = (BatchListObjectChildren -> Maybe Natural)
-> (BatchListObjectChildren
-> Maybe Natural -> BatchListObjectChildren)
-> Lens
BatchListObjectChildren
BatchListObjectChildren
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListObjectChildren' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:BatchListObjectChildren' :: BatchListObjectChildren -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: BatchListObjectChildren
s@BatchListObjectChildren' {} Maybe Natural
a -> BatchListObjectChildren
s {$sel:maxResults:BatchListObjectChildren' :: Maybe Natural
maxResults = Maybe Natural
a} :: BatchListObjectChildren)
batchListObjectChildren_objectReference :: Lens.Lens' BatchListObjectChildren ObjectReference
batchListObjectChildren_objectReference :: (ObjectReference -> f ObjectReference)
-> BatchListObjectChildren -> f BatchListObjectChildren
batchListObjectChildren_objectReference = (BatchListObjectChildren -> ObjectReference)
-> (BatchListObjectChildren
-> ObjectReference -> BatchListObjectChildren)
-> Lens
BatchListObjectChildren
BatchListObjectChildren
ObjectReference
ObjectReference
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListObjectChildren' {ObjectReference
objectReference :: ObjectReference
$sel:objectReference:BatchListObjectChildren' :: BatchListObjectChildren -> ObjectReference
objectReference} -> ObjectReference
objectReference) (\s :: BatchListObjectChildren
s@BatchListObjectChildren' {} ObjectReference
a -> BatchListObjectChildren
s {$sel:objectReference:BatchListObjectChildren' :: ObjectReference
objectReference = ObjectReference
a} :: BatchListObjectChildren)
instance Prelude.Hashable BatchListObjectChildren
instance Prelude.NFData BatchListObjectChildren
instance Core.ToJSON BatchListObjectChildren where
toJSON :: BatchListObjectChildren -> Value
toJSON BatchListObjectChildren' {Maybe Natural
Maybe Text
ObjectReference
objectReference :: ObjectReference
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:objectReference:BatchListObjectChildren' :: BatchListObjectChildren -> ObjectReference
$sel:maxResults:BatchListObjectChildren' :: BatchListObjectChildren -> Maybe Natural
$sel:nextToken:BatchListObjectChildren' :: BatchListObjectChildren -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"MaxResults" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ObjectReference" Text -> ObjectReference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ObjectReference
objectReference)
]
)