{-# 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.SecurityHub.Types.NoteUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NoteUpdate = NoteUpdate'
{
NoteUpdate -> Text
text :: Prelude.Text,
NoteUpdate -> Text
updatedBy :: Prelude.Text
}
deriving (NoteUpdate -> NoteUpdate -> Bool
(NoteUpdate -> NoteUpdate -> Bool)
-> (NoteUpdate -> NoteUpdate -> Bool) -> Eq NoteUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NoteUpdate -> NoteUpdate -> Bool
$c/= :: NoteUpdate -> NoteUpdate -> Bool
== :: NoteUpdate -> NoteUpdate -> Bool
$c== :: NoteUpdate -> NoteUpdate -> Bool
Prelude.Eq, ReadPrec [NoteUpdate]
ReadPrec NoteUpdate
Int -> ReadS NoteUpdate
ReadS [NoteUpdate]
(Int -> ReadS NoteUpdate)
-> ReadS [NoteUpdate]
-> ReadPrec NoteUpdate
-> ReadPrec [NoteUpdate]
-> Read NoteUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NoteUpdate]
$creadListPrec :: ReadPrec [NoteUpdate]
readPrec :: ReadPrec NoteUpdate
$creadPrec :: ReadPrec NoteUpdate
readList :: ReadS [NoteUpdate]
$creadList :: ReadS [NoteUpdate]
readsPrec :: Int -> ReadS NoteUpdate
$creadsPrec :: Int -> ReadS NoteUpdate
Prelude.Read, Int -> NoteUpdate -> ShowS
[NoteUpdate] -> ShowS
NoteUpdate -> String
(Int -> NoteUpdate -> ShowS)
-> (NoteUpdate -> String)
-> ([NoteUpdate] -> ShowS)
-> Show NoteUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NoteUpdate] -> ShowS
$cshowList :: [NoteUpdate] -> ShowS
show :: NoteUpdate -> String
$cshow :: NoteUpdate -> String
showsPrec :: Int -> NoteUpdate -> ShowS
$cshowsPrec :: Int -> NoteUpdate -> ShowS
Prelude.Show, (forall x. NoteUpdate -> Rep NoteUpdate x)
-> (forall x. Rep NoteUpdate x -> NoteUpdate) -> Generic NoteUpdate
forall x. Rep NoteUpdate x -> NoteUpdate
forall x. NoteUpdate -> Rep NoteUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NoteUpdate x -> NoteUpdate
$cfrom :: forall x. NoteUpdate -> Rep NoteUpdate x
Prelude.Generic)
newNoteUpdate ::
Prelude.Text ->
Prelude.Text ->
NoteUpdate
newNoteUpdate :: Text -> Text -> NoteUpdate
newNoteUpdate Text
pText_ Text
pUpdatedBy_ =
NoteUpdate' :: Text -> Text -> NoteUpdate
NoteUpdate' {$sel:text:NoteUpdate' :: Text
text = Text
pText_, $sel:updatedBy:NoteUpdate' :: Text
updatedBy = Text
pUpdatedBy_}
noteUpdate_text :: Lens.Lens' NoteUpdate Prelude.Text
noteUpdate_text :: (Text -> f Text) -> NoteUpdate -> f NoteUpdate
noteUpdate_text = (NoteUpdate -> Text)
-> (NoteUpdate -> Text -> NoteUpdate)
-> Lens NoteUpdate NoteUpdate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NoteUpdate' {Text
text :: Text
$sel:text:NoteUpdate' :: NoteUpdate -> Text
text} -> Text
text) (\s :: NoteUpdate
s@NoteUpdate' {} Text
a -> NoteUpdate
s {$sel:text:NoteUpdate' :: Text
text = Text
a} :: NoteUpdate)
noteUpdate_updatedBy :: Lens.Lens' NoteUpdate Prelude.Text
noteUpdate_updatedBy :: (Text -> f Text) -> NoteUpdate -> f NoteUpdate
noteUpdate_updatedBy = (NoteUpdate -> Text)
-> (NoteUpdate -> Text -> NoteUpdate)
-> Lens NoteUpdate NoteUpdate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NoteUpdate' {Text
updatedBy :: Text
$sel:updatedBy:NoteUpdate' :: NoteUpdate -> Text
updatedBy} -> Text
updatedBy) (\s :: NoteUpdate
s@NoteUpdate' {} Text
a -> NoteUpdate
s {$sel:updatedBy:NoteUpdate' :: Text
updatedBy = Text
a} :: NoteUpdate)
instance Prelude.Hashable NoteUpdate
instance Prelude.NFData NoteUpdate
instance Core.ToJSON NoteUpdate where
toJSON :: NoteUpdate -> Value
toJSON NoteUpdate' {Text
updatedBy :: Text
text :: Text
$sel:updatedBy:NoteUpdate' :: NoteUpdate -> Text
$sel:text:NoteUpdate' :: NoteUpdate -> Text
..} =
[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
"Text" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
text),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UpdatedBy" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
updatedBy)
]
)