{-# 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.IoTEventsData.Types.AcknowledgeAlarmActionRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AcknowledgeAlarmActionRequest = AcknowledgeAlarmActionRequest'
{
AcknowledgeAlarmActionRequest -> Maybe Text
keyValue :: Prelude.Maybe Prelude.Text,
AcknowledgeAlarmActionRequest -> Maybe Text
note :: Prelude.Maybe Prelude.Text,
AcknowledgeAlarmActionRequest -> Text
requestId :: Prelude.Text,
AcknowledgeAlarmActionRequest -> Text
alarmModelName :: Prelude.Text
}
deriving (AcknowledgeAlarmActionRequest
-> AcknowledgeAlarmActionRequest -> Bool
(AcknowledgeAlarmActionRequest
-> AcknowledgeAlarmActionRequest -> Bool)
-> (AcknowledgeAlarmActionRequest
-> AcknowledgeAlarmActionRequest -> Bool)
-> Eq AcknowledgeAlarmActionRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AcknowledgeAlarmActionRequest
-> AcknowledgeAlarmActionRequest -> Bool
$c/= :: AcknowledgeAlarmActionRequest
-> AcknowledgeAlarmActionRequest -> Bool
== :: AcknowledgeAlarmActionRequest
-> AcknowledgeAlarmActionRequest -> Bool
$c== :: AcknowledgeAlarmActionRequest
-> AcknowledgeAlarmActionRequest -> Bool
Prelude.Eq, ReadPrec [AcknowledgeAlarmActionRequest]
ReadPrec AcknowledgeAlarmActionRequest
Int -> ReadS AcknowledgeAlarmActionRequest
ReadS [AcknowledgeAlarmActionRequest]
(Int -> ReadS AcknowledgeAlarmActionRequest)
-> ReadS [AcknowledgeAlarmActionRequest]
-> ReadPrec AcknowledgeAlarmActionRequest
-> ReadPrec [AcknowledgeAlarmActionRequest]
-> Read AcknowledgeAlarmActionRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AcknowledgeAlarmActionRequest]
$creadListPrec :: ReadPrec [AcknowledgeAlarmActionRequest]
readPrec :: ReadPrec AcknowledgeAlarmActionRequest
$creadPrec :: ReadPrec AcknowledgeAlarmActionRequest
readList :: ReadS [AcknowledgeAlarmActionRequest]
$creadList :: ReadS [AcknowledgeAlarmActionRequest]
readsPrec :: Int -> ReadS AcknowledgeAlarmActionRequest
$creadsPrec :: Int -> ReadS AcknowledgeAlarmActionRequest
Prelude.Read, Int -> AcknowledgeAlarmActionRequest -> ShowS
[AcknowledgeAlarmActionRequest] -> ShowS
AcknowledgeAlarmActionRequest -> String
(Int -> AcknowledgeAlarmActionRequest -> ShowS)
-> (AcknowledgeAlarmActionRequest -> String)
-> ([AcknowledgeAlarmActionRequest] -> ShowS)
-> Show AcknowledgeAlarmActionRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AcknowledgeAlarmActionRequest] -> ShowS
$cshowList :: [AcknowledgeAlarmActionRequest] -> ShowS
show :: AcknowledgeAlarmActionRequest -> String
$cshow :: AcknowledgeAlarmActionRequest -> String
showsPrec :: Int -> AcknowledgeAlarmActionRequest -> ShowS
$cshowsPrec :: Int -> AcknowledgeAlarmActionRequest -> ShowS
Prelude.Show, (forall x.
AcknowledgeAlarmActionRequest
-> Rep AcknowledgeAlarmActionRequest x)
-> (forall x.
Rep AcknowledgeAlarmActionRequest x
-> AcknowledgeAlarmActionRequest)
-> Generic AcknowledgeAlarmActionRequest
forall x.
Rep AcknowledgeAlarmActionRequest x
-> AcknowledgeAlarmActionRequest
forall x.
AcknowledgeAlarmActionRequest
-> Rep AcknowledgeAlarmActionRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AcknowledgeAlarmActionRequest x
-> AcknowledgeAlarmActionRequest
$cfrom :: forall x.
AcknowledgeAlarmActionRequest
-> Rep AcknowledgeAlarmActionRequest x
Prelude.Generic)
newAcknowledgeAlarmActionRequest ::
Prelude.Text ->
Prelude.Text ->
AcknowledgeAlarmActionRequest
newAcknowledgeAlarmActionRequest :: Text -> Text -> AcknowledgeAlarmActionRequest
newAcknowledgeAlarmActionRequest
Text
pRequestId_
Text
pAlarmModelName_ =
AcknowledgeAlarmActionRequest' :: Maybe Text
-> Maybe Text -> Text -> Text -> AcknowledgeAlarmActionRequest
AcknowledgeAlarmActionRequest'
{ $sel:keyValue:AcknowledgeAlarmActionRequest' :: Maybe Text
keyValue =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:note:AcknowledgeAlarmActionRequest' :: Maybe Text
note = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requestId:AcknowledgeAlarmActionRequest' :: Text
requestId = Text
pRequestId_,
$sel:alarmModelName:AcknowledgeAlarmActionRequest' :: Text
alarmModelName = Text
pAlarmModelName_
}
acknowledgeAlarmActionRequest_keyValue :: Lens.Lens' AcknowledgeAlarmActionRequest (Prelude.Maybe Prelude.Text)
acknowledgeAlarmActionRequest_keyValue :: (Maybe Text -> f (Maybe Text))
-> AcknowledgeAlarmActionRequest -> f AcknowledgeAlarmActionRequest
acknowledgeAlarmActionRequest_keyValue = (AcknowledgeAlarmActionRequest -> Maybe Text)
-> (AcknowledgeAlarmActionRequest
-> Maybe Text -> AcknowledgeAlarmActionRequest)
-> Lens
AcknowledgeAlarmActionRequest
AcknowledgeAlarmActionRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcknowledgeAlarmActionRequest' {Maybe Text
keyValue :: Maybe Text
$sel:keyValue:AcknowledgeAlarmActionRequest' :: AcknowledgeAlarmActionRequest -> Maybe Text
keyValue} -> Maybe Text
keyValue) (\s :: AcknowledgeAlarmActionRequest
s@AcknowledgeAlarmActionRequest' {} Maybe Text
a -> AcknowledgeAlarmActionRequest
s {$sel:keyValue:AcknowledgeAlarmActionRequest' :: Maybe Text
keyValue = Maybe Text
a} :: AcknowledgeAlarmActionRequest)
acknowledgeAlarmActionRequest_note :: Lens.Lens' AcknowledgeAlarmActionRequest (Prelude.Maybe Prelude.Text)
acknowledgeAlarmActionRequest_note :: (Maybe Text -> f (Maybe Text))
-> AcknowledgeAlarmActionRequest -> f AcknowledgeAlarmActionRequest
acknowledgeAlarmActionRequest_note = (AcknowledgeAlarmActionRequest -> Maybe Text)
-> (AcknowledgeAlarmActionRequest
-> Maybe Text -> AcknowledgeAlarmActionRequest)
-> Lens
AcknowledgeAlarmActionRequest
AcknowledgeAlarmActionRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcknowledgeAlarmActionRequest' {Maybe Text
note :: Maybe Text
$sel:note:AcknowledgeAlarmActionRequest' :: AcknowledgeAlarmActionRequest -> Maybe Text
note} -> Maybe Text
note) (\s :: AcknowledgeAlarmActionRequest
s@AcknowledgeAlarmActionRequest' {} Maybe Text
a -> AcknowledgeAlarmActionRequest
s {$sel:note:AcknowledgeAlarmActionRequest' :: Maybe Text
note = Maybe Text
a} :: AcknowledgeAlarmActionRequest)
acknowledgeAlarmActionRequest_requestId :: Lens.Lens' AcknowledgeAlarmActionRequest Prelude.Text
acknowledgeAlarmActionRequest_requestId :: (Text -> f Text)
-> AcknowledgeAlarmActionRequest -> f AcknowledgeAlarmActionRequest
acknowledgeAlarmActionRequest_requestId = (AcknowledgeAlarmActionRequest -> Text)
-> (AcknowledgeAlarmActionRequest
-> Text -> AcknowledgeAlarmActionRequest)
-> Lens
AcknowledgeAlarmActionRequest
AcknowledgeAlarmActionRequest
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcknowledgeAlarmActionRequest' {Text
requestId :: Text
$sel:requestId:AcknowledgeAlarmActionRequest' :: AcknowledgeAlarmActionRequest -> Text
requestId} -> Text
requestId) (\s :: AcknowledgeAlarmActionRequest
s@AcknowledgeAlarmActionRequest' {} Text
a -> AcknowledgeAlarmActionRequest
s {$sel:requestId:AcknowledgeAlarmActionRequest' :: Text
requestId = Text
a} :: AcknowledgeAlarmActionRequest)
acknowledgeAlarmActionRequest_alarmModelName :: Lens.Lens' AcknowledgeAlarmActionRequest Prelude.Text
acknowledgeAlarmActionRequest_alarmModelName :: (Text -> f Text)
-> AcknowledgeAlarmActionRequest -> f AcknowledgeAlarmActionRequest
acknowledgeAlarmActionRequest_alarmModelName = (AcknowledgeAlarmActionRequest -> Text)
-> (AcknowledgeAlarmActionRequest
-> Text -> AcknowledgeAlarmActionRequest)
-> Lens
AcknowledgeAlarmActionRequest
AcknowledgeAlarmActionRequest
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AcknowledgeAlarmActionRequest' {Text
alarmModelName :: Text
$sel:alarmModelName:AcknowledgeAlarmActionRequest' :: AcknowledgeAlarmActionRequest -> Text
alarmModelName} -> Text
alarmModelName) (\s :: AcknowledgeAlarmActionRequest
s@AcknowledgeAlarmActionRequest' {} Text
a -> AcknowledgeAlarmActionRequest
s {$sel:alarmModelName:AcknowledgeAlarmActionRequest' :: Text
alarmModelName = Text
a} :: AcknowledgeAlarmActionRequest)
instance
Prelude.Hashable
AcknowledgeAlarmActionRequest
instance Prelude.NFData AcknowledgeAlarmActionRequest
instance Core.ToJSON AcknowledgeAlarmActionRequest where
toJSON :: AcknowledgeAlarmActionRequest -> Value
toJSON AcknowledgeAlarmActionRequest' {Maybe Text
Text
alarmModelName :: Text
requestId :: Text
note :: Maybe Text
keyValue :: Maybe Text
$sel:alarmModelName:AcknowledgeAlarmActionRequest' :: AcknowledgeAlarmActionRequest -> Text
$sel:requestId:AcknowledgeAlarmActionRequest' :: AcknowledgeAlarmActionRequest -> Text
$sel:note:AcknowledgeAlarmActionRequest' :: AcknowledgeAlarmActionRequest -> Maybe Text
$sel:keyValue:AcknowledgeAlarmActionRequest' :: AcknowledgeAlarmActionRequest -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"keyValue" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
keyValue,
(Text
"note" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
note,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"requestId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
requestId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"alarmModelName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
alarmModelName)
]
)