{-# 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.BatchListAttachedIndices 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 BatchListAttachedIndices = BatchListAttachedIndices'
{
BatchListAttachedIndices -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
BatchListAttachedIndices -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
BatchListAttachedIndices -> ObjectReference
targetReference :: ObjectReference
}
deriving (BatchListAttachedIndices -> BatchListAttachedIndices -> Bool
(BatchListAttachedIndices -> BatchListAttachedIndices -> Bool)
-> (BatchListAttachedIndices -> BatchListAttachedIndices -> Bool)
-> Eq BatchListAttachedIndices
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchListAttachedIndices -> BatchListAttachedIndices -> Bool
$c/= :: BatchListAttachedIndices -> BatchListAttachedIndices -> Bool
== :: BatchListAttachedIndices -> BatchListAttachedIndices -> Bool
$c== :: BatchListAttachedIndices -> BatchListAttachedIndices -> Bool
Prelude.Eq, ReadPrec [BatchListAttachedIndices]
ReadPrec BatchListAttachedIndices
Int -> ReadS BatchListAttachedIndices
ReadS [BatchListAttachedIndices]
(Int -> ReadS BatchListAttachedIndices)
-> ReadS [BatchListAttachedIndices]
-> ReadPrec BatchListAttachedIndices
-> ReadPrec [BatchListAttachedIndices]
-> Read BatchListAttachedIndices
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchListAttachedIndices]
$creadListPrec :: ReadPrec [BatchListAttachedIndices]
readPrec :: ReadPrec BatchListAttachedIndices
$creadPrec :: ReadPrec BatchListAttachedIndices
readList :: ReadS [BatchListAttachedIndices]
$creadList :: ReadS [BatchListAttachedIndices]
readsPrec :: Int -> ReadS BatchListAttachedIndices
$creadsPrec :: Int -> ReadS BatchListAttachedIndices
Prelude.Read, Int -> BatchListAttachedIndices -> ShowS
[BatchListAttachedIndices] -> ShowS
BatchListAttachedIndices -> String
(Int -> BatchListAttachedIndices -> ShowS)
-> (BatchListAttachedIndices -> String)
-> ([BatchListAttachedIndices] -> ShowS)
-> Show BatchListAttachedIndices
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchListAttachedIndices] -> ShowS
$cshowList :: [BatchListAttachedIndices] -> ShowS
show :: BatchListAttachedIndices -> String
$cshow :: BatchListAttachedIndices -> String
showsPrec :: Int -> BatchListAttachedIndices -> ShowS
$cshowsPrec :: Int -> BatchListAttachedIndices -> ShowS
Prelude.Show, (forall x.
BatchListAttachedIndices -> Rep BatchListAttachedIndices x)
-> (forall x.
Rep BatchListAttachedIndices x -> BatchListAttachedIndices)
-> Generic BatchListAttachedIndices
forall x.
Rep BatchListAttachedIndices x -> BatchListAttachedIndices
forall x.
BatchListAttachedIndices -> Rep BatchListAttachedIndices x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchListAttachedIndices x -> BatchListAttachedIndices
$cfrom :: forall x.
BatchListAttachedIndices -> Rep BatchListAttachedIndices x
Prelude.Generic)
newBatchListAttachedIndices ::
ObjectReference ->
BatchListAttachedIndices
newBatchListAttachedIndices :: ObjectReference -> BatchListAttachedIndices
newBatchListAttachedIndices ObjectReference
pTargetReference_ =
BatchListAttachedIndices' :: Maybe Text
-> Maybe Natural -> ObjectReference -> BatchListAttachedIndices
BatchListAttachedIndices'
{ $sel:nextToken:BatchListAttachedIndices' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:BatchListAttachedIndices' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:targetReference:BatchListAttachedIndices' :: ObjectReference
targetReference = ObjectReference
pTargetReference_
}
batchListAttachedIndices_nextToken :: Lens.Lens' BatchListAttachedIndices (Prelude.Maybe Prelude.Text)
batchListAttachedIndices_nextToken :: (Maybe Text -> f (Maybe Text))
-> BatchListAttachedIndices -> f BatchListAttachedIndices
batchListAttachedIndices_nextToken = (BatchListAttachedIndices -> Maybe Text)
-> (BatchListAttachedIndices
-> Maybe Text -> BatchListAttachedIndices)
-> Lens
BatchListAttachedIndices
BatchListAttachedIndices
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListAttachedIndices' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:BatchListAttachedIndices' :: BatchListAttachedIndices -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: BatchListAttachedIndices
s@BatchListAttachedIndices' {} Maybe Text
a -> BatchListAttachedIndices
s {$sel:nextToken:BatchListAttachedIndices' :: Maybe Text
nextToken = Maybe Text
a} :: BatchListAttachedIndices)
batchListAttachedIndices_maxResults :: Lens.Lens' BatchListAttachedIndices (Prelude.Maybe Prelude.Natural)
batchListAttachedIndices_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> BatchListAttachedIndices -> f BatchListAttachedIndices
batchListAttachedIndices_maxResults = (BatchListAttachedIndices -> Maybe Natural)
-> (BatchListAttachedIndices
-> Maybe Natural -> BatchListAttachedIndices)
-> Lens
BatchListAttachedIndices
BatchListAttachedIndices
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListAttachedIndices' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:BatchListAttachedIndices' :: BatchListAttachedIndices -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: BatchListAttachedIndices
s@BatchListAttachedIndices' {} Maybe Natural
a -> BatchListAttachedIndices
s {$sel:maxResults:BatchListAttachedIndices' :: Maybe Natural
maxResults = Maybe Natural
a} :: BatchListAttachedIndices)
batchListAttachedIndices_targetReference :: Lens.Lens' BatchListAttachedIndices ObjectReference
batchListAttachedIndices_targetReference :: (ObjectReference -> f ObjectReference)
-> BatchListAttachedIndices -> f BatchListAttachedIndices
batchListAttachedIndices_targetReference = (BatchListAttachedIndices -> ObjectReference)
-> (BatchListAttachedIndices
-> ObjectReference -> BatchListAttachedIndices)
-> Lens
BatchListAttachedIndices
BatchListAttachedIndices
ObjectReference
ObjectReference
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListAttachedIndices' {ObjectReference
targetReference :: ObjectReference
$sel:targetReference:BatchListAttachedIndices' :: BatchListAttachedIndices -> ObjectReference
targetReference} -> ObjectReference
targetReference) (\s :: BatchListAttachedIndices
s@BatchListAttachedIndices' {} ObjectReference
a -> BatchListAttachedIndices
s {$sel:targetReference:BatchListAttachedIndices' :: ObjectReference
targetReference = ObjectReference
a} :: BatchListAttachedIndices)
instance Prelude.Hashable BatchListAttachedIndices
instance Prelude.NFData BatchListAttachedIndices
instance Core.ToJSON BatchListAttachedIndices where
toJSON :: BatchListAttachedIndices -> Value
toJSON BatchListAttachedIndices' {Maybe Natural
Maybe Text
ObjectReference
targetReference :: ObjectReference
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:targetReference:BatchListAttachedIndices' :: BatchListAttachedIndices -> ObjectReference
$sel:maxResults:BatchListAttachedIndices' :: BatchListAttachedIndices -> Maybe Natural
$sel:nextToken:BatchListAttachedIndices' :: BatchListAttachedIndices -> 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
"TargetReference" Text -> ObjectReference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ObjectReference
targetReference)
]
)