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