{-# 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.EBSResourceUtilization where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EBSResourceUtilization = EBSResourceUtilization'
{
EBSResourceUtilization -> Maybe Text
ebsWriteBytesPerSecond :: Prelude.Maybe Prelude.Text,
EBSResourceUtilization -> Maybe Text
ebsWriteOpsPerSecond :: Prelude.Maybe Prelude.Text,
EBSResourceUtilization -> Maybe Text
ebsReadOpsPerSecond :: Prelude.Maybe Prelude.Text,
EBSResourceUtilization -> Maybe Text
ebsReadBytesPerSecond :: Prelude.Maybe Prelude.Text
}
deriving (EBSResourceUtilization -> EBSResourceUtilization -> Bool
(EBSResourceUtilization -> EBSResourceUtilization -> Bool)
-> (EBSResourceUtilization -> EBSResourceUtilization -> Bool)
-> Eq EBSResourceUtilization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EBSResourceUtilization -> EBSResourceUtilization -> Bool
$c/= :: EBSResourceUtilization -> EBSResourceUtilization -> Bool
== :: EBSResourceUtilization -> EBSResourceUtilization -> Bool
$c== :: EBSResourceUtilization -> EBSResourceUtilization -> Bool
Prelude.Eq, ReadPrec [EBSResourceUtilization]
ReadPrec EBSResourceUtilization
Int -> ReadS EBSResourceUtilization
ReadS [EBSResourceUtilization]
(Int -> ReadS EBSResourceUtilization)
-> ReadS [EBSResourceUtilization]
-> ReadPrec EBSResourceUtilization
-> ReadPrec [EBSResourceUtilization]
-> Read EBSResourceUtilization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EBSResourceUtilization]
$creadListPrec :: ReadPrec [EBSResourceUtilization]
readPrec :: ReadPrec EBSResourceUtilization
$creadPrec :: ReadPrec EBSResourceUtilization
readList :: ReadS [EBSResourceUtilization]
$creadList :: ReadS [EBSResourceUtilization]
readsPrec :: Int -> ReadS EBSResourceUtilization
$creadsPrec :: Int -> ReadS EBSResourceUtilization
Prelude.Read, Int -> EBSResourceUtilization -> ShowS
[EBSResourceUtilization] -> ShowS
EBSResourceUtilization -> String
(Int -> EBSResourceUtilization -> ShowS)
-> (EBSResourceUtilization -> String)
-> ([EBSResourceUtilization] -> ShowS)
-> Show EBSResourceUtilization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EBSResourceUtilization] -> ShowS
$cshowList :: [EBSResourceUtilization] -> ShowS
show :: EBSResourceUtilization -> String
$cshow :: EBSResourceUtilization -> String
showsPrec :: Int -> EBSResourceUtilization -> ShowS
$cshowsPrec :: Int -> EBSResourceUtilization -> ShowS
Prelude.Show, (forall x. EBSResourceUtilization -> Rep EBSResourceUtilization x)
-> (forall x.
Rep EBSResourceUtilization x -> EBSResourceUtilization)
-> Generic EBSResourceUtilization
forall x. Rep EBSResourceUtilization x -> EBSResourceUtilization
forall x. EBSResourceUtilization -> Rep EBSResourceUtilization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EBSResourceUtilization x -> EBSResourceUtilization
$cfrom :: forall x. EBSResourceUtilization -> Rep EBSResourceUtilization x
Prelude.Generic)
newEBSResourceUtilization ::
EBSResourceUtilization
newEBSResourceUtilization :: EBSResourceUtilization
newEBSResourceUtilization =
EBSResourceUtilization' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> EBSResourceUtilization
EBSResourceUtilization'
{ $sel:ebsWriteBytesPerSecond:EBSResourceUtilization' :: Maybe Text
ebsWriteBytesPerSecond =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ebsWriteOpsPerSecond:EBSResourceUtilization' :: Maybe Text
ebsWriteOpsPerSecond = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ebsReadOpsPerSecond:EBSResourceUtilization' :: Maybe Text
ebsReadOpsPerSecond = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ebsReadBytesPerSecond:EBSResourceUtilization' :: Maybe Text
ebsReadBytesPerSecond = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
eBSResourceUtilization_ebsWriteBytesPerSecond :: Lens.Lens' EBSResourceUtilization (Prelude.Maybe Prelude.Text)
eBSResourceUtilization_ebsWriteBytesPerSecond :: (Maybe Text -> f (Maybe Text))
-> EBSResourceUtilization -> f EBSResourceUtilization
eBSResourceUtilization_ebsWriteBytesPerSecond = (EBSResourceUtilization -> Maybe Text)
-> (EBSResourceUtilization -> Maybe Text -> EBSResourceUtilization)
-> Lens
EBSResourceUtilization
EBSResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EBSResourceUtilization' {Maybe Text
ebsWriteBytesPerSecond :: Maybe Text
$sel:ebsWriteBytesPerSecond:EBSResourceUtilization' :: EBSResourceUtilization -> Maybe Text
ebsWriteBytesPerSecond} -> Maybe Text
ebsWriteBytesPerSecond) (\s :: EBSResourceUtilization
s@EBSResourceUtilization' {} Maybe Text
a -> EBSResourceUtilization
s {$sel:ebsWriteBytesPerSecond:EBSResourceUtilization' :: Maybe Text
ebsWriteBytesPerSecond = Maybe Text
a} :: EBSResourceUtilization)
eBSResourceUtilization_ebsWriteOpsPerSecond :: Lens.Lens' EBSResourceUtilization (Prelude.Maybe Prelude.Text)
eBSResourceUtilization_ebsWriteOpsPerSecond :: (Maybe Text -> f (Maybe Text))
-> EBSResourceUtilization -> f EBSResourceUtilization
eBSResourceUtilization_ebsWriteOpsPerSecond = (EBSResourceUtilization -> Maybe Text)
-> (EBSResourceUtilization -> Maybe Text -> EBSResourceUtilization)
-> Lens
EBSResourceUtilization
EBSResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EBSResourceUtilization' {Maybe Text
ebsWriteOpsPerSecond :: Maybe Text
$sel:ebsWriteOpsPerSecond:EBSResourceUtilization' :: EBSResourceUtilization -> Maybe Text
ebsWriteOpsPerSecond} -> Maybe Text
ebsWriteOpsPerSecond) (\s :: EBSResourceUtilization
s@EBSResourceUtilization' {} Maybe Text
a -> EBSResourceUtilization
s {$sel:ebsWriteOpsPerSecond:EBSResourceUtilization' :: Maybe Text
ebsWriteOpsPerSecond = Maybe Text
a} :: EBSResourceUtilization)
eBSResourceUtilization_ebsReadOpsPerSecond :: Lens.Lens' EBSResourceUtilization (Prelude.Maybe Prelude.Text)
eBSResourceUtilization_ebsReadOpsPerSecond :: (Maybe Text -> f (Maybe Text))
-> EBSResourceUtilization -> f EBSResourceUtilization
eBSResourceUtilization_ebsReadOpsPerSecond = (EBSResourceUtilization -> Maybe Text)
-> (EBSResourceUtilization -> Maybe Text -> EBSResourceUtilization)
-> Lens
EBSResourceUtilization
EBSResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EBSResourceUtilization' {Maybe Text
ebsReadOpsPerSecond :: Maybe Text
$sel:ebsReadOpsPerSecond:EBSResourceUtilization' :: EBSResourceUtilization -> Maybe Text
ebsReadOpsPerSecond} -> Maybe Text
ebsReadOpsPerSecond) (\s :: EBSResourceUtilization
s@EBSResourceUtilization' {} Maybe Text
a -> EBSResourceUtilization
s {$sel:ebsReadOpsPerSecond:EBSResourceUtilization' :: Maybe Text
ebsReadOpsPerSecond = Maybe Text
a} :: EBSResourceUtilization)
eBSResourceUtilization_ebsReadBytesPerSecond :: Lens.Lens' EBSResourceUtilization (Prelude.Maybe Prelude.Text)
eBSResourceUtilization_ebsReadBytesPerSecond :: (Maybe Text -> f (Maybe Text))
-> EBSResourceUtilization -> f EBSResourceUtilization
eBSResourceUtilization_ebsReadBytesPerSecond = (EBSResourceUtilization -> Maybe Text)
-> (EBSResourceUtilization -> Maybe Text -> EBSResourceUtilization)
-> Lens
EBSResourceUtilization
EBSResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EBSResourceUtilization' {Maybe Text
ebsReadBytesPerSecond :: Maybe Text
$sel:ebsReadBytesPerSecond:EBSResourceUtilization' :: EBSResourceUtilization -> Maybe Text
ebsReadBytesPerSecond} -> Maybe Text
ebsReadBytesPerSecond) (\s :: EBSResourceUtilization
s@EBSResourceUtilization' {} Maybe Text
a -> EBSResourceUtilization
s {$sel:ebsReadBytesPerSecond:EBSResourceUtilization' :: Maybe Text
ebsReadBytesPerSecond = Maybe Text
a} :: EBSResourceUtilization)
instance Core.FromJSON EBSResourceUtilization where
parseJSON :: Value -> Parser EBSResourceUtilization
parseJSON =
String
-> (Object -> Parser EBSResourceUtilization)
-> Value
-> Parser EBSResourceUtilization
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"EBSResourceUtilization"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> EBSResourceUtilization
EBSResourceUtilization'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EBSResourceUtilization)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> EBSResourceUtilization)
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
"EbsWriteBytesPerSecond")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> EBSResourceUtilization)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> EBSResourceUtilization)
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
"EbsWriteOpsPerSecond")
Parser (Maybe Text -> Maybe Text -> EBSResourceUtilization)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> EBSResourceUtilization)
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
"EbsReadOpsPerSecond")
Parser (Maybe Text -> EBSResourceUtilization)
-> Parser (Maybe Text) -> Parser EBSResourceUtilization
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
"EbsReadBytesPerSecond")
)
instance Prelude.Hashable EBSResourceUtilization
instance Prelude.NFData EBSResourceUtilization