{-# 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.ResetAlarmActionRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ResetAlarmActionRequest = ResetAlarmActionRequest'
{
ResetAlarmActionRequest -> Maybe Text
keyValue :: Prelude.Maybe Prelude.Text,
ResetAlarmActionRequest -> Maybe Text
note :: Prelude.Maybe Prelude.Text,
ResetAlarmActionRequest -> Text
requestId :: Prelude.Text,
ResetAlarmActionRequest -> Text
alarmModelName :: Prelude.Text
}
deriving (ResetAlarmActionRequest -> ResetAlarmActionRequest -> Bool
(ResetAlarmActionRequest -> ResetAlarmActionRequest -> Bool)
-> (ResetAlarmActionRequest -> ResetAlarmActionRequest -> Bool)
-> Eq ResetAlarmActionRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResetAlarmActionRequest -> ResetAlarmActionRequest -> Bool
$c/= :: ResetAlarmActionRequest -> ResetAlarmActionRequest -> Bool
== :: ResetAlarmActionRequest -> ResetAlarmActionRequest -> Bool
$c== :: ResetAlarmActionRequest -> ResetAlarmActionRequest -> Bool
Prelude.Eq, ReadPrec [ResetAlarmActionRequest]
ReadPrec ResetAlarmActionRequest
Int -> ReadS ResetAlarmActionRequest
ReadS [ResetAlarmActionRequest]
(Int -> ReadS ResetAlarmActionRequest)
-> ReadS [ResetAlarmActionRequest]
-> ReadPrec ResetAlarmActionRequest
-> ReadPrec [ResetAlarmActionRequest]
-> Read ResetAlarmActionRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResetAlarmActionRequest]
$creadListPrec :: ReadPrec [ResetAlarmActionRequest]
readPrec :: ReadPrec ResetAlarmActionRequest
$creadPrec :: ReadPrec ResetAlarmActionRequest
readList :: ReadS [ResetAlarmActionRequest]
$creadList :: ReadS [ResetAlarmActionRequest]
readsPrec :: Int -> ReadS ResetAlarmActionRequest
$creadsPrec :: Int -> ReadS ResetAlarmActionRequest
Prelude.Read, Int -> ResetAlarmActionRequest -> ShowS
[ResetAlarmActionRequest] -> ShowS
ResetAlarmActionRequest -> String
(Int -> ResetAlarmActionRequest -> ShowS)
-> (ResetAlarmActionRequest -> String)
-> ([ResetAlarmActionRequest] -> ShowS)
-> Show ResetAlarmActionRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResetAlarmActionRequest] -> ShowS
$cshowList :: [ResetAlarmActionRequest] -> ShowS
show :: ResetAlarmActionRequest -> String
$cshow :: ResetAlarmActionRequest -> String
showsPrec :: Int -> ResetAlarmActionRequest -> ShowS
$cshowsPrec :: Int -> ResetAlarmActionRequest -> ShowS
Prelude.Show, (forall x.
ResetAlarmActionRequest -> Rep ResetAlarmActionRequest x)
-> (forall x.
Rep ResetAlarmActionRequest x -> ResetAlarmActionRequest)
-> Generic ResetAlarmActionRequest
forall x. Rep ResetAlarmActionRequest x -> ResetAlarmActionRequest
forall x. ResetAlarmActionRequest -> Rep ResetAlarmActionRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResetAlarmActionRequest x -> ResetAlarmActionRequest
$cfrom :: forall x. ResetAlarmActionRequest -> Rep ResetAlarmActionRequest x
Prelude.Generic)
newResetAlarmActionRequest ::
Prelude.Text ->
Prelude.Text ->
ResetAlarmActionRequest
newResetAlarmActionRequest :: Text -> Text -> ResetAlarmActionRequest
newResetAlarmActionRequest
Text
pRequestId_
Text
pAlarmModelName_ =
ResetAlarmActionRequest' :: Maybe Text -> Maybe Text -> Text -> Text -> ResetAlarmActionRequest
ResetAlarmActionRequest'
{ $sel:keyValue:ResetAlarmActionRequest' :: Maybe Text
keyValue =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:note:ResetAlarmActionRequest' :: Maybe Text
note = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requestId:ResetAlarmActionRequest' :: Text
requestId = Text
pRequestId_,
$sel:alarmModelName:ResetAlarmActionRequest' :: Text
alarmModelName = Text
pAlarmModelName_
}
resetAlarmActionRequest_keyValue :: Lens.Lens' ResetAlarmActionRequest (Prelude.Maybe Prelude.Text)
resetAlarmActionRequest_keyValue :: (Maybe Text -> f (Maybe Text))
-> ResetAlarmActionRequest -> f ResetAlarmActionRequest
resetAlarmActionRequest_keyValue = (ResetAlarmActionRequest -> Maybe Text)
-> (ResetAlarmActionRequest
-> Maybe Text -> ResetAlarmActionRequest)
-> Lens
ResetAlarmActionRequest
ResetAlarmActionRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetAlarmActionRequest' {Maybe Text
keyValue :: Maybe Text
$sel:keyValue:ResetAlarmActionRequest' :: ResetAlarmActionRequest -> Maybe Text
keyValue} -> Maybe Text
keyValue) (\s :: ResetAlarmActionRequest
s@ResetAlarmActionRequest' {} Maybe Text
a -> ResetAlarmActionRequest
s {$sel:keyValue:ResetAlarmActionRequest' :: Maybe Text
keyValue = Maybe Text
a} :: ResetAlarmActionRequest)
resetAlarmActionRequest_note :: Lens.Lens' ResetAlarmActionRequest (Prelude.Maybe Prelude.Text)
resetAlarmActionRequest_note :: (Maybe Text -> f (Maybe Text))
-> ResetAlarmActionRequest -> f ResetAlarmActionRequest
resetAlarmActionRequest_note = (ResetAlarmActionRequest -> Maybe Text)
-> (ResetAlarmActionRequest
-> Maybe Text -> ResetAlarmActionRequest)
-> Lens
ResetAlarmActionRequest
ResetAlarmActionRequest
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetAlarmActionRequest' {Maybe Text
note :: Maybe Text
$sel:note:ResetAlarmActionRequest' :: ResetAlarmActionRequest -> Maybe Text
note} -> Maybe Text
note) (\s :: ResetAlarmActionRequest
s@ResetAlarmActionRequest' {} Maybe Text
a -> ResetAlarmActionRequest
s {$sel:note:ResetAlarmActionRequest' :: Maybe Text
note = Maybe Text
a} :: ResetAlarmActionRequest)
resetAlarmActionRequest_requestId :: Lens.Lens' ResetAlarmActionRequest Prelude.Text
resetAlarmActionRequest_requestId :: (Text -> f Text)
-> ResetAlarmActionRequest -> f ResetAlarmActionRequest
resetAlarmActionRequest_requestId = (ResetAlarmActionRequest -> Text)
-> (ResetAlarmActionRequest -> Text -> ResetAlarmActionRequest)
-> Lens ResetAlarmActionRequest ResetAlarmActionRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetAlarmActionRequest' {Text
requestId :: Text
$sel:requestId:ResetAlarmActionRequest' :: ResetAlarmActionRequest -> Text
requestId} -> Text
requestId) (\s :: ResetAlarmActionRequest
s@ResetAlarmActionRequest' {} Text
a -> ResetAlarmActionRequest
s {$sel:requestId:ResetAlarmActionRequest' :: Text
requestId = Text
a} :: ResetAlarmActionRequest)
resetAlarmActionRequest_alarmModelName :: Lens.Lens' ResetAlarmActionRequest Prelude.Text
resetAlarmActionRequest_alarmModelName :: (Text -> f Text)
-> ResetAlarmActionRequest -> f ResetAlarmActionRequest
resetAlarmActionRequest_alarmModelName = (ResetAlarmActionRequest -> Text)
-> (ResetAlarmActionRequest -> Text -> ResetAlarmActionRequest)
-> Lens ResetAlarmActionRequest ResetAlarmActionRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResetAlarmActionRequest' {Text
alarmModelName :: Text
$sel:alarmModelName:ResetAlarmActionRequest' :: ResetAlarmActionRequest -> Text
alarmModelName} -> Text
alarmModelName) (\s :: ResetAlarmActionRequest
s@ResetAlarmActionRequest' {} Text
a -> ResetAlarmActionRequest
s {$sel:alarmModelName:ResetAlarmActionRequest' :: Text
alarmModelName = Text
a} :: ResetAlarmActionRequest)
instance Prelude.Hashable ResetAlarmActionRequest
instance Prelude.NFData ResetAlarmActionRequest
instance Core.ToJSON ResetAlarmActionRequest where
toJSON :: ResetAlarmActionRequest -> Value
toJSON ResetAlarmActionRequest' {Maybe Text
Text
alarmModelName :: Text
requestId :: Text
note :: Maybe Text
keyValue :: Maybe Text
$sel:alarmModelName:ResetAlarmActionRequest' :: ResetAlarmActionRequest -> Text
$sel:requestId:ResetAlarmActionRequest' :: ResetAlarmActionRequest -> Text
$sel:note:ResetAlarmActionRequest' :: ResetAlarmActionRequest -> Maybe Text
$sel:keyValue:ResetAlarmActionRequest' :: ResetAlarmActionRequest -> 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)
]
)