{-# 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.DeviceStats where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DeviceStats = DeviceStats'
{
DeviceStats -> Integer
connectedDeviceCount :: Prelude.Integer,
DeviceStats -> Integer
registeredDeviceCount :: Prelude.Integer
}
deriving (DeviceStats -> DeviceStats -> Bool
(DeviceStats -> DeviceStats -> Bool)
-> (DeviceStats -> DeviceStats -> Bool) -> Eq DeviceStats
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceStats -> DeviceStats -> Bool
$c/= :: DeviceStats -> DeviceStats -> Bool
== :: DeviceStats -> DeviceStats -> Bool
$c== :: DeviceStats -> DeviceStats -> Bool
Prelude.Eq, ReadPrec [DeviceStats]
ReadPrec DeviceStats
Int -> ReadS DeviceStats
ReadS [DeviceStats]
(Int -> ReadS DeviceStats)
-> ReadS [DeviceStats]
-> ReadPrec DeviceStats
-> ReadPrec [DeviceStats]
-> Read DeviceStats
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeviceStats]
$creadListPrec :: ReadPrec [DeviceStats]
readPrec :: ReadPrec DeviceStats
$creadPrec :: ReadPrec DeviceStats
readList :: ReadS [DeviceStats]
$creadList :: ReadS [DeviceStats]
readsPrec :: Int -> ReadS DeviceStats
$creadsPrec :: Int -> ReadS DeviceStats
Prelude.Read, Int -> DeviceStats -> ShowS
[DeviceStats] -> ShowS
DeviceStats -> String
(Int -> DeviceStats -> ShowS)
-> (DeviceStats -> String)
-> ([DeviceStats] -> ShowS)
-> Show DeviceStats
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeviceStats] -> ShowS
$cshowList :: [DeviceStats] -> ShowS
show :: DeviceStats -> String
$cshow :: DeviceStats -> String
showsPrec :: Int -> DeviceStats -> ShowS
$cshowsPrec :: Int -> DeviceStats -> ShowS
Prelude.Show, (forall x. DeviceStats -> Rep DeviceStats x)
-> (forall x. Rep DeviceStats x -> DeviceStats)
-> Generic DeviceStats
forall x. Rep DeviceStats x -> DeviceStats
forall x. DeviceStats -> Rep DeviceStats x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeviceStats x -> DeviceStats
$cfrom :: forall x. DeviceStats -> Rep DeviceStats x
Prelude.Generic)
newDeviceStats ::
Prelude.Integer ->
Prelude.Integer ->
DeviceStats
newDeviceStats :: Integer -> Integer -> DeviceStats
newDeviceStats
Integer
pConnectedDeviceCount_
Integer
pRegisteredDeviceCount_ =
DeviceStats' :: Integer -> Integer -> DeviceStats
DeviceStats'
{ $sel:connectedDeviceCount:DeviceStats' :: Integer
connectedDeviceCount =
Integer
pConnectedDeviceCount_,
$sel:registeredDeviceCount:DeviceStats' :: Integer
registeredDeviceCount = Integer
pRegisteredDeviceCount_
}
deviceStats_connectedDeviceCount :: Lens.Lens' DeviceStats Prelude.Integer
deviceStats_connectedDeviceCount :: (Integer -> f Integer) -> DeviceStats -> f DeviceStats
deviceStats_connectedDeviceCount = (DeviceStats -> Integer)
-> (DeviceStats -> Integer -> DeviceStats)
-> Lens DeviceStats DeviceStats Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceStats' {Integer
connectedDeviceCount :: Integer
$sel:connectedDeviceCount:DeviceStats' :: DeviceStats -> Integer
connectedDeviceCount} -> Integer
connectedDeviceCount) (\s :: DeviceStats
s@DeviceStats' {} Integer
a -> DeviceStats
s {$sel:connectedDeviceCount:DeviceStats' :: Integer
connectedDeviceCount = Integer
a} :: DeviceStats)
deviceStats_registeredDeviceCount :: Lens.Lens' DeviceStats Prelude.Integer
deviceStats_registeredDeviceCount :: (Integer -> f Integer) -> DeviceStats -> f DeviceStats
deviceStats_registeredDeviceCount = (DeviceStats -> Integer)
-> (DeviceStats -> Integer -> DeviceStats)
-> Lens DeviceStats DeviceStats Integer Integer
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceStats' {Integer
registeredDeviceCount :: Integer
$sel:registeredDeviceCount:DeviceStats' :: DeviceStats -> Integer
registeredDeviceCount} -> Integer
registeredDeviceCount) (\s :: DeviceStats
s@DeviceStats' {} Integer
a -> DeviceStats
s {$sel:registeredDeviceCount:DeviceStats' :: Integer
registeredDeviceCount = Integer
a} :: DeviceStats)
instance Core.FromJSON DeviceStats where
parseJSON :: Value -> Parser DeviceStats
parseJSON =
String
-> (Object -> Parser DeviceStats) -> Value -> Parser DeviceStats
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DeviceStats"
( \Object
x ->
Integer -> Integer -> DeviceStats
DeviceStats'
(Integer -> Integer -> DeviceStats)
-> Parser Integer -> Parser (Integer -> DeviceStats)
forall (f :: * -> *) a b. Functor 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 -> DeviceStats)
-> Parser Integer -> Parser DeviceStats
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
"RegisteredDeviceCount")
)
instance Prelude.Hashable DeviceStats
instance Prelude.NFData DeviceStats