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