{-# 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.SageMaker.Types.EdgeModelStat where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EdgeModelStat = EdgeModelStat'
{
EdgeModelStat -> Text
modelName :: Prelude.Text,
EdgeModelStat -> Text
modelVersion :: Prelude.Text,
EdgeModelStat -> Integer
offlineDeviceCount :: Prelude.Integer,
EdgeModelStat -> Integer
connectedDeviceCount :: Prelude.Integer,
EdgeModelStat -> Integer
activeDeviceCount :: Prelude.Integer,
EdgeModelStat -> Integer
samplingDeviceCount :: Prelude.Integer
}
deriving (EdgeModelStat -> EdgeModelStat -> Bool
(EdgeModelStat -> EdgeModelStat -> Bool)
-> (EdgeModelStat -> EdgeModelStat -> Bool) -> Eq EdgeModelStat
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EdgeModelStat -> EdgeModelStat -> Bool
$c/= :: EdgeModelStat -> EdgeModelStat -> Bool
== :: EdgeModelStat -> EdgeModelStat -> Bool
$c== :: EdgeModelStat -> EdgeModelStat -> Bool
Prelude.Eq, ReadPrec [EdgeModelStat]
ReadPrec EdgeModelStat
Int -> ReadS EdgeModelStat
ReadS [EdgeModelStat]
(Int -> ReadS EdgeModelStat)
-> ReadS [EdgeModelStat]
-> ReadPrec EdgeModelStat
-> ReadPrec [EdgeModelStat]
-> Read EdgeModelStat
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EdgeModelStat]
$creadListPrec :: ReadPrec [EdgeModelStat]
readPrec :: ReadPrec EdgeModelStat
$creadPrec :: ReadPrec EdgeModelStat
readList :: ReadS [EdgeModelStat]
$creadList :: ReadS [EdgeModelStat]
readsPrec :: Int -> ReadS EdgeModelStat
$creadsPrec :: Int -> ReadS EdgeModelStat
Prelude.Read, Int -> EdgeModelStat -> ShowS
[EdgeModelStat] -> ShowS
EdgeModelStat -> String
(Int -> EdgeModelStat -> ShowS)
-> (EdgeModelStat -> String)
-> ([EdgeModelStat] -> ShowS)
-> Show EdgeModelStat
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EdgeModelStat] -> ShowS
$cshowList :: [EdgeModelStat] -> ShowS
show :: EdgeModelStat -> String
$cshow :: EdgeModelStat -> String
showsPrec :: Int -> EdgeModelStat -> ShowS
$cshowsPrec :: Int -> EdgeModelStat -> ShowS
Prelude.Show, (forall x. EdgeModelStat -> Rep EdgeModelStat x)
-> (forall x. Rep EdgeModelStat x -> EdgeModelStat)
-> Generic EdgeModelStat
forall x. Rep EdgeModelStat x -> EdgeModelStat
forall x. EdgeModelStat -> Rep EdgeModelStat x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EdgeModelStat x -> EdgeModelStat
$cfrom :: forall x. EdgeModelStat -> Rep EdgeModelStat x
Prelude.Generic)
newEdgeModelStat ::
Prelude.Text ->
Prelude.Text ->
Prelude.Integer ->
Prelude.Integer ->
Prelude.Integer ->
Prelude.Integer ->
EdgeModelStat
newEdgeModelStat :: Text
-> Text
-> Integer
-> Integer
-> Integer
-> Integer
-> EdgeModelStat
newEdgeModelStat
Text
pModelName_
Text
pModelVersion_
Integer
pOfflineDeviceCount_
Integer
pConnectedDeviceCount_
Integer
pActiveDeviceCount_
Integer
pSamplingDeviceCount_ =
EdgeModelStat' :: Text
-> Text
-> Integer
-> Integer
-> Integer
-> Integer
-> EdgeModelStat
EdgeModelStat'
{ $sel:modelName:EdgeModelStat' :: Text
modelName = Text
pModelName_,
$sel:modelVersion:EdgeModelStat' :: Text
modelVersion = Text
pModelVersion_,
$sel:offlineDeviceCount:EdgeModelStat' :: Integer
offlineDeviceCount = Integer
pOfflineDeviceCount_,
$sel:connectedDeviceCount:EdgeModelStat' :: Integer
connectedDeviceCount = Integer
pConnectedDeviceCount_,
$sel:activeDeviceCount:EdgeModelStat' :: Integer
activeDeviceCount = Integer
pActiveDeviceCount_,
$sel:samplingDeviceCount:EdgeModelStat' :: Integer
samplingDeviceCount = Integer
pSamplingDeviceCount_
}
edgeModelStat_modelName :: Lens.Lens' EdgeModelStat Prelude.Text
edgeModelStat_modelName :: (Text -> f Text) -> EdgeModelStat -> f EdgeModelStat
edgeModelStat_modelName = (EdgeModelStat -> Text)
-> (EdgeModelStat -> Text -> EdgeModelStat)
-> Lens EdgeModelStat EdgeModelStat Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgeModelStat' {Text
modelName :: Text
$sel:modelName:EdgeModelStat' :: EdgeModelStat -> Text
modelName} -> Text
modelName) (\s :: EdgeModelStat
s@EdgeModelStat' {} Text
a -> EdgeModelStat
s {$sel:modelName:EdgeModelStat' :: Text
modelName = Text
a} :: EdgeModelStat)
edgeModelStat_modelVersion :: Lens.Lens' EdgeModelStat Prelude.Text
edgeModelStat_modelVersion :: (Text -> f Text) -> EdgeModelStat -> f EdgeModelStat
edgeModelStat_modelVersion = (EdgeModelStat -> Text)
-> (EdgeModelStat -> Text -> EdgeModelStat)
-> Lens EdgeModelStat EdgeModelStat Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgeModelStat' {Text
modelVersion :: Text
$sel:modelVersion:EdgeModelStat' :: EdgeModelStat -> Text
modelVersion} -> Text
modelVersion) (\s :: EdgeModelStat
s@EdgeModelStat' {} Text
a -> EdgeModelStat
s {$sel:modelVersion:EdgeModelStat' :: Text
modelVersion = Text
a} :: EdgeModelStat)
edgeModelStat_offlineDeviceCount :: Lens.Lens' EdgeModelStat Prelude.Integer
edgeModelStat_offlineDeviceCount :: (Integer -> f Integer) -> EdgeModelStat -> f EdgeModelStat
edgeModelStat_offlineDeviceCount = (EdgeModelStat -> Integer)
-> (EdgeModelStat -> Integer -> EdgeModelStat)
-> Lens EdgeModelStat EdgeModelStat Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgeModelStat' {Integer
offlineDeviceCount :: Integer
$sel:offlineDeviceCount:EdgeModelStat' :: EdgeModelStat -> Integer
offlineDeviceCount} -> Integer
offlineDeviceCount) (\s :: EdgeModelStat
s@EdgeModelStat' {} Integer
a -> EdgeModelStat
s {$sel:offlineDeviceCount:EdgeModelStat' :: Integer
offlineDeviceCount = Integer
a} :: EdgeModelStat)
edgeModelStat_connectedDeviceCount :: Lens.Lens' EdgeModelStat Prelude.Integer
edgeModelStat_connectedDeviceCount :: (Integer -> f Integer) -> EdgeModelStat -> f EdgeModelStat
edgeModelStat_connectedDeviceCount = (EdgeModelStat -> Integer)
-> (EdgeModelStat -> Integer -> EdgeModelStat)
-> Lens EdgeModelStat EdgeModelStat Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgeModelStat' {Integer
connectedDeviceCount :: Integer
$sel:connectedDeviceCount:EdgeModelStat' :: EdgeModelStat -> Integer
connectedDeviceCount} -> Integer
connectedDeviceCount) (\s :: EdgeModelStat
s@EdgeModelStat' {} Integer
a -> EdgeModelStat
s {$sel:connectedDeviceCount:EdgeModelStat' :: Integer
connectedDeviceCount = Integer
a} :: EdgeModelStat)
edgeModelStat_activeDeviceCount :: Lens.Lens' EdgeModelStat Prelude.Integer
edgeModelStat_activeDeviceCount :: (Integer -> f Integer) -> EdgeModelStat -> f EdgeModelStat
edgeModelStat_activeDeviceCount = (EdgeModelStat -> Integer)
-> (EdgeModelStat -> Integer -> EdgeModelStat)
-> Lens EdgeModelStat EdgeModelStat Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgeModelStat' {Integer
activeDeviceCount :: Integer
$sel:activeDeviceCount:EdgeModelStat' :: EdgeModelStat -> Integer
activeDeviceCount} -> Integer
activeDeviceCount) (\s :: EdgeModelStat
s@EdgeModelStat' {} Integer
a -> EdgeModelStat
s {$sel:activeDeviceCount:EdgeModelStat' :: Integer
activeDeviceCount = Integer
a} :: EdgeModelStat)
edgeModelStat_samplingDeviceCount :: Lens.Lens' EdgeModelStat Prelude.Integer
edgeModelStat_samplingDeviceCount :: (Integer -> f Integer) -> EdgeModelStat -> f EdgeModelStat
edgeModelStat_samplingDeviceCount = (EdgeModelStat -> Integer)
-> (EdgeModelStat -> Integer -> EdgeModelStat)
-> Lens EdgeModelStat EdgeModelStat Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EdgeModelStat' {Integer
samplingDeviceCount :: Integer
$sel:samplingDeviceCount:EdgeModelStat' :: EdgeModelStat -> Integer
samplingDeviceCount} -> Integer
samplingDeviceCount) (\s :: EdgeModelStat
s@EdgeModelStat' {} Integer
a -> EdgeModelStat
s {$sel:samplingDeviceCount:EdgeModelStat' :: Integer
samplingDeviceCount = Integer
a} :: EdgeModelStat)
instance Core.FromJSON EdgeModelStat where
parseJSON :: Value -> Parser EdgeModelStat
parseJSON =
String
-> (Object -> Parser EdgeModelStat)
-> Value
-> Parser EdgeModelStat
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EdgeModelStat"
( \Object
x ->
Text
-> Text
-> Integer
-> Integer
-> Integer
-> Integer
-> EdgeModelStat
EdgeModelStat'
(Text
-> Text
-> Integer
-> Integer
-> Integer
-> Integer
-> EdgeModelStat)
-> Parser Text
-> Parser
(Text -> Integer -> Integer -> Integer -> Integer -> EdgeModelStat)
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
"ModelName")
Parser
(Text -> Integer -> Integer -> Integer -> Integer -> EdgeModelStat)
-> Parser Text
-> Parser
(Integer -> Integer -> Integer -> Integer -> EdgeModelStat)
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
"ModelVersion")
Parser (Integer -> Integer -> Integer -> Integer -> EdgeModelStat)
-> Parser Integer
-> Parser (Integer -> Integer -> Integer -> EdgeModelStat)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OfflineDeviceCount")
Parser (Integer -> Integer -> Integer -> EdgeModelStat)
-> Parser Integer -> Parser (Integer -> Integer -> EdgeModelStat)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ConnectedDeviceCount")
Parser (Integer -> Integer -> EdgeModelStat)
-> Parser Integer -> Parser (Integer -> EdgeModelStat)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ActiveDeviceCount")
Parser (Integer -> EdgeModelStat)
-> Parser Integer -> Parser EdgeModelStat
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Integer
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SamplingDeviceCount")
)
instance Prelude.Hashable EdgeModelStat
instance Prelude.NFData EdgeModelStat