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