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