{-# 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.Lens as Lens
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
(DeviceRegistryEnrichActivity
-> DeviceRegistryEnrichActivity -> Bool)
-> (DeviceRegistryEnrichActivity
-> DeviceRegistryEnrichActivity -> Bool)
-> Eq DeviceRegistryEnrichActivity
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]
(Int -> ReadS DeviceRegistryEnrichActivity)
-> ReadS [DeviceRegistryEnrichActivity]
-> ReadPrec DeviceRegistryEnrichActivity
-> ReadPrec [DeviceRegistryEnrichActivity]
-> Read 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
(Int -> DeviceRegistryEnrichActivity -> ShowS)
-> (DeviceRegistryEnrichActivity -> String)
-> ([DeviceRegistryEnrichActivity] -> ShowS)
-> Show DeviceRegistryEnrichActivity
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.
DeviceRegistryEnrichActivity -> Rep DeviceRegistryEnrichActivity x)
-> (forall x.
Rep DeviceRegistryEnrichActivity x -> DeviceRegistryEnrichActivity)
-> Generic DeviceRegistryEnrichActivity
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' :: Maybe Text
-> Text -> Text -> Text -> Text -> DeviceRegistryEnrichActivity
DeviceRegistryEnrichActivity'
{ $sel:next:DeviceRegistryEnrichActivity' :: Maybe Text
next =
Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> DeviceRegistryEnrichActivity -> f DeviceRegistryEnrichActivity
deviceRegistryEnrichActivity_next = (DeviceRegistryEnrichActivity -> Maybe Text)
-> (DeviceRegistryEnrichActivity
-> Maybe Text -> DeviceRegistryEnrichActivity)
-> Lens
DeviceRegistryEnrichActivity
DeviceRegistryEnrichActivity
(Maybe Text)
(Maybe Text)
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 :: (Text -> f Text)
-> DeviceRegistryEnrichActivity -> f DeviceRegistryEnrichActivity
deviceRegistryEnrichActivity_name = (DeviceRegistryEnrichActivity -> Text)
-> (DeviceRegistryEnrichActivity
-> Text -> DeviceRegistryEnrichActivity)
-> Lens
DeviceRegistryEnrichActivity DeviceRegistryEnrichActivity Text Text
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 :: (Text -> f Text)
-> DeviceRegistryEnrichActivity -> f DeviceRegistryEnrichActivity
deviceRegistryEnrichActivity_attribute = (DeviceRegistryEnrichActivity -> Text)
-> (DeviceRegistryEnrichActivity
-> Text -> DeviceRegistryEnrichActivity)
-> Lens
DeviceRegistryEnrichActivity DeviceRegistryEnrichActivity Text Text
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 :: (Text -> f Text)
-> DeviceRegistryEnrichActivity -> f DeviceRegistryEnrichActivity
deviceRegistryEnrichActivity_thingName = (DeviceRegistryEnrichActivity -> Text)
-> (DeviceRegistryEnrichActivity
-> Text -> DeviceRegistryEnrichActivity)
-> Lens
DeviceRegistryEnrichActivity DeviceRegistryEnrichActivity Text Text
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 :: (Text -> f Text)
-> DeviceRegistryEnrichActivity -> f DeviceRegistryEnrichActivity
deviceRegistryEnrichActivity_roleArn = (DeviceRegistryEnrichActivity -> Text)
-> (DeviceRegistryEnrichActivity
-> Text -> DeviceRegistryEnrichActivity)
-> Lens
DeviceRegistryEnrichActivity DeviceRegistryEnrichActivity Text Text
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 Core.FromJSON DeviceRegistryEnrichActivity where
parseJSON :: Value -> Parser DeviceRegistryEnrichActivity
parseJSON =
String
-> (Object -> Parser DeviceRegistryEnrichActivity)
-> Value
-> Parser DeviceRegistryEnrichActivity
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeviceRegistryEnrichActivity"
( \Object
x ->
Maybe Text
-> Text -> Text -> Text -> Text -> DeviceRegistryEnrichActivity
DeviceRegistryEnrichActivity'
(Maybe Text
-> Text -> Text -> Text -> Text -> DeviceRegistryEnrichActivity)
-> Parser (Maybe Text)
-> Parser
(Text -> Text -> Text -> Text -> DeviceRegistryEnrichActivity)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"next")
Parser
(Text -> Text -> Text -> Text -> DeviceRegistryEnrichActivity)
-> Parser Text
-> Parser (Text -> Text -> Text -> DeviceRegistryEnrichActivity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"name")
Parser (Text -> Text -> Text -> DeviceRegistryEnrichActivity)
-> Parser Text
-> Parser (Text -> Text -> DeviceRegistryEnrichActivity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"attribute")
Parser (Text -> Text -> DeviceRegistryEnrichActivity)
-> Parser Text -> Parser (Text -> DeviceRegistryEnrichActivity)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"thingName")
Parser (Text -> DeviceRegistryEnrichActivity)
-> Parser Text -> Parser DeviceRegistryEnrichActivity
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"roleArn")
)
instance
Prelude.Hashable
DeviceRegistryEnrichActivity
instance Prelude.NFData DeviceRegistryEnrichActivity
instance Core.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
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"next" 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
next,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"attribute" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
attribute),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"thingName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
thingName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"roleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
roleArn)
]
)