{-# 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.IoTSiteWise.Types.GatewayCapabilitySummary where
import qualified Amazonka.Core as Core
import Amazonka.IoTSiteWise.Types.CapabilitySyncStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data GatewayCapabilitySummary = GatewayCapabilitySummary'
{
GatewayCapabilitySummary -> Text
capabilityNamespace :: Prelude.Text,
GatewayCapabilitySummary -> CapabilitySyncStatus
capabilitySyncStatus :: CapabilitySyncStatus
}
deriving (GatewayCapabilitySummary -> GatewayCapabilitySummary -> Bool
(GatewayCapabilitySummary -> GatewayCapabilitySummary -> Bool)
-> (GatewayCapabilitySummary -> GatewayCapabilitySummary -> Bool)
-> Eq GatewayCapabilitySummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GatewayCapabilitySummary -> GatewayCapabilitySummary -> Bool
$c/= :: GatewayCapabilitySummary -> GatewayCapabilitySummary -> Bool
== :: GatewayCapabilitySummary -> GatewayCapabilitySummary -> Bool
$c== :: GatewayCapabilitySummary -> GatewayCapabilitySummary -> Bool
Prelude.Eq, ReadPrec [GatewayCapabilitySummary]
ReadPrec GatewayCapabilitySummary
Int -> ReadS GatewayCapabilitySummary
ReadS [GatewayCapabilitySummary]
(Int -> ReadS GatewayCapabilitySummary)
-> ReadS [GatewayCapabilitySummary]
-> ReadPrec GatewayCapabilitySummary
-> ReadPrec [GatewayCapabilitySummary]
-> Read GatewayCapabilitySummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GatewayCapabilitySummary]
$creadListPrec :: ReadPrec [GatewayCapabilitySummary]
readPrec :: ReadPrec GatewayCapabilitySummary
$creadPrec :: ReadPrec GatewayCapabilitySummary
readList :: ReadS [GatewayCapabilitySummary]
$creadList :: ReadS [GatewayCapabilitySummary]
readsPrec :: Int -> ReadS GatewayCapabilitySummary
$creadsPrec :: Int -> ReadS GatewayCapabilitySummary
Prelude.Read, Int -> GatewayCapabilitySummary -> ShowS
[GatewayCapabilitySummary] -> ShowS
GatewayCapabilitySummary -> String
(Int -> GatewayCapabilitySummary -> ShowS)
-> (GatewayCapabilitySummary -> String)
-> ([GatewayCapabilitySummary] -> ShowS)
-> Show GatewayCapabilitySummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GatewayCapabilitySummary] -> ShowS
$cshowList :: [GatewayCapabilitySummary] -> ShowS
show :: GatewayCapabilitySummary -> String
$cshow :: GatewayCapabilitySummary -> String
showsPrec :: Int -> GatewayCapabilitySummary -> ShowS
$cshowsPrec :: Int -> GatewayCapabilitySummary -> ShowS
Prelude.Show, (forall x.
GatewayCapabilitySummary -> Rep GatewayCapabilitySummary x)
-> (forall x.
Rep GatewayCapabilitySummary x -> GatewayCapabilitySummary)
-> Generic GatewayCapabilitySummary
forall x.
Rep GatewayCapabilitySummary x -> GatewayCapabilitySummary
forall x.
GatewayCapabilitySummary -> Rep GatewayCapabilitySummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GatewayCapabilitySummary x -> GatewayCapabilitySummary
$cfrom :: forall x.
GatewayCapabilitySummary -> Rep GatewayCapabilitySummary x
Prelude.Generic)
newGatewayCapabilitySummary ::
Prelude.Text ->
CapabilitySyncStatus ->
GatewayCapabilitySummary
newGatewayCapabilitySummary :: Text -> CapabilitySyncStatus -> GatewayCapabilitySummary
newGatewayCapabilitySummary
Text
pCapabilityNamespace_
CapabilitySyncStatus
pCapabilitySyncStatus_ =
GatewayCapabilitySummary' :: Text -> CapabilitySyncStatus -> GatewayCapabilitySummary
GatewayCapabilitySummary'
{ $sel:capabilityNamespace:GatewayCapabilitySummary' :: Text
capabilityNamespace =
Text
pCapabilityNamespace_,
$sel:capabilitySyncStatus:GatewayCapabilitySummary' :: CapabilitySyncStatus
capabilitySyncStatus = CapabilitySyncStatus
pCapabilitySyncStatus_
}
gatewayCapabilitySummary_capabilityNamespace :: Lens.Lens' GatewayCapabilitySummary Prelude.Text
gatewayCapabilitySummary_capabilityNamespace :: (Text -> f Text)
-> GatewayCapabilitySummary -> f GatewayCapabilitySummary
gatewayCapabilitySummary_capabilityNamespace = (GatewayCapabilitySummary -> Text)
-> (GatewayCapabilitySummary -> Text -> GatewayCapabilitySummary)
-> Lens GatewayCapabilitySummary GatewayCapabilitySummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayCapabilitySummary' {Text
capabilityNamespace :: Text
$sel:capabilityNamespace:GatewayCapabilitySummary' :: GatewayCapabilitySummary -> Text
capabilityNamespace} -> Text
capabilityNamespace) (\s :: GatewayCapabilitySummary
s@GatewayCapabilitySummary' {} Text
a -> GatewayCapabilitySummary
s {$sel:capabilityNamespace:GatewayCapabilitySummary' :: Text
capabilityNamespace = Text
a} :: GatewayCapabilitySummary)
gatewayCapabilitySummary_capabilitySyncStatus :: Lens.Lens' GatewayCapabilitySummary CapabilitySyncStatus
gatewayCapabilitySummary_capabilitySyncStatus :: (CapabilitySyncStatus -> f CapabilitySyncStatus)
-> GatewayCapabilitySummary -> f GatewayCapabilitySummary
gatewayCapabilitySummary_capabilitySyncStatus = (GatewayCapabilitySummary -> CapabilitySyncStatus)
-> (GatewayCapabilitySummary
-> CapabilitySyncStatus -> GatewayCapabilitySummary)
-> Lens
GatewayCapabilitySummary
GatewayCapabilitySummary
CapabilitySyncStatus
CapabilitySyncStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GatewayCapabilitySummary' {CapabilitySyncStatus
capabilitySyncStatus :: CapabilitySyncStatus
$sel:capabilitySyncStatus:GatewayCapabilitySummary' :: GatewayCapabilitySummary -> CapabilitySyncStatus
capabilitySyncStatus} -> CapabilitySyncStatus
capabilitySyncStatus) (\s :: GatewayCapabilitySummary
s@GatewayCapabilitySummary' {} CapabilitySyncStatus
a -> GatewayCapabilitySummary
s {$sel:capabilitySyncStatus:GatewayCapabilitySummary' :: CapabilitySyncStatus
capabilitySyncStatus = CapabilitySyncStatus
a} :: GatewayCapabilitySummary)
instance Core.FromJSON GatewayCapabilitySummary where
parseJSON :: Value -> Parser GatewayCapabilitySummary
parseJSON =
String
-> (Object -> Parser GatewayCapabilitySummary)
-> Value
-> Parser GatewayCapabilitySummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"GatewayCapabilitySummary"
( \Object
x ->
Text -> CapabilitySyncStatus -> GatewayCapabilitySummary
GatewayCapabilitySummary'
(Text -> CapabilitySyncStatus -> GatewayCapabilitySummary)
-> Parser Text
-> Parser (CapabilitySyncStatus -> GatewayCapabilitySummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"capabilityNamespace")
Parser (CapabilitySyncStatus -> GatewayCapabilitySummary)
-> Parser CapabilitySyncStatus -> Parser GatewayCapabilitySummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser CapabilitySyncStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"capabilitySyncStatus")
)
instance Prelude.Hashable GatewayCapabilitySummary
instance Prelude.NFData GatewayCapabilitySummary