{-# 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.ManagedBlockChain.Types.RemoveAction where
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 RemoveAction = RemoveAction'
{
RemoveAction -> Text
memberId :: Prelude.Text
}
deriving (RemoveAction -> RemoveAction -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveAction -> RemoveAction -> Bool
$c/= :: RemoveAction -> RemoveAction -> Bool
== :: RemoveAction -> RemoveAction -> Bool
$c== :: RemoveAction -> RemoveAction -> Bool
Prelude.Eq, ReadPrec [RemoveAction]
ReadPrec RemoveAction
Int -> ReadS RemoveAction
ReadS [RemoveAction]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveAction]
$creadListPrec :: ReadPrec [RemoveAction]
readPrec :: ReadPrec RemoveAction
$creadPrec :: ReadPrec RemoveAction
readList :: ReadS [RemoveAction]
$creadList :: ReadS [RemoveAction]
readsPrec :: Int -> ReadS RemoveAction
$creadsPrec :: Int -> ReadS RemoveAction
Prelude.Read, Int -> RemoveAction -> ShowS
[RemoveAction] -> ShowS
RemoveAction -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveAction] -> ShowS
$cshowList :: [RemoveAction] -> ShowS
show :: RemoveAction -> String
$cshow :: RemoveAction -> String
showsPrec :: Int -> RemoveAction -> ShowS
$cshowsPrec :: Int -> RemoveAction -> ShowS
Prelude.Show, forall x. Rep RemoveAction x -> RemoveAction
forall x. RemoveAction -> Rep RemoveAction x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RemoveAction x -> RemoveAction
$cfrom :: forall x. RemoveAction -> Rep RemoveAction x
Prelude.Generic)
newRemoveAction ::
Prelude.Text ->
RemoveAction
newRemoveAction :: Text -> RemoveAction
newRemoveAction Text
pMemberId_ =
RemoveAction' {$sel:memberId:RemoveAction' :: Text
memberId = Text
pMemberId_}
removeAction_memberId :: Lens.Lens' RemoveAction Prelude.Text
removeAction_memberId :: Lens' RemoveAction Text
removeAction_memberId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveAction' {Text
memberId :: Text
$sel:memberId:RemoveAction' :: RemoveAction -> Text
memberId} -> Text
memberId) (\s :: RemoveAction
s@RemoveAction' {} Text
a -> RemoveAction
s {$sel:memberId:RemoveAction' :: Text
memberId = Text
a} :: RemoveAction)
instance Data.FromJSON RemoveAction where
parseJSON :: Value -> Parser RemoveAction
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"RemoveAction"
( \Object
x ->
Text -> RemoveAction
RemoveAction' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"MemberId")
)
instance Prelude.Hashable RemoveAction where
hashWithSalt :: Int -> RemoveAction -> Int
hashWithSalt Int
_salt RemoveAction' {Text
memberId :: Text
$sel:memberId:RemoveAction' :: RemoveAction -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
memberId
instance Prelude.NFData RemoveAction where
rnf :: RemoveAction -> ()
rnf RemoveAction' {Text
memberId :: Text
$sel:memberId:RemoveAction' :: RemoveAction -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
memberId
instance Data.ToJSON RemoveAction where
toJSON :: RemoveAction -> Value
toJSON RemoveAction' {Text
memberId :: Text
$sel:memberId:RemoveAction' :: RemoveAction -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"MemberId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
memberId)]
)