{-# 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.DiskResourceUtilization where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DiskResourceUtilization = DiskResourceUtilization'
{
DiskResourceUtilization -> Maybe Text
diskWriteOpsPerSecond :: Prelude.Maybe Prelude.Text,
DiskResourceUtilization -> Maybe Text
diskReadOpsPerSecond :: Prelude.Maybe Prelude.Text,
DiskResourceUtilization -> Maybe Text
diskWriteBytesPerSecond :: Prelude.Maybe Prelude.Text,
DiskResourceUtilization -> Maybe Text
diskReadBytesPerSecond :: Prelude.Maybe Prelude.Text
}
deriving (DiskResourceUtilization -> DiskResourceUtilization -> Bool
(DiskResourceUtilization -> DiskResourceUtilization -> Bool)
-> (DiskResourceUtilization -> DiskResourceUtilization -> Bool)
-> Eq DiskResourceUtilization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DiskResourceUtilization -> DiskResourceUtilization -> Bool
$c/= :: DiskResourceUtilization -> DiskResourceUtilization -> Bool
== :: DiskResourceUtilization -> DiskResourceUtilization -> Bool
$c== :: DiskResourceUtilization -> DiskResourceUtilization -> Bool
Prelude.Eq, ReadPrec [DiskResourceUtilization]
ReadPrec DiskResourceUtilization
Int -> ReadS DiskResourceUtilization
ReadS [DiskResourceUtilization]
(Int -> ReadS DiskResourceUtilization)
-> ReadS [DiskResourceUtilization]
-> ReadPrec DiskResourceUtilization
-> ReadPrec [DiskResourceUtilization]
-> Read DiskResourceUtilization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DiskResourceUtilization]
$creadListPrec :: ReadPrec [DiskResourceUtilization]
readPrec :: ReadPrec DiskResourceUtilization
$creadPrec :: ReadPrec DiskResourceUtilization
readList :: ReadS [DiskResourceUtilization]
$creadList :: ReadS [DiskResourceUtilization]
readsPrec :: Int -> ReadS DiskResourceUtilization
$creadsPrec :: Int -> ReadS DiskResourceUtilization
Prelude.Read, Int -> DiskResourceUtilization -> ShowS
[DiskResourceUtilization] -> ShowS
DiskResourceUtilization -> String
(Int -> DiskResourceUtilization -> ShowS)
-> (DiskResourceUtilization -> String)
-> ([DiskResourceUtilization] -> ShowS)
-> Show DiskResourceUtilization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DiskResourceUtilization] -> ShowS
$cshowList :: [DiskResourceUtilization] -> ShowS
show :: DiskResourceUtilization -> String
$cshow :: DiskResourceUtilization -> String
showsPrec :: Int -> DiskResourceUtilization -> ShowS
$cshowsPrec :: Int -> DiskResourceUtilization -> ShowS
Prelude.Show, (forall x.
DiskResourceUtilization -> Rep DiskResourceUtilization x)
-> (forall x.
Rep DiskResourceUtilization x -> DiskResourceUtilization)
-> Generic DiskResourceUtilization
forall x. Rep DiskResourceUtilization x -> DiskResourceUtilization
forall x. DiskResourceUtilization -> Rep DiskResourceUtilization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DiskResourceUtilization x -> DiskResourceUtilization
$cfrom :: forall x. DiskResourceUtilization -> Rep DiskResourceUtilization x
Prelude.Generic)
newDiskResourceUtilization ::
DiskResourceUtilization
newDiskResourceUtilization :: DiskResourceUtilization
newDiskResourceUtilization =
DiskResourceUtilization' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DiskResourceUtilization
DiskResourceUtilization'
{ $sel:diskWriteOpsPerSecond:DiskResourceUtilization' :: Maybe Text
diskWriteOpsPerSecond =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:diskReadOpsPerSecond:DiskResourceUtilization' :: Maybe Text
diskReadOpsPerSecond = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:diskWriteBytesPerSecond:DiskResourceUtilization' :: Maybe Text
diskWriteBytesPerSecond = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:diskReadBytesPerSecond:DiskResourceUtilization' :: Maybe Text
diskReadBytesPerSecond = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
diskResourceUtilization_diskWriteOpsPerSecond :: Lens.Lens' DiskResourceUtilization (Prelude.Maybe Prelude.Text)
diskResourceUtilization_diskWriteOpsPerSecond :: (Maybe Text -> f (Maybe Text))
-> DiskResourceUtilization -> f DiskResourceUtilization
diskResourceUtilization_diskWriteOpsPerSecond = (DiskResourceUtilization -> Maybe Text)
-> (DiskResourceUtilization
-> Maybe Text -> DiskResourceUtilization)
-> Lens
DiskResourceUtilization
DiskResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskResourceUtilization' {Maybe Text
diskWriteOpsPerSecond :: Maybe Text
$sel:diskWriteOpsPerSecond:DiskResourceUtilization' :: DiskResourceUtilization -> Maybe Text
diskWriteOpsPerSecond} -> Maybe Text
diskWriteOpsPerSecond) (\s :: DiskResourceUtilization
s@DiskResourceUtilization' {} Maybe Text
a -> DiskResourceUtilization
s {$sel:diskWriteOpsPerSecond:DiskResourceUtilization' :: Maybe Text
diskWriteOpsPerSecond = Maybe Text
a} :: DiskResourceUtilization)
diskResourceUtilization_diskReadOpsPerSecond :: Lens.Lens' DiskResourceUtilization (Prelude.Maybe Prelude.Text)
diskResourceUtilization_diskReadOpsPerSecond :: (Maybe Text -> f (Maybe Text))
-> DiskResourceUtilization -> f DiskResourceUtilization
diskResourceUtilization_diskReadOpsPerSecond = (DiskResourceUtilization -> Maybe Text)
-> (DiskResourceUtilization
-> Maybe Text -> DiskResourceUtilization)
-> Lens
DiskResourceUtilization
DiskResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskResourceUtilization' {Maybe Text
diskReadOpsPerSecond :: Maybe Text
$sel:diskReadOpsPerSecond:DiskResourceUtilization' :: DiskResourceUtilization -> Maybe Text
diskReadOpsPerSecond} -> Maybe Text
diskReadOpsPerSecond) (\s :: DiskResourceUtilization
s@DiskResourceUtilization' {} Maybe Text
a -> DiskResourceUtilization
s {$sel:diskReadOpsPerSecond:DiskResourceUtilization' :: Maybe Text
diskReadOpsPerSecond = Maybe Text
a} :: DiskResourceUtilization)
diskResourceUtilization_diskWriteBytesPerSecond :: Lens.Lens' DiskResourceUtilization (Prelude.Maybe Prelude.Text)
diskResourceUtilization_diskWriteBytesPerSecond :: (Maybe Text -> f (Maybe Text))
-> DiskResourceUtilization -> f DiskResourceUtilization
diskResourceUtilization_diskWriteBytesPerSecond = (DiskResourceUtilization -> Maybe Text)
-> (DiskResourceUtilization
-> Maybe Text -> DiskResourceUtilization)
-> Lens
DiskResourceUtilization
DiskResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskResourceUtilization' {Maybe Text
diskWriteBytesPerSecond :: Maybe Text
$sel:diskWriteBytesPerSecond:DiskResourceUtilization' :: DiskResourceUtilization -> Maybe Text
diskWriteBytesPerSecond} -> Maybe Text
diskWriteBytesPerSecond) (\s :: DiskResourceUtilization
s@DiskResourceUtilization' {} Maybe Text
a -> DiskResourceUtilization
s {$sel:diskWriteBytesPerSecond:DiskResourceUtilization' :: Maybe Text
diskWriteBytesPerSecond = Maybe Text
a} :: DiskResourceUtilization)
diskResourceUtilization_diskReadBytesPerSecond :: Lens.Lens' DiskResourceUtilization (Prelude.Maybe Prelude.Text)
diskResourceUtilization_diskReadBytesPerSecond :: (Maybe Text -> f (Maybe Text))
-> DiskResourceUtilization -> f DiskResourceUtilization
diskResourceUtilization_diskReadBytesPerSecond = (DiskResourceUtilization -> Maybe Text)
-> (DiskResourceUtilization
-> Maybe Text -> DiskResourceUtilization)
-> Lens
DiskResourceUtilization
DiskResourceUtilization
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DiskResourceUtilization' {Maybe Text
diskReadBytesPerSecond :: Maybe Text
$sel:diskReadBytesPerSecond:DiskResourceUtilization' :: DiskResourceUtilization -> Maybe Text
diskReadBytesPerSecond} -> Maybe Text
diskReadBytesPerSecond) (\s :: DiskResourceUtilization
s@DiskResourceUtilization' {} Maybe Text
a -> DiskResourceUtilization
s {$sel:diskReadBytesPerSecond:DiskResourceUtilization' :: Maybe Text
diskReadBytesPerSecond = Maybe Text
a} :: DiskResourceUtilization)
instance Core.FromJSON DiskResourceUtilization where
parseJSON :: Value -> Parser DiskResourceUtilization
parseJSON =
String
-> (Object -> Parser DiskResourceUtilization)
-> Value
-> Parser DiskResourceUtilization
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DiskResourceUtilization"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DiskResourceUtilization
DiskResourceUtilization'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> DiskResourceUtilization)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> DiskResourceUtilization)
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
"DiskWriteOpsPerSecond")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> DiskResourceUtilization)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> DiskResourceUtilization)
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
"DiskReadOpsPerSecond")
Parser (Maybe Text -> Maybe Text -> DiskResourceUtilization)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> DiskResourceUtilization)
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
"DiskWriteBytesPerSecond")
Parser (Maybe Text -> DiskResourceUtilization)
-> Parser (Maybe Text) -> Parser DiskResourceUtilization
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
"DiskReadBytesPerSecond")
)
instance Prelude.Hashable DiskResourceUtilization
instance Prelude.NFData DiskResourceUtilization