{-# 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.IoTAnalytics.Types.DeviceRegistryEnrichActivity where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data DeviceRegistryEnrichActivity = DeviceRegistryEnrichActivity'
{
DeviceRegistryEnrichActivity -> Maybe Text
next :: Prelude.Maybe Prelude.Text,
DeviceRegistryEnrichActivity -> Text
name :: Prelude.Text,
DeviceRegistryEnrichActivity -> Text
attribute :: Prelude.Text,
DeviceRegistryEnrichActivity -> Text
thingName :: Prelude.Text,
DeviceRegistryEnrichActivity -> Text
roleArn :: Prelude.Text
}
deriving (DeviceRegistryEnrichActivity
-> DeviceRegistryEnrichActivity -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceRegistryEnrichActivity
-> DeviceRegistryEnrichActivity -> Bool
$c/= :: DeviceRegistryEnrichActivity
-> DeviceRegistryEnrichActivity -> Bool
== :: DeviceRegistryEnrichActivity
-> DeviceRegistryEnrichActivity -> Bool
$c== :: DeviceRegistryEnrichActivity
-> DeviceRegistryEnrichActivity -> Bool
Prelude.Eq, ReadPrec [DeviceRegistryEnrichActivity]
ReadPrec DeviceRegistryEnrichActivity
Int -> ReadS DeviceRegistryEnrichActivity
ReadS [DeviceRegistryEnrichActivity]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeviceRegistryEnrichActivity]
$creadListPrec :: ReadPrec [DeviceRegistryEnrichActivity]
readPrec :: ReadPrec DeviceRegistryEnrichActivity
$creadPrec :: ReadPrec DeviceRegistryEnrichActivity
readList :: ReadS [DeviceRegistryEnrichActivity]
$creadList :: ReadS [DeviceRegistryEnrichActivity]
readsPrec :: Int -> ReadS DeviceRegistryEnrichActivity
$creadsPrec :: Int -> ReadS DeviceRegistryEnrichActivity
Prelude.Read, Int -> DeviceRegistryEnrichActivity -> ShowS
[DeviceRegistryEnrichActivity] -> ShowS
DeviceRegistryEnrichActivity -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeviceRegistryEnrichActivity] -> ShowS
$cshowList :: [DeviceRegistryEnrichActivity] -> ShowS
show :: DeviceRegistryEnrichActivity -> String
$cshow :: DeviceRegistryEnrichActivity -> String
showsPrec :: Int -> DeviceRegistryEnrichActivity -> ShowS
$cshowsPrec :: Int -> DeviceRegistryEnrichActivity -> ShowS
Prelude.Show, forall x.
Rep DeviceRegistryEnrichActivity x -> DeviceRegistryEnrichActivity
forall x.
DeviceRegistryEnrichActivity -> Rep DeviceRegistryEnrichActivity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeviceRegistryEnrichActivity x -> DeviceRegistryEnrichActivity
$cfrom :: forall x.
DeviceRegistryEnrichActivity -> Rep DeviceRegistryEnrichActivity x
Prelude.Generic)
newDeviceRegistryEnrichActivity ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeviceRegistryEnrichActivity
newDeviceRegistryEnrichActivity :: Text -> Text -> Text -> Text -> DeviceRegistryEnrichActivity
newDeviceRegistryEnrichActivity
Text
pName_
Text
pAttribute_
Text
pThingName_
Text
pRoleArn_ =
DeviceRegistryEnrichActivity'
{ $sel:next:DeviceRegistryEnrichActivity' :: Maybe Text
next =
forall a. Maybe a
Prelude.Nothing,
$sel:name:DeviceRegistryEnrichActivity' :: Text
name = Text
pName_,
$sel:attribute:DeviceRegistryEnrichActivity' :: Text
attribute = Text
pAttribute_,
$sel:thingName:DeviceRegistryEnrichActivity' :: Text
thingName = Text
pThingName_,
$sel:roleArn:DeviceRegistryEnrichActivity' :: Text
roleArn = Text
pRoleArn_
}
deviceRegistryEnrichActivity_next :: Lens.Lens' DeviceRegistryEnrichActivity (Prelude.Maybe Prelude.Text)
deviceRegistryEnrichActivity_next :: Lens' DeviceRegistryEnrichActivity (Maybe Text)
deviceRegistryEnrichActivity_next = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceRegistryEnrichActivity' {Maybe Text
next :: Maybe Text
$sel:next:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Maybe Text
next} -> Maybe Text
next) (\s :: DeviceRegistryEnrichActivity
s@DeviceRegistryEnrichActivity' {} Maybe Text
a -> DeviceRegistryEnrichActivity
s {$sel:next:DeviceRegistryEnrichActivity' :: Maybe Text
next = Maybe Text
a} :: DeviceRegistryEnrichActivity)
deviceRegistryEnrichActivity_name :: Lens.Lens' DeviceRegistryEnrichActivity Prelude.Text
deviceRegistryEnrichActivity_name :: Lens' DeviceRegistryEnrichActivity Text
deviceRegistryEnrichActivity_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceRegistryEnrichActivity' {Text
name :: Text
$sel:name:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
name} -> Text
name) (\s :: DeviceRegistryEnrichActivity
s@DeviceRegistryEnrichActivity' {} Text
a -> DeviceRegistryEnrichActivity
s {$sel:name:DeviceRegistryEnrichActivity' :: Text
name = Text
a} :: DeviceRegistryEnrichActivity)
deviceRegistryEnrichActivity_attribute :: Lens.Lens' DeviceRegistryEnrichActivity Prelude.Text
deviceRegistryEnrichActivity_attribute :: Lens' DeviceRegistryEnrichActivity Text
deviceRegistryEnrichActivity_attribute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceRegistryEnrichActivity' {Text
attribute :: Text
$sel:attribute:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
attribute} -> Text
attribute) (\s :: DeviceRegistryEnrichActivity
s@DeviceRegistryEnrichActivity' {} Text
a -> DeviceRegistryEnrichActivity
s {$sel:attribute:DeviceRegistryEnrichActivity' :: Text
attribute = Text
a} :: DeviceRegistryEnrichActivity)
deviceRegistryEnrichActivity_thingName :: Lens.Lens' DeviceRegistryEnrichActivity Prelude.Text
deviceRegistryEnrichActivity_thingName :: Lens' DeviceRegistryEnrichActivity Text
deviceRegistryEnrichActivity_thingName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceRegistryEnrichActivity' {Text
thingName :: Text
$sel:thingName:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
thingName} -> Text
thingName) (\s :: DeviceRegistryEnrichActivity
s@DeviceRegistryEnrichActivity' {} Text
a -> DeviceRegistryEnrichActivity
s {$sel:thingName:DeviceRegistryEnrichActivity' :: Text
thingName = Text
a} :: DeviceRegistryEnrichActivity)
deviceRegistryEnrichActivity_roleArn :: Lens.Lens' DeviceRegistryEnrichActivity Prelude.Text
deviceRegistryEnrichActivity_roleArn :: Lens' DeviceRegistryEnrichActivity Text
deviceRegistryEnrichActivity_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceRegistryEnrichActivity' {Text
roleArn :: Text
$sel:roleArn:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
roleArn} -> Text
roleArn) (\s :: DeviceRegistryEnrichActivity
s@DeviceRegistryEnrichActivity' {} Text
a -> DeviceRegistryEnrichActivity
s {$sel:roleArn:DeviceRegistryEnrichActivity' :: Text
roleArn = Text
a} :: DeviceRegistryEnrichActivity)
instance Data.FromJSON DeviceRegistryEnrichActivity where
parseJSON :: Value -> Parser DeviceRegistryEnrichActivity
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DeviceRegistryEnrichActivity"
( \Object
x ->
Maybe Text
-> Text -> Text -> Text -> Text -> DeviceRegistryEnrichActivity
DeviceRegistryEnrichActivity'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"next")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"name")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"attribute")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"thingName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"roleArn")
)
instance
Prelude.Hashable
DeviceRegistryEnrichActivity
where
hashWithSalt :: Int -> DeviceRegistryEnrichActivity -> Int
hashWithSalt Int
_salt DeviceRegistryEnrichActivity' {Maybe Text
Text
roleArn :: Text
thingName :: Text
attribute :: Text
name :: Text
next :: Maybe Text
$sel:roleArn:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:thingName:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:attribute:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:name:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:next:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
next
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
attribute
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
thingName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn
instance Prelude.NFData DeviceRegistryEnrichActivity where
rnf :: DeviceRegistryEnrichActivity -> ()
rnf DeviceRegistryEnrichActivity' {Maybe Text
Text
roleArn :: Text
thingName :: Text
attribute :: Text
name :: Text
next :: Maybe Text
$sel:roleArn:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:thingName:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:attribute:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:name:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:next:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
next
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
attribute
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
thingName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn
instance Data.ToJSON DeviceRegistryEnrichActivity where
toJSON :: DeviceRegistryEnrichActivity -> Value
toJSON DeviceRegistryEnrichActivity' {Maybe Text
Text
roleArn :: Text
thingName :: Text
attribute :: Text
name :: Text
next :: Maybe Text
$sel:roleArn:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:thingName:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:attribute:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:name:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Text
$sel:next:DeviceRegistryEnrichActivity' :: DeviceRegistryEnrichActivity -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"next" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
next,
forall a. a -> Maybe a
Prelude.Just (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
forall a. a -> Maybe a
Prelude.Just (Key
"attribute" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
attribute),
forall a. a -> Maybe a
Prelude.Just (Key
"thingName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
thingName),
forall a. a -> Maybe a
Prelude.Just (Key
"roleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleArn)
]
)