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