{-# 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.BatchDetachFromIndex 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 BatchDetachFromIndex = BatchDetachFromIndex'
{
BatchDetachFromIndex -> ObjectReference
indexReference :: ObjectReference,
BatchDetachFromIndex -> ObjectReference
targetReference :: ObjectReference
}
deriving (BatchDetachFromIndex -> BatchDetachFromIndex -> Bool
(BatchDetachFromIndex -> BatchDetachFromIndex -> Bool)
-> (BatchDetachFromIndex -> BatchDetachFromIndex -> Bool)
-> Eq BatchDetachFromIndex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDetachFromIndex -> BatchDetachFromIndex -> Bool
$c/= :: BatchDetachFromIndex -> BatchDetachFromIndex -> Bool
== :: BatchDetachFromIndex -> BatchDetachFromIndex -> Bool
$c== :: BatchDetachFromIndex -> BatchDetachFromIndex -> Bool
Prelude.Eq, ReadPrec [BatchDetachFromIndex]
ReadPrec BatchDetachFromIndex
Int -> ReadS BatchDetachFromIndex
ReadS [BatchDetachFromIndex]
(Int -> ReadS BatchDetachFromIndex)
-> ReadS [BatchDetachFromIndex]
-> ReadPrec BatchDetachFromIndex
-> ReadPrec [BatchDetachFromIndex]
-> Read BatchDetachFromIndex
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDetachFromIndex]
$creadListPrec :: ReadPrec [BatchDetachFromIndex]
readPrec :: ReadPrec BatchDetachFromIndex
$creadPrec :: ReadPrec BatchDetachFromIndex
readList :: ReadS [BatchDetachFromIndex]
$creadList :: ReadS [BatchDetachFromIndex]
readsPrec :: Int -> ReadS BatchDetachFromIndex
$creadsPrec :: Int -> ReadS BatchDetachFromIndex
Prelude.Read, Int -> BatchDetachFromIndex -> ShowS
[BatchDetachFromIndex] -> ShowS
BatchDetachFromIndex -> String
(Int -> BatchDetachFromIndex -> ShowS)
-> (BatchDetachFromIndex -> String)
-> ([BatchDetachFromIndex] -> ShowS)
-> Show BatchDetachFromIndex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDetachFromIndex] -> ShowS
$cshowList :: [BatchDetachFromIndex] -> ShowS
show :: BatchDetachFromIndex -> String
$cshow :: BatchDetachFromIndex -> String
showsPrec :: Int -> BatchDetachFromIndex -> ShowS
$cshowsPrec :: Int -> BatchDetachFromIndex -> ShowS
Prelude.Show, (forall x. BatchDetachFromIndex -> Rep BatchDetachFromIndex x)
-> (forall x. Rep BatchDetachFromIndex x -> BatchDetachFromIndex)
-> Generic BatchDetachFromIndex
forall x. Rep BatchDetachFromIndex x -> BatchDetachFromIndex
forall x. BatchDetachFromIndex -> Rep BatchDetachFromIndex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchDetachFromIndex x -> BatchDetachFromIndex
$cfrom :: forall x. BatchDetachFromIndex -> Rep BatchDetachFromIndex x
Prelude.Generic)
newBatchDetachFromIndex ::
ObjectReference ->
ObjectReference ->
BatchDetachFromIndex
newBatchDetachFromIndex :: ObjectReference -> ObjectReference -> BatchDetachFromIndex
newBatchDetachFromIndex
ObjectReference
pIndexReference_
ObjectReference
pTargetReference_ =
BatchDetachFromIndex' :: ObjectReference -> ObjectReference -> BatchDetachFromIndex
BatchDetachFromIndex'
{ $sel:indexReference:BatchDetachFromIndex' :: ObjectReference
indexReference =
ObjectReference
pIndexReference_,
$sel:targetReference:BatchDetachFromIndex' :: ObjectReference
targetReference = ObjectReference
pTargetReference_
}
batchDetachFromIndex_indexReference :: Lens.Lens' BatchDetachFromIndex ObjectReference
batchDetachFromIndex_indexReference :: (ObjectReference -> f ObjectReference)
-> BatchDetachFromIndex -> f BatchDetachFromIndex
batchDetachFromIndex_indexReference = (BatchDetachFromIndex -> ObjectReference)
-> (BatchDetachFromIndex
-> ObjectReference -> BatchDetachFromIndex)
-> Lens
BatchDetachFromIndex
BatchDetachFromIndex
ObjectReference
ObjectReference
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDetachFromIndex' {ObjectReference
indexReference :: ObjectReference
$sel:indexReference:BatchDetachFromIndex' :: BatchDetachFromIndex -> ObjectReference
indexReference} -> ObjectReference
indexReference) (\s :: BatchDetachFromIndex
s@BatchDetachFromIndex' {} ObjectReference
a -> BatchDetachFromIndex
s {$sel:indexReference:BatchDetachFromIndex' :: ObjectReference
indexReference = ObjectReference
a} :: BatchDetachFromIndex)
batchDetachFromIndex_targetReference :: Lens.Lens' BatchDetachFromIndex ObjectReference
batchDetachFromIndex_targetReference :: (ObjectReference -> f ObjectReference)
-> BatchDetachFromIndex -> f BatchDetachFromIndex
batchDetachFromIndex_targetReference = (BatchDetachFromIndex -> ObjectReference)
-> (BatchDetachFromIndex
-> ObjectReference -> BatchDetachFromIndex)
-> Lens
BatchDetachFromIndex
BatchDetachFromIndex
ObjectReference
ObjectReference
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDetachFromIndex' {ObjectReference
targetReference :: ObjectReference
$sel:targetReference:BatchDetachFromIndex' :: BatchDetachFromIndex -> ObjectReference
targetReference} -> ObjectReference
targetReference) (\s :: BatchDetachFromIndex
s@BatchDetachFromIndex' {} ObjectReference
a -> BatchDetachFromIndex
s {$sel:targetReference:BatchDetachFromIndex' :: ObjectReference
targetReference = ObjectReference
a} :: BatchDetachFromIndex)
instance Prelude.Hashable BatchDetachFromIndex
instance Prelude.NFData BatchDetachFromIndex
instance Core.ToJSON BatchDetachFromIndex where
toJSON :: BatchDetachFromIndex -> Value
toJSON BatchDetachFromIndex' {ObjectReference
targetReference :: ObjectReference
indexReference :: ObjectReference
$sel:targetReference:BatchDetachFromIndex' :: BatchDetachFromIndex -> ObjectReference
$sel:indexReference:BatchDetachFromIndex' :: BatchDetachFromIndex -> 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
"IndexReference" Text -> ObjectReference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ObjectReference
indexReference),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"TargetReference" Text -> ObjectReference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ObjectReference
targetReference)
]
)