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