{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data BatchListObjectAttributes = BatchListObjectAttributes'
{
BatchListObjectAttributes -> Maybe SchemaFacet
facetFilter :: Prelude.Maybe SchemaFacet,
BatchListObjectAttributes -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
BatchListObjectAttributes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
BatchListObjectAttributes -> ObjectReference
objectReference :: ObjectReference
}
deriving (BatchListObjectAttributes -> BatchListObjectAttributes -> Bool
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]
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
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.
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'
{ $sel:facetFilter:BatchListObjectAttributes' :: Maybe SchemaFacet
facetFilter =
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:BatchListObjectAttributes' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:BatchListObjectAttributes' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
$sel:objectReference:BatchListObjectAttributes' :: ObjectReference
objectReference = ObjectReference
pObjectReference_
}
batchListObjectAttributes_facetFilter :: Lens.Lens' BatchListObjectAttributes (Prelude.Maybe SchemaFacet)
batchListObjectAttributes_facetFilter :: Lens' BatchListObjectAttributes (Maybe SchemaFacet)
batchListObjectAttributes_facetFilter = 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_maxResults :: Lens.Lens' BatchListObjectAttributes (Prelude.Maybe Prelude.Natural)
batchListObjectAttributes_maxResults :: Lens' BatchListObjectAttributes (Maybe Natural)
batchListObjectAttributes_maxResults = 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_nextToken :: Lens.Lens' BatchListObjectAttributes (Prelude.Maybe Prelude.Text)
batchListObjectAttributes_nextToken :: Lens' BatchListObjectAttributes (Maybe Text)
batchListObjectAttributes_nextToken = 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_objectReference :: Lens.Lens' BatchListObjectAttributes ObjectReference
batchListObjectAttributes_objectReference :: Lens' BatchListObjectAttributes ObjectReference
batchListObjectAttributes_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 where
hashWithSalt :: Int -> BatchListObjectAttributes -> Int
hashWithSalt Int
_salt BatchListObjectAttributes' {Maybe Natural
Maybe Text
Maybe SchemaFacet
ObjectReference
objectReference :: ObjectReference
nextToken :: Maybe Text
maxResults :: Maybe Natural
facetFilter :: Maybe SchemaFacet
$sel:objectReference:BatchListObjectAttributes' :: BatchListObjectAttributes -> ObjectReference
$sel:nextToken:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Text
$sel:maxResults:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Natural
$sel:facetFilter:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe SchemaFacet
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe SchemaFacet
facetFilter
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ObjectReference
objectReference
instance Prelude.NFData BatchListObjectAttributes where
rnf :: BatchListObjectAttributes -> ()
rnf BatchListObjectAttributes' {Maybe Natural
Maybe Text
Maybe SchemaFacet
ObjectReference
objectReference :: ObjectReference
nextToken :: Maybe Text
maxResults :: Maybe Natural
facetFilter :: Maybe SchemaFacet
$sel:objectReference:BatchListObjectAttributes' :: BatchListObjectAttributes -> ObjectReference
$sel:nextToken:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Text
$sel:maxResults:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Natural
$sel:facetFilter:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe SchemaFacet
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe SchemaFacet
facetFilter
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ObjectReference
objectReference
instance Data.ToJSON BatchListObjectAttributes where
toJSON :: BatchListObjectAttributes -> Value
toJSON BatchListObjectAttributes' {Maybe Natural
Maybe Text
Maybe SchemaFacet
ObjectReference
objectReference :: ObjectReference
nextToken :: Maybe Text
maxResults :: Maybe Natural
facetFilter :: Maybe SchemaFacet
$sel:objectReference:BatchListObjectAttributes' :: BatchListObjectAttributes -> ObjectReference
$sel:nextToken:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Text
$sel:maxResults:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe Natural
$sel:facetFilter:BatchListObjectAttributes' :: BatchListObjectAttributes -> Maybe SchemaFacet
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"FacetFilter" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SchemaFacet
facetFilter,
(Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
(Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
forall a. a -> Maybe a
Prelude.Just
(Key
"ObjectReference" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ObjectReference
objectReference)
]
)