{-# 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.BatchListAttachedIndicesResponse where
import Amazonka.CloudDirectory.Types.IndexAttachment
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 BatchListAttachedIndicesResponse = BatchListAttachedIndicesResponse'
{
BatchListAttachedIndicesResponse -> Maybe [IndexAttachment]
indexAttachments :: Prelude.Maybe [IndexAttachment],
BatchListAttachedIndicesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
}
deriving (BatchListAttachedIndicesResponse
-> BatchListAttachedIndicesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchListAttachedIndicesResponse
-> BatchListAttachedIndicesResponse -> Bool
$c/= :: BatchListAttachedIndicesResponse
-> BatchListAttachedIndicesResponse -> Bool
== :: BatchListAttachedIndicesResponse
-> BatchListAttachedIndicesResponse -> Bool
$c== :: BatchListAttachedIndicesResponse
-> BatchListAttachedIndicesResponse -> Bool
Prelude.Eq, ReadPrec [BatchListAttachedIndicesResponse]
ReadPrec BatchListAttachedIndicesResponse
Int -> ReadS BatchListAttachedIndicesResponse
ReadS [BatchListAttachedIndicesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchListAttachedIndicesResponse]
$creadListPrec :: ReadPrec [BatchListAttachedIndicesResponse]
readPrec :: ReadPrec BatchListAttachedIndicesResponse
$creadPrec :: ReadPrec BatchListAttachedIndicesResponse
readList :: ReadS [BatchListAttachedIndicesResponse]
$creadList :: ReadS [BatchListAttachedIndicesResponse]
readsPrec :: Int -> ReadS BatchListAttachedIndicesResponse
$creadsPrec :: Int -> ReadS BatchListAttachedIndicesResponse
Prelude.Read, Int -> BatchListAttachedIndicesResponse -> ShowS
[BatchListAttachedIndicesResponse] -> ShowS
BatchListAttachedIndicesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchListAttachedIndicesResponse] -> ShowS
$cshowList :: [BatchListAttachedIndicesResponse] -> ShowS
show :: BatchListAttachedIndicesResponse -> String
$cshow :: BatchListAttachedIndicesResponse -> String
showsPrec :: Int -> BatchListAttachedIndicesResponse -> ShowS
$cshowsPrec :: Int -> BatchListAttachedIndicesResponse -> ShowS
Prelude.Show, forall x.
Rep BatchListAttachedIndicesResponse x
-> BatchListAttachedIndicesResponse
forall x.
BatchListAttachedIndicesResponse
-> Rep BatchListAttachedIndicesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchListAttachedIndicesResponse x
-> BatchListAttachedIndicesResponse
$cfrom :: forall x.
BatchListAttachedIndicesResponse
-> Rep BatchListAttachedIndicesResponse x
Prelude.Generic)
newBatchListAttachedIndicesResponse ::
BatchListAttachedIndicesResponse
newBatchListAttachedIndicesResponse :: BatchListAttachedIndicesResponse
newBatchListAttachedIndicesResponse =
BatchListAttachedIndicesResponse'
{ $sel:indexAttachments:BatchListAttachedIndicesResponse' :: Maybe [IndexAttachment]
indexAttachments =
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:BatchListAttachedIndicesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
}
batchListAttachedIndicesResponse_indexAttachments :: Lens.Lens' BatchListAttachedIndicesResponse (Prelude.Maybe [IndexAttachment])
batchListAttachedIndicesResponse_indexAttachments :: Lens' BatchListAttachedIndicesResponse (Maybe [IndexAttachment])
batchListAttachedIndicesResponse_indexAttachments = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListAttachedIndicesResponse' {Maybe [IndexAttachment]
indexAttachments :: Maybe [IndexAttachment]
$sel:indexAttachments:BatchListAttachedIndicesResponse' :: BatchListAttachedIndicesResponse -> Maybe [IndexAttachment]
indexAttachments} -> Maybe [IndexAttachment]
indexAttachments) (\s :: BatchListAttachedIndicesResponse
s@BatchListAttachedIndicesResponse' {} Maybe [IndexAttachment]
a -> BatchListAttachedIndicesResponse
s {$sel:indexAttachments:BatchListAttachedIndicesResponse' :: Maybe [IndexAttachment]
indexAttachments = Maybe [IndexAttachment]
a} :: BatchListAttachedIndicesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchListAttachedIndicesResponse_nextToken :: Lens.Lens' BatchListAttachedIndicesResponse (Prelude.Maybe Prelude.Text)
batchListAttachedIndicesResponse_nextToken :: Lens' BatchListAttachedIndicesResponse (Maybe Text)
batchListAttachedIndicesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListAttachedIndicesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:BatchListAttachedIndicesResponse' :: BatchListAttachedIndicesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: BatchListAttachedIndicesResponse
s@BatchListAttachedIndicesResponse' {} Maybe Text
a -> BatchListAttachedIndicesResponse
s {$sel:nextToken:BatchListAttachedIndicesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: BatchListAttachedIndicesResponse)
instance
Data.FromJSON
BatchListAttachedIndicesResponse
where
parseJSON :: Value -> Parser BatchListAttachedIndicesResponse
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchListAttachedIndicesResponse"
( \Object
x ->
Maybe [IndexAttachment]
-> Maybe Text -> BatchListAttachedIndicesResponse
BatchListAttachedIndicesResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"IndexAttachments"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NextToken")
)
instance
Prelude.Hashable
BatchListAttachedIndicesResponse
where
hashWithSalt :: Int -> BatchListAttachedIndicesResponse -> Int
hashWithSalt
Int
_salt
BatchListAttachedIndicesResponse' {Maybe [IndexAttachment]
Maybe Text
nextToken :: Maybe Text
indexAttachments :: Maybe [IndexAttachment]
$sel:nextToken:BatchListAttachedIndicesResponse' :: BatchListAttachedIndicesResponse -> Maybe Text
$sel:indexAttachments:BatchListAttachedIndicesResponse' :: BatchListAttachedIndicesResponse -> Maybe [IndexAttachment]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [IndexAttachment]
indexAttachments
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
instance
Prelude.NFData
BatchListAttachedIndicesResponse
where
rnf :: BatchListAttachedIndicesResponse -> ()
rnf BatchListAttachedIndicesResponse' {Maybe [IndexAttachment]
Maybe Text
nextToken :: Maybe Text
indexAttachments :: Maybe [IndexAttachment]
$sel:nextToken:BatchListAttachedIndicesResponse' :: BatchListAttachedIndicesResponse -> Maybe Text
$sel:indexAttachments:BatchListAttachedIndicesResponse' :: BatchListAttachedIndicesResponse -> Maybe [IndexAttachment]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [IndexAttachment]
indexAttachments
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken