{-# 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.BatchGetObjectAttributes 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 BatchGetObjectAttributes = BatchGetObjectAttributes'
{
BatchGetObjectAttributes -> ObjectReference
objectReference :: ObjectReference,
BatchGetObjectAttributes -> SchemaFacet
schemaFacet :: SchemaFacet,
BatchGetObjectAttributes -> [Text]
attributeNames :: [Prelude.Text]
}
deriving (BatchGetObjectAttributes -> BatchGetObjectAttributes -> Bool
(BatchGetObjectAttributes -> BatchGetObjectAttributes -> Bool)
-> (BatchGetObjectAttributes -> BatchGetObjectAttributes -> Bool)
-> Eq BatchGetObjectAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetObjectAttributes -> BatchGetObjectAttributes -> Bool
$c/= :: BatchGetObjectAttributes -> BatchGetObjectAttributes -> Bool
== :: BatchGetObjectAttributes -> BatchGetObjectAttributes -> Bool
$c== :: BatchGetObjectAttributes -> BatchGetObjectAttributes -> Bool
Prelude.Eq, ReadPrec [BatchGetObjectAttributes]
ReadPrec BatchGetObjectAttributes
Int -> ReadS BatchGetObjectAttributes
ReadS [BatchGetObjectAttributes]
(Int -> ReadS BatchGetObjectAttributes)
-> ReadS [BatchGetObjectAttributes]
-> ReadPrec BatchGetObjectAttributes
-> ReadPrec [BatchGetObjectAttributes]
-> Read BatchGetObjectAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetObjectAttributes]
$creadListPrec :: ReadPrec [BatchGetObjectAttributes]
readPrec :: ReadPrec BatchGetObjectAttributes
$creadPrec :: ReadPrec BatchGetObjectAttributes
readList :: ReadS [BatchGetObjectAttributes]
$creadList :: ReadS [BatchGetObjectAttributes]
readsPrec :: Int -> ReadS BatchGetObjectAttributes
$creadsPrec :: Int -> ReadS BatchGetObjectAttributes
Prelude.Read, Int -> BatchGetObjectAttributes -> ShowS
[BatchGetObjectAttributes] -> ShowS
BatchGetObjectAttributes -> String
(Int -> BatchGetObjectAttributes -> ShowS)
-> (BatchGetObjectAttributes -> String)
-> ([BatchGetObjectAttributes] -> ShowS)
-> Show BatchGetObjectAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetObjectAttributes] -> ShowS
$cshowList :: [BatchGetObjectAttributes] -> ShowS
show :: BatchGetObjectAttributes -> String
$cshow :: BatchGetObjectAttributes -> String
showsPrec :: Int -> BatchGetObjectAttributes -> ShowS
$cshowsPrec :: Int -> BatchGetObjectAttributes -> ShowS
Prelude.Show, (forall x.
BatchGetObjectAttributes -> Rep BatchGetObjectAttributes x)
-> (forall x.
Rep BatchGetObjectAttributes x -> BatchGetObjectAttributes)
-> Generic BatchGetObjectAttributes
forall x.
Rep BatchGetObjectAttributes x -> BatchGetObjectAttributes
forall x.
BatchGetObjectAttributes -> Rep BatchGetObjectAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchGetObjectAttributes x -> BatchGetObjectAttributes
$cfrom :: forall x.
BatchGetObjectAttributes -> Rep BatchGetObjectAttributes x
Prelude.Generic)
newBatchGetObjectAttributes ::
ObjectReference ->
SchemaFacet ->
BatchGetObjectAttributes
newBatchGetObjectAttributes :: ObjectReference -> SchemaFacet -> BatchGetObjectAttributes
newBatchGetObjectAttributes
ObjectReference
pObjectReference_
SchemaFacet
pSchemaFacet_ =
BatchGetObjectAttributes' :: ObjectReference
-> SchemaFacet -> [Text] -> BatchGetObjectAttributes
BatchGetObjectAttributes'
{ $sel:objectReference:BatchGetObjectAttributes' :: ObjectReference
objectReference =
ObjectReference
pObjectReference_,
$sel:schemaFacet:BatchGetObjectAttributes' :: SchemaFacet
schemaFacet = SchemaFacet
pSchemaFacet_,
$sel:attributeNames:BatchGetObjectAttributes' :: [Text]
attributeNames = [Text]
forall a. Monoid a => a
Prelude.mempty
}
batchGetObjectAttributes_objectReference :: Lens.Lens' BatchGetObjectAttributes ObjectReference
batchGetObjectAttributes_objectReference :: (ObjectReference -> f ObjectReference)
-> BatchGetObjectAttributes -> f BatchGetObjectAttributes
batchGetObjectAttributes_objectReference = (BatchGetObjectAttributes -> ObjectReference)
-> (BatchGetObjectAttributes
-> ObjectReference -> BatchGetObjectAttributes)
-> Lens
BatchGetObjectAttributes
BatchGetObjectAttributes
ObjectReference
ObjectReference
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetObjectAttributes' {ObjectReference
objectReference :: ObjectReference
$sel:objectReference:BatchGetObjectAttributes' :: BatchGetObjectAttributes -> ObjectReference
objectReference} -> ObjectReference
objectReference) (\s :: BatchGetObjectAttributes
s@BatchGetObjectAttributes' {} ObjectReference
a -> BatchGetObjectAttributes
s {$sel:objectReference:BatchGetObjectAttributes' :: ObjectReference
objectReference = ObjectReference
a} :: BatchGetObjectAttributes)
batchGetObjectAttributes_schemaFacet :: Lens.Lens' BatchGetObjectAttributes SchemaFacet
batchGetObjectAttributes_schemaFacet :: (SchemaFacet -> f SchemaFacet)
-> BatchGetObjectAttributes -> f BatchGetObjectAttributes
batchGetObjectAttributes_schemaFacet = (BatchGetObjectAttributes -> SchemaFacet)
-> (BatchGetObjectAttributes
-> SchemaFacet -> BatchGetObjectAttributes)
-> Lens
BatchGetObjectAttributes
BatchGetObjectAttributes
SchemaFacet
SchemaFacet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetObjectAttributes' {SchemaFacet
schemaFacet :: SchemaFacet
$sel:schemaFacet:BatchGetObjectAttributes' :: BatchGetObjectAttributes -> SchemaFacet
schemaFacet} -> SchemaFacet
schemaFacet) (\s :: BatchGetObjectAttributes
s@BatchGetObjectAttributes' {} SchemaFacet
a -> BatchGetObjectAttributes
s {$sel:schemaFacet:BatchGetObjectAttributes' :: SchemaFacet
schemaFacet = SchemaFacet
a} :: BatchGetObjectAttributes)
batchGetObjectAttributes_attributeNames :: Lens.Lens' BatchGetObjectAttributes [Prelude.Text]
batchGetObjectAttributes_attributeNames :: ([Text] -> f [Text])
-> BatchGetObjectAttributes -> f BatchGetObjectAttributes
batchGetObjectAttributes_attributeNames = (BatchGetObjectAttributes -> [Text])
-> (BatchGetObjectAttributes -> [Text] -> BatchGetObjectAttributes)
-> Lens
BatchGetObjectAttributes BatchGetObjectAttributes [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetObjectAttributes' {[Text]
attributeNames :: [Text]
$sel:attributeNames:BatchGetObjectAttributes' :: BatchGetObjectAttributes -> [Text]
attributeNames} -> [Text]
attributeNames) (\s :: BatchGetObjectAttributes
s@BatchGetObjectAttributes' {} [Text]
a -> BatchGetObjectAttributes
s {$sel:attributeNames:BatchGetObjectAttributes' :: [Text]
attributeNames = [Text]
a} :: BatchGetObjectAttributes) (([Text] -> f [Text])
-> BatchGetObjectAttributes -> f BatchGetObjectAttributes)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> BatchGetObjectAttributes
-> f BatchGetObjectAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable BatchGetObjectAttributes
instance Prelude.NFData BatchGetObjectAttributes
instance Core.ToJSON BatchGetObjectAttributes where
toJSON :: BatchGetObjectAttributes -> Value
toJSON BatchGetObjectAttributes' {[Text]
ObjectReference
SchemaFacet
attributeNames :: [Text]
schemaFacet :: SchemaFacet
objectReference :: ObjectReference
$sel:attributeNames:BatchGetObjectAttributes' :: BatchGetObjectAttributes -> [Text]
$sel:schemaFacet:BatchGetObjectAttributes' :: BatchGetObjectAttributes -> SchemaFacet
$sel:objectReference:BatchGetObjectAttributes' :: BatchGetObjectAttributes -> ObjectReference
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ 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),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SchemaFacet" Text -> SchemaFacet -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= SchemaFacet
schemaFacet),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AttributeNames" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
attributeNames)
]
)