{-# 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.CostExplorer.Types.NetworkResourceUtilization where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NetworkResourceUtilization = NetworkResourceUtilization'
{
NetworkResourceUtilization -> Maybe Text
networkPacketsOutPerSecond :: Prelude.Maybe Prelude.Text,
NetworkResourceUtilization -> Maybe Text
networkInBytesPerSecond :: Prelude.Maybe Prelude.Text,
NetworkResourceUtilization -> Maybe Text
networkPacketsInPerSecond :: Prelude.Maybe Prelude.Text,
NetworkResourceUtilization -> Maybe Text
networkOutBytesPerSecond :: Prelude.Maybe Prelude.Text
}
deriving (NetworkResourceUtilization -> NetworkResourceUtilization -> Bool
(NetworkResourceUtilization -> NetworkResourceUtilization -> Bool)
-> (NetworkResourceUtilization
-> NetworkResourceUtilization -> Bool)
-> Eq NetworkResourceUtilization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkResourceUtilization -> NetworkResourceUtilization -> Bool
$c/= :: NetworkResourceUtilization -> NetworkResourceUtilization -> Bool
== :: NetworkResourceUtilization -> NetworkResourceUtilization -> Bool
$c== :: NetworkResourceUtilization -> NetworkResourceUtilization -> Bool
Prelude.Eq, ReadPrec [NetworkResourceUtilization]
ReadPrec NetworkResourceUtilization
Int -> ReadS NetworkResourceUtilization
ReadS [NetworkResourceUtilization]
(Int -> ReadS NetworkResourceUtilization)
-> ReadS [NetworkResourceUtilization]
-> ReadPrec NetworkResourceUtilization
-> ReadPrec [NetworkResourceUtilization]
-> Read NetworkResourceUtilization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkResourceUtilization]
$creadListPrec :: ReadPrec [NetworkResourceUtilization]
readPrec :: ReadPrec NetworkResourceUtilization
$creadPrec :: ReadPrec NetworkResourceUtilization
readList :: ReadS [NetworkResourceUtilization]
$creadList :: ReadS [NetworkResourceUtilization]
readsPrec :: Int -> ReadS NetworkResourceUtilization
$creadsPrec :: Int -> ReadS NetworkResourceUtilization
Prelude.Read, Int -> NetworkResourceUtilization -> ShowS
[NetworkResourceUtilization] -> ShowS
NetworkResourceUtilization -> String
(Int -> NetworkResourceUtilization -> ShowS)
-> (NetworkResourceUtilization -> String)
-> ([NetworkResourceUtilization] -> ShowS)
-> Show NetworkResourceUtilization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkResourceUtilization] -> ShowS
$cshowList :: [NetworkResourceUtilization] -> ShowS
show :: NetworkResourceUtilization -> String
$cshow :: NetworkResourceUtilization -> String
showsPrec :: Int -> NetworkResourceUtilization -> ShowS
$cshowsPrec :: Int -> NetworkResourceUtilization -> ShowS
Prelude.Show, (forall x.
NetworkResourceUtilization -> Rep NetworkResourceUtilization x)
-> (forall x.
Rep NetworkResourceUtilization x -> NetworkResourceUtilization)
-> Generic NetworkResourceUtilization
forall x.
Rep NetworkResourceUtilization x -> NetworkResourceUtilization
forall x.
NetworkResourceUtilization -> Rep NetworkResourceUtilization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NetworkResourceUtilization x -> NetworkResourceUtilization
$cfrom :: forall x.
NetworkResourceUtilization -> Rep NetworkResourceUtilization x
Prelude.Generic)
newNetworkResourceUtilization ::
NetworkResourceUtilization
newNetworkResourceUtilization :: NetworkResourceUtilization
newNetworkResourceUtilization =
NetworkResourceUtilization' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NetworkResourceUtilization
NetworkResourceUtilization'
{ $sel:networkPacketsOutPerSecond:NetworkResourceUtilization' :: Maybe Text
networkPacketsOutPerSecond =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:networkInBytesPerSecond:NetworkResourceUtilization' :: Maybe Text
networkInBytesPerSecond = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:networkPacketsInPerSecond:NetworkResourceUtilization' :: Maybe Text
networkPacketsInPerSecond = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:networkOutBytesPerSecond:NetworkResourceUtilization' :: Maybe Text
networkOutBytesPerSecond = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
networkResourceUtilization_networkPacketsOutPerSecond :: Lens.Lens' NetworkResourceUtilization (Prelude.Maybe Prelude.Text)
networkResourceUtilization_networkPacketsOutPerSecond :: (Maybe Text -> f (Maybe Text))
-> NetworkResourceUtilization -> f NetworkResourceUtilization
networkResourceUtilization_networkPacketsOutPerSecond = (NetworkResourceUtilization -> Maybe Text)
-> (NetworkResourceUtilization
-> Maybe Text -> NetworkResourceUtilization)
-> Lens
NetworkResourceUtilization
NetworkResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkResourceUtilization' {Maybe Text
networkPacketsOutPerSecond :: Maybe Text
$sel:networkPacketsOutPerSecond:NetworkResourceUtilization' :: NetworkResourceUtilization -> Maybe Text
networkPacketsOutPerSecond} -> Maybe Text
networkPacketsOutPerSecond) (\s :: NetworkResourceUtilization
s@NetworkResourceUtilization' {} Maybe Text
a -> NetworkResourceUtilization
s {$sel:networkPacketsOutPerSecond:NetworkResourceUtilization' :: Maybe Text
networkPacketsOutPerSecond = Maybe Text
a} :: NetworkResourceUtilization)
networkResourceUtilization_networkInBytesPerSecond :: Lens.Lens' NetworkResourceUtilization (Prelude.Maybe Prelude.Text)
networkResourceUtilization_networkInBytesPerSecond :: (Maybe Text -> f (Maybe Text))
-> NetworkResourceUtilization -> f NetworkResourceUtilization
networkResourceUtilization_networkInBytesPerSecond = (NetworkResourceUtilization -> Maybe Text)
-> (NetworkResourceUtilization
-> Maybe Text -> NetworkResourceUtilization)
-> Lens
NetworkResourceUtilization
NetworkResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkResourceUtilization' {Maybe Text
networkInBytesPerSecond :: Maybe Text
$sel:networkInBytesPerSecond:NetworkResourceUtilization' :: NetworkResourceUtilization -> Maybe Text
networkInBytesPerSecond} -> Maybe Text
networkInBytesPerSecond) (\s :: NetworkResourceUtilization
s@NetworkResourceUtilization' {} Maybe Text
a -> NetworkResourceUtilization
s {$sel:networkInBytesPerSecond:NetworkResourceUtilization' :: Maybe Text
networkInBytesPerSecond = Maybe Text
a} :: NetworkResourceUtilization)
networkResourceUtilization_networkPacketsInPerSecond :: Lens.Lens' NetworkResourceUtilization (Prelude.Maybe Prelude.Text)
networkResourceUtilization_networkPacketsInPerSecond :: (Maybe Text -> f (Maybe Text))
-> NetworkResourceUtilization -> f NetworkResourceUtilization
networkResourceUtilization_networkPacketsInPerSecond = (NetworkResourceUtilization -> Maybe Text)
-> (NetworkResourceUtilization
-> Maybe Text -> NetworkResourceUtilization)
-> Lens
NetworkResourceUtilization
NetworkResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkResourceUtilization' {Maybe Text
networkPacketsInPerSecond :: Maybe Text
$sel:networkPacketsInPerSecond:NetworkResourceUtilization' :: NetworkResourceUtilization -> Maybe Text
networkPacketsInPerSecond} -> Maybe Text
networkPacketsInPerSecond) (\s :: NetworkResourceUtilization
s@NetworkResourceUtilization' {} Maybe Text
a -> NetworkResourceUtilization
s {$sel:networkPacketsInPerSecond:NetworkResourceUtilization' :: Maybe Text
networkPacketsInPerSecond = Maybe Text
a} :: NetworkResourceUtilization)
networkResourceUtilization_networkOutBytesPerSecond :: Lens.Lens' NetworkResourceUtilization (Prelude.Maybe Prelude.Text)
networkResourceUtilization_networkOutBytesPerSecond :: (Maybe Text -> f (Maybe Text))
-> NetworkResourceUtilization -> f NetworkResourceUtilization
networkResourceUtilization_networkOutBytesPerSecond = (NetworkResourceUtilization -> Maybe Text)
-> (NetworkResourceUtilization
-> Maybe Text -> NetworkResourceUtilization)
-> Lens
NetworkResourceUtilization
NetworkResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkResourceUtilization' {Maybe Text
networkOutBytesPerSecond :: Maybe Text
$sel:networkOutBytesPerSecond:NetworkResourceUtilization' :: NetworkResourceUtilization -> Maybe Text
networkOutBytesPerSecond} -> Maybe Text
networkOutBytesPerSecond) (\s :: NetworkResourceUtilization
s@NetworkResourceUtilization' {} Maybe Text
a -> NetworkResourceUtilization
s {$sel:networkOutBytesPerSecond:NetworkResourceUtilization' :: Maybe Text
networkOutBytesPerSecond = Maybe Text
a} :: NetworkResourceUtilization)
instance Core.FromJSON NetworkResourceUtilization where
parseJSON :: Value -> Parser NetworkResourceUtilization
parseJSON =
String
-> (Object -> Parser NetworkResourceUtilization)
-> Value
-> Parser NetworkResourceUtilization
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NetworkResourceUtilization"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NetworkResourceUtilization
NetworkResourceUtilization'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> NetworkResourceUtilization)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> NetworkResourceUtilization)
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
"NetworkPacketsOutPerSecond")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> NetworkResourceUtilization)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> NetworkResourceUtilization)
forall (f :: * -> *) a b. Applicative f => 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
"NetworkInBytesPerSecond")
Parser (Maybe Text -> Maybe Text -> NetworkResourceUtilization)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NetworkResourceUtilization)
forall (f :: * -> *) a b. Applicative f => 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
"NetworkPacketsInPerSecond")
Parser (Maybe Text -> NetworkResourceUtilization)
-> Parser (Maybe Text) -> Parser NetworkResourceUtilization
forall (f :: * -> *) a b. Applicative f => 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
"NetworkOutBytesPerSecond")
)
instance Prelude.Hashable NetworkResourceUtilization
instance Prelude.NFData NetworkResourceUtilization