{-# 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.BatchListObjectAttributes where
import Amazonka.CloudDirectory.Types.ObjectReference
import Amazonka.CloudDirectory.Types.SchemaFacet
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchListObjectAttributes = BatchListObjectAttributes'
{
BatchListObjectAttributes -> Maybe SchemaFacet
facetFilter :: Prelude.Maybe SchemaFacet,
BatchListObjectAttributes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
BatchListObjectAttributes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
BatchListObjectAttributes -> ObjectReference
objectReference :: ObjectReference
}
deriving (BatchListObjectAttributes -> BatchListObjectAttributes -> Bool
(BatchListObjectAttributes -> BatchListObjectAttributes -> Bool)
-> (BatchListObjectAttributes -> BatchListObjectAttributes -> Bool)
-> Eq BatchListObjectAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchListObjectAttributes -> BatchListObjectAttributes -> Bool
$c/= :: BatchListObjectAttributes -> BatchListObjectAttributes -> Bool
== :: BatchListObjectAttributes -> BatchListObjectAttributes -> Bool
$c== :: BatchListObjectAttributes -> BatchListObjectAttributes -> Bool
Prelude.Eq, ReadPrec [BatchListObjectAttributes]
ReadPrec BatchListObjectAttributes
Int -> ReadS BatchListObjectAttributes
ReadS [BatchListObjectAttributes]
(Int -> ReadS BatchListObjectAttributes)
-> ReadS [BatchListObjectAttributes]
-> ReadPrec BatchListObjectAttributes
-> ReadPrec [BatchListObjectAttributes]
-> Read BatchListObjectAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchListObjectAttributes]
$creadListPrec :: ReadPrec [BatchListObjectAttributes]
readPrec :: ReadPrec BatchListObjectAttributes
$creadPrec :: ReadPrec BatchListObjectAttributes
readList :: ReadS [BatchListObjectAttributes]
$creadList :: ReadS [BatchListObjectAttributes]
readsPrec :: Int -> ReadS BatchListObjectAttributes
$creadsPrec :: Int -> ReadS BatchListObjectAttributes
Prelude.Read, Int -> BatchListObjectAttributes -> ShowS
[BatchListObjectAttributes] -> ShowS
BatchListObjectAttributes -> String
(Int -> BatchListObjectAttributes -> ShowS)
-> (BatchListObjectAttributes -> String)
-> ([BatchListObjectAttributes] -> ShowS)
-> Show BatchListObjectAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchListObjectAttributes] -> ShowS
$cshowList :: [BatchListObjectAttributes] -> ShowS
show :: BatchListObjectAttributes -> String
$cshow :: BatchListObjectAttributes -> String
showsPrec :: Int -> BatchListObjectAttributes -> ShowS
$cshowsPrec :: Int -> BatchListObjectAttributes -> ShowS
Prelude.Show, (forall x.
BatchListObjectAttributes -> Rep BatchListObjectAttributes x)
-> (forall x.
Rep BatchListObjectAttributes x -> BatchListObjectAttributes)
-> Generic BatchListObjectAttributes
forall x.
Rep BatchListObjectAttributes x -> BatchListObjectAttributes
forall x.
BatchListObjectAttributes -> Rep BatchListObjectAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchListObjectAttributes x -> BatchListObjectAttributes
$cfrom :: forall x.
BatchListObjectAttributes -> Rep BatchListObjectAttributes x
Prelude.Generic)
newBatchListObjectAttributes ::
ObjectReference ->
BatchListObjectAttributes
newBatchListObjectAttributes :: ObjectReference -> BatchListObjectAttributes
newBatchListObjectAttributes ObjectReference
pObjectReference_ =
BatchListObjectAttributes' :: Maybe SchemaFacet
-> Maybe Text
-> Maybe Natural
-> ObjectReference
-> BatchListObjectAttributes
BatchListObjectAttributes'
{ $sel:facetFilter:BatchListObjectAttributes' :: Maybe SchemaFacet
facetFilter =
Maybe SchemaFacet
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:BatchListObjectAttributes' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:BatchListObjectAttributes' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:objectReference:BatchListObjectAttributes' :: ObjectReference
objectReference = ObjectReference
pObjectReference_
}
batchListObjectAttributes_facetFilter :: Lens.Lens' BatchListObjectAttributes (Prelude.Maybe SchemaFacet)
batchListObjectAttributes_facetFilter :: (Maybe SchemaFacet -> f (Maybe SchemaFacet))
-> BatchListObjectAttributes -> f BatchListObjectAttributes
batchListObjectAttributes_facetFilter = (BatchListObjectAttributes -> Maybe SchemaFacet)
-> (BatchListObjectAttributes
-> Maybe SchemaFacet -> BatchListObjectAttributes)
-> Lens
BatchListObjectAttributes
BatchListObjectAttributes
(Maybe SchemaFacet)
(Maybe SchemaFacet)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListObjectAttributes' {Maybe SchemaFacet
facetFilter :: Maybe SchemaFacet
$sel:facetFilter:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe SchemaFacet
facetFilter} -> Maybe SchemaFacet
facetFilter) (\s :: BatchListObjectAttributes
s@BatchListObjectAttributes' {} Maybe SchemaFacet
a -> BatchListObjectAttributes
s {$sel:facetFilter:BatchListObjectAttributes' :: Maybe SchemaFacet
facetFilter = Maybe SchemaFacet
a} :: BatchListObjectAttributes)
batchListObjectAttributes_nextToken :: Lens.Lens' BatchListObjectAttributes (Prelude.Maybe Prelude.Text)
batchListObjectAttributes_nextToken :: (Maybe Text -> f (Maybe Text))
-> BatchListObjectAttributes -> f BatchListObjectAttributes
batchListObjectAttributes_nextToken = (BatchListObjectAttributes -> Maybe Text)
-> (BatchListObjectAttributes
-> Maybe Text -> BatchListObjectAttributes)
-> Lens
BatchListObjectAttributes
BatchListObjectAttributes
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListObjectAttributes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: BatchListObjectAttributes
s@BatchListObjectAttributes' {} Maybe Text
a -> BatchListObjectAttributes
s {$sel:nextToken:BatchListObjectAttributes' :: Maybe Text
nextToken = Maybe Text
a} :: BatchListObjectAttributes)
batchListObjectAttributes_maxResults :: Lens.Lens' BatchListObjectAttributes (Prelude.Maybe Prelude.Natural)
batchListObjectAttributes_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> BatchListObjectAttributes -> f BatchListObjectAttributes
batchListObjectAttributes_maxResults = (BatchListObjectAttributes -> Maybe Natural)
-> (BatchListObjectAttributes
-> Maybe Natural -> BatchListObjectAttributes)
-> Lens
BatchListObjectAttributes
BatchListObjectAttributes
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListObjectAttributes' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: BatchListObjectAttributes
s@BatchListObjectAttributes' {} Maybe Natural
a -> BatchListObjectAttributes
s {$sel:maxResults:BatchListObjectAttributes' :: Maybe Natural
maxResults = Maybe Natural
a} :: BatchListObjectAttributes)
batchListObjectAttributes_objectReference :: Lens.Lens' BatchListObjectAttributes ObjectReference
batchListObjectAttributes_objectReference :: (ObjectReference -> f ObjectReference)
-> BatchListObjectAttributes -> f BatchListObjectAttributes
batchListObjectAttributes_objectReference = (BatchListObjectAttributes -> ObjectReference)
-> (BatchListObjectAttributes
-> ObjectReference -> BatchListObjectAttributes)
-> Lens
BatchListObjectAttributes
BatchListObjectAttributes
ObjectReference
ObjectReference
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchListObjectAttributes' {ObjectReference
objectReference :: ObjectReference
$sel:objectReference:BatchListObjectAttributes' :: BatchListObjectAttributes -> ObjectReference
objectReference} -> ObjectReference
objectReference) (\s :: BatchListObjectAttributes
s@BatchListObjectAttributes' {} ObjectReference
a -> BatchListObjectAttributes
s {$sel:objectReference:BatchListObjectAttributes' :: ObjectReference
objectReference = ObjectReference
a} :: BatchListObjectAttributes)
instance Prelude.Hashable BatchListObjectAttributes
instance Prelude.NFData BatchListObjectAttributes
instance Core.ToJSON BatchListObjectAttributes where
toJSON :: BatchListObjectAttributes -> Value
toJSON BatchListObjectAttributes' {Maybe Natural
Maybe Text
Maybe SchemaFacet
ObjectReference
objectReference :: ObjectReference
maxResults :: Maybe Natural
nextToken :: Maybe Text
facetFilter :: Maybe SchemaFacet
$sel:objectReference:BatchListObjectAttributes' :: BatchListObjectAttributes -> ObjectReference
$sel:maxResults:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Natural
$sel:nextToken:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Text
$sel:facetFilter:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe SchemaFacet
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"FacetFilter" Text -> SchemaFacet -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SchemaFacet -> Pair) -> Maybe SchemaFacet -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SchemaFacet
facetFilter,
(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
"ObjectReference" Text -> ObjectReference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ObjectReference
objectReference)
]
)