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