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