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