{-# 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.BatchGetLinkAttributes where
import Amazonka.CloudDirectory.Types.TypedLinkSpecifier
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchGetLinkAttributes = BatchGetLinkAttributes'
{
BatchGetLinkAttributes -> TypedLinkSpecifier
typedLinkSpecifier :: TypedLinkSpecifier,
BatchGetLinkAttributes -> [Text]
attributeNames :: [Prelude.Text]
}
deriving (BatchGetLinkAttributes -> BatchGetLinkAttributes -> Bool
(BatchGetLinkAttributes -> BatchGetLinkAttributes -> Bool)
-> (BatchGetLinkAttributes -> BatchGetLinkAttributes -> Bool)
-> Eq BatchGetLinkAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchGetLinkAttributes -> BatchGetLinkAttributes -> Bool
$c/= :: BatchGetLinkAttributes -> BatchGetLinkAttributes -> Bool
== :: BatchGetLinkAttributes -> BatchGetLinkAttributes -> Bool
$c== :: BatchGetLinkAttributes -> BatchGetLinkAttributes -> Bool
Prelude.Eq, ReadPrec [BatchGetLinkAttributes]
ReadPrec BatchGetLinkAttributes
Int -> ReadS BatchGetLinkAttributes
ReadS [BatchGetLinkAttributes]
(Int -> ReadS BatchGetLinkAttributes)
-> ReadS [BatchGetLinkAttributes]
-> ReadPrec BatchGetLinkAttributes
-> ReadPrec [BatchGetLinkAttributes]
-> Read BatchGetLinkAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchGetLinkAttributes]
$creadListPrec :: ReadPrec [BatchGetLinkAttributes]
readPrec :: ReadPrec BatchGetLinkAttributes
$creadPrec :: ReadPrec BatchGetLinkAttributes
readList :: ReadS [BatchGetLinkAttributes]
$creadList :: ReadS [BatchGetLinkAttributes]
readsPrec :: Int -> ReadS BatchGetLinkAttributes
$creadsPrec :: Int -> ReadS BatchGetLinkAttributes
Prelude.Read, Int -> BatchGetLinkAttributes -> ShowS
[BatchGetLinkAttributes] -> ShowS
BatchGetLinkAttributes -> String
(Int -> BatchGetLinkAttributes -> ShowS)
-> (BatchGetLinkAttributes -> String)
-> ([BatchGetLinkAttributes] -> ShowS)
-> Show BatchGetLinkAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchGetLinkAttributes] -> ShowS
$cshowList :: [BatchGetLinkAttributes] -> ShowS
show :: BatchGetLinkAttributes -> String
$cshow :: BatchGetLinkAttributes -> String
showsPrec :: Int -> BatchGetLinkAttributes -> ShowS
$cshowsPrec :: Int -> BatchGetLinkAttributes -> ShowS
Prelude.Show, (forall x. BatchGetLinkAttributes -> Rep BatchGetLinkAttributes x)
-> (forall x.
Rep BatchGetLinkAttributes x -> BatchGetLinkAttributes)
-> Generic BatchGetLinkAttributes
forall x. Rep BatchGetLinkAttributes x -> BatchGetLinkAttributes
forall x. BatchGetLinkAttributes -> Rep BatchGetLinkAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchGetLinkAttributes x -> BatchGetLinkAttributes
$cfrom :: forall x. BatchGetLinkAttributes -> Rep BatchGetLinkAttributes x
Prelude.Generic)
newBatchGetLinkAttributes ::
TypedLinkSpecifier ->
BatchGetLinkAttributes
newBatchGetLinkAttributes :: TypedLinkSpecifier -> BatchGetLinkAttributes
newBatchGetLinkAttributes TypedLinkSpecifier
pTypedLinkSpecifier_ =
BatchGetLinkAttributes' :: TypedLinkSpecifier -> [Text] -> BatchGetLinkAttributes
BatchGetLinkAttributes'
{ $sel:typedLinkSpecifier:BatchGetLinkAttributes' :: TypedLinkSpecifier
typedLinkSpecifier =
TypedLinkSpecifier
pTypedLinkSpecifier_,
$sel:attributeNames:BatchGetLinkAttributes' :: [Text]
attributeNames = [Text]
forall a. Monoid a => a
Prelude.mempty
}
batchGetLinkAttributes_typedLinkSpecifier :: Lens.Lens' BatchGetLinkAttributes TypedLinkSpecifier
batchGetLinkAttributes_typedLinkSpecifier :: (TypedLinkSpecifier -> f TypedLinkSpecifier)
-> BatchGetLinkAttributes -> f BatchGetLinkAttributes
batchGetLinkAttributes_typedLinkSpecifier = (BatchGetLinkAttributes -> TypedLinkSpecifier)
-> (BatchGetLinkAttributes
-> TypedLinkSpecifier -> BatchGetLinkAttributes)
-> Lens
BatchGetLinkAttributes
BatchGetLinkAttributes
TypedLinkSpecifier
TypedLinkSpecifier
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetLinkAttributes' {TypedLinkSpecifier
typedLinkSpecifier :: TypedLinkSpecifier
$sel:typedLinkSpecifier:BatchGetLinkAttributes' :: BatchGetLinkAttributes -> TypedLinkSpecifier
typedLinkSpecifier} -> TypedLinkSpecifier
typedLinkSpecifier) (\s :: BatchGetLinkAttributes
s@BatchGetLinkAttributes' {} TypedLinkSpecifier
a -> BatchGetLinkAttributes
s {$sel:typedLinkSpecifier:BatchGetLinkAttributes' :: TypedLinkSpecifier
typedLinkSpecifier = TypedLinkSpecifier
a} :: BatchGetLinkAttributes)
batchGetLinkAttributes_attributeNames :: Lens.Lens' BatchGetLinkAttributes [Prelude.Text]
batchGetLinkAttributes_attributeNames :: ([Text] -> f [Text])
-> BatchGetLinkAttributes -> f BatchGetLinkAttributes
batchGetLinkAttributes_attributeNames = (BatchGetLinkAttributes -> [Text])
-> (BatchGetLinkAttributes -> [Text] -> BatchGetLinkAttributes)
-> Lens BatchGetLinkAttributes BatchGetLinkAttributes [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchGetLinkAttributes' {[Text]
attributeNames :: [Text]
$sel:attributeNames:BatchGetLinkAttributes' :: BatchGetLinkAttributes -> [Text]
attributeNames} -> [Text]
attributeNames) (\s :: BatchGetLinkAttributes
s@BatchGetLinkAttributes' {} [Text]
a -> BatchGetLinkAttributes
s {$sel:attributeNames:BatchGetLinkAttributes' :: [Text]
attributeNames = [Text]
a} :: BatchGetLinkAttributes) (([Text] -> f [Text])
-> BatchGetLinkAttributes -> f BatchGetLinkAttributes)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> BatchGetLinkAttributes
-> f BatchGetLinkAttributes
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 BatchGetLinkAttributes
instance Prelude.NFData BatchGetLinkAttributes
instance Core.ToJSON BatchGetLinkAttributes where
toJSON :: BatchGetLinkAttributes -> Value
toJSON BatchGetLinkAttributes' {[Text]
TypedLinkSpecifier
attributeNames :: [Text]
typedLinkSpecifier :: TypedLinkSpecifier
$sel:attributeNames:BatchGetLinkAttributes' :: BatchGetLinkAttributes -> [Text]
$sel:typedLinkSpecifier:BatchGetLinkAttributes' :: BatchGetLinkAttributes -> TypedLinkSpecifier
..} =
[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
"TypedLinkSpecifier" Text -> TypedLinkSpecifier -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TypedLinkSpecifier
typedLinkSpecifier),
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)
]
)