{-# 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.CoverageNormalizedUnits where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CoverageNormalizedUnits = CoverageNormalizedUnits'
{
CoverageNormalizedUnits -> Maybe Text
reservedNormalizedUnits :: Prelude.Maybe Prelude.Text,
CoverageNormalizedUnits -> Maybe Text
totalRunningNormalizedUnits :: Prelude.Maybe Prelude.Text,
CoverageNormalizedUnits -> Maybe Text
coverageNormalizedUnitsPercentage :: Prelude.Maybe Prelude.Text,
CoverageNormalizedUnits -> Maybe Text
onDemandNormalizedUnits :: Prelude.Maybe Prelude.Text
}
deriving (CoverageNormalizedUnits -> CoverageNormalizedUnits -> Bool
(CoverageNormalizedUnits -> CoverageNormalizedUnits -> Bool)
-> (CoverageNormalizedUnits -> CoverageNormalizedUnits -> Bool)
-> Eq CoverageNormalizedUnits
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CoverageNormalizedUnits -> CoverageNormalizedUnits -> Bool
$c/= :: CoverageNormalizedUnits -> CoverageNormalizedUnits -> Bool
== :: CoverageNormalizedUnits -> CoverageNormalizedUnits -> Bool
$c== :: CoverageNormalizedUnits -> CoverageNormalizedUnits -> Bool
Prelude.Eq, ReadPrec [CoverageNormalizedUnits]
ReadPrec CoverageNormalizedUnits
Int -> ReadS CoverageNormalizedUnits
ReadS [CoverageNormalizedUnits]
(Int -> ReadS CoverageNormalizedUnits)
-> ReadS [CoverageNormalizedUnits]
-> ReadPrec CoverageNormalizedUnits
-> ReadPrec [CoverageNormalizedUnits]
-> Read CoverageNormalizedUnits
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CoverageNormalizedUnits]
$creadListPrec :: ReadPrec [CoverageNormalizedUnits]
readPrec :: ReadPrec CoverageNormalizedUnits
$creadPrec :: ReadPrec CoverageNormalizedUnits
readList :: ReadS [CoverageNormalizedUnits]
$creadList :: ReadS [CoverageNormalizedUnits]
readsPrec :: Int -> ReadS CoverageNormalizedUnits
$creadsPrec :: Int -> ReadS CoverageNormalizedUnits
Prelude.Read, Int -> CoverageNormalizedUnits -> ShowS
[CoverageNormalizedUnits] -> ShowS
CoverageNormalizedUnits -> String
(Int -> CoverageNormalizedUnits -> ShowS)
-> (CoverageNormalizedUnits -> String)
-> ([CoverageNormalizedUnits] -> ShowS)
-> Show CoverageNormalizedUnits
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CoverageNormalizedUnits] -> ShowS
$cshowList :: [CoverageNormalizedUnits] -> ShowS
show :: CoverageNormalizedUnits -> String
$cshow :: CoverageNormalizedUnits -> String
showsPrec :: Int -> CoverageNormalizedUnits -> ShowS
$cshowsPrec :: Int -> CoverageNormalizedUnits -> ShowS
Prelude.Show, (forall x.
CoverageNormalizedUnits -> Rep CoverageNormalizedUnits x)
-> (forall x.
Rep CoverageNormalizedUnits x -> CoverageNormalizedUnits)
-> Generic CoverageNormalizedUnits
forall x. Rep CoverageNormalizedUnits x -> CoverageNormalizedUnits
forall x. CoverageNormalizedUnits -> Rep CoverageNormalizedUnits x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CoverageNormalizedUnits x -> CoverageNormalizedUnits
$cfrom :: forall x. CoverageNormalizedUnits -> Rep CoverageNormalizedUnits x
Prelude.Generic)
newCoverageNormalizedUnits ::
CoverageNormalizedUnits
newCoverageNormalizedUnits :: CoverageNormalizedUnits
newCoverageNormalizedUnits =
CoverageNormalizedUnits' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> CoverageNormalizedUnits
CoverageNormalizedUnits'
{ $sel:reservedNormalizedUnits:CoverageNormalizedUnits' :: Maybe Text
reservedNormalizedUnits =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:totalRunningNormalizedUnits:CoverageNormalizedUnits' :: Maybe Text
totalRunningNormalizedUnits = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:coverageNormalizedUnitsPercentage:CoverageNormalizedUnits' :: Maybe Text
coverageNormalizedUnitsPercentage =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:onDemandNormalizedUnits:CoverageNormalizedUnits' :: Maybe Text
onDemandNormalizedUnits = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
coverageNormalizedUnits_reservedNormalizedUnits :: Lens.Lens' CoverageNormalizedUnits (Prelude.Maybe Prelude.Text)
coverageNormalizedUnits_reservedNormalizedUnits :: (Maybe Text -> f (Maybe Text))
-> CoverageNormalizedUnits -> f CoverageNormalizedUnits
coverageNormalizedUnits_reservedNormalizedUnits = (CoverageNormalizedUnits -> Maybe Text)
-> (CoverageNormalizedUnits
-> Maybe Text -> CoverageNormalizedUnits)
-> Lens
CoverageNormalizedUnits
CoverageNormalizedUnits
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoverageNormalizedUnits' {Maybe Text
reservedNormalizedUnits :: Maybe Text
$sel:reservedNormalizedUnits:CoverageNormalizedUnits' :: CoverageNormalizedUnits -> Maybe Text
reservedNormalizedUnits} -> Maybe Text
reservedNormalizedUnits) (\s :: CoverageNormalizedUnits
s@CoverageNormalizedUnits' {} Maybe Text
a -> CoverageNormalizedUnits
s {$sel:reservedNormalizedUnits:CoverageNormalizedUnits' :: Maybe Text
reservedNormalizedUnits = Maybe Text
a} :: CoverageNormalizedUnits)
coverageNormalizedUnits_totalRunningNormalizedUnits :: Lens.Lens' CoverageNormalizedUnits (Prelude.Maybe Prelude.Text)
coverageNormalizedUnits_totalRunningNormalizedUnits :: (Maybe Text -> f (Maybe Text))
-> CoverageNormalizedUnits -> f CoverageNormalizedUnits
coverageNormalizedUnits_totalRunningNormalizedUnits = (CoverageNormalizedUnits -> Maybe Text)
-> (CoverageNormalizedUnits
-> Maybe Text -> CoverageNormalizedUnits)
-> Lens
CoverageNormalizedUnits
CoverageNormalizedUnits
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoverageNormalizedUnits' {Maybe Text
totalRunningNormalizedUnits :: Maybe Text
$sel:totalRunningNormalizedUnits:CoverageNormalizedUnits' :: CoverageNormalizedUnits -> Maybe Text
totalRunningNormalizedUnits} -> Maybe Text
totalRunningNormalizedUnits) (\s :: CoverageNormalizedUnits
s@CoverageNormalizedUnits' {} Maybe Text
a -> CoverageNormalizedUnits
s {$sel:totalRunningNormalizedUnits:CoverageNormalizedUnits' :: Maybe Text
totalRunningNormalizedUnits = Maybe Text
a} :: CoverageNormalizedUnits)
coverageNormalizedUnits_coverageNormalizedUnitsPercentage :: Lens.Lens' CoverageNormalizedUnits (Prelude.Maybe Prelude.Text)
coverageNormalizedUnits_coverageNormalizedUnitsPercentage :: (Maybe Text -> f (Maybe Text))
-> CoverageNormalizedUnits -> f CoverageNormalizedUnits
coverageNormalizedUnits_coverageNormalizedUnitsPercentage = (CoverageNormalizedUnits -> Maybe Text)
-> (CoverageNormalizedUnits
-> Maybe Text -> CoverageNormalizedUnits)
-> Lens
CoverageNormalizedUnits
CoverageNormalizedUnits
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoverageNormalizedUnits' {Maybe Text
coverageNormalizedUnitsPercentage :: Maybe Text
$sel:coverageNormalizedUnitsPercentage:CoverageNormalizedUnits' :: CoverageNormalizedUnits -> Maybe Text
coverageNormalizedUnitsPercentage} -> Maybe Text
coverageNormalizedUnitsPercentage) (\s :: CoverageNormalizedUnits
s@CoverageNormalizedUnits' {} Maybe Text
a -> CoverageNormalizedUnits
s {$sel:coverageNormalizedUnitsPercentage:CoverageNormalizedUnits' :: Maybe Text
coverageNormalizedUnitsPercentage = Maybe Text
a} :: CoverageNormalizedUnits)
coverageNormalizedUnits_onDemandNormalizedUnits :: Lens.Lens' CoverageNormalizedUnits (Prelude.Maybe Prelude.Text)
coverageNormalizedUnits_onDemandNormalizedUnits :: (Maybe Text -> f (Maybe Text))
-> CoverageNormalizedUnits -> f CoverageNormalizedUnits
coverageNormalizedUnits_onDemandNormalizedUnits = (CoverageNormalizedUnits -> Maybe Text)
-> (CoverageNormalizedUnits
-> Maybe Text -> CoverageNormalizedUnits)
-> Lens
CoverageNormalizedUnits
CoverageNormalizedUnits
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CoverageNormalizedUnits' {Maybe Text
onDemandNormalizedUnits :: Maybe Text
$sel:onDemandNormalizedUnits:CoverageNormalizedUnits' :: CoverageNormalizedUnits -> Maybe Text
onDemandNormalizedUnits} -> Maybe Text
onDemandNormalizedUnits) (\s :: CoverageNormalizedUnits
s@CoverageNormalizedUnits' {} Maybe Text
a -> CoverageNormalizedUnits
s {$sel:onDemandNormalizedUnits:CoverageNormalizedUnits' :: Maybe Text
onDemandNormalizedUnits = Maybe Text
a} :: CoverageNormalizedUnits)
instance Core.FromJSON CoverageNormalizedUnits where
parseJSON :: Value -> Parser CoverageNormalizedUnits
parseJSON =
String
-> (Object -> Parser CoverageNormalizedUnits)
-> Value
-> Parser CoverageNormalizedUnits
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CoverageNormalizedUnits"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> CoverageNormalizedUnits
CoverageNormalizedUnits'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> CoverageNormalizedUnits)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> CoverageNormalizedUnits)
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
"ReservedNormalizedUnits")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> CoverageNormalizedUnits)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> CoverageNormalizedUnits)
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
"TotalRunningNormalizedUnits")
Parser (Maybe Text -> Maybe Text -> CoverageNormalizedUnits)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> CoverageNormalizedUnits)
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
"CoverageNormalizedUnitsPercentage")
Parser (Maybe Text -> CoverageNormalizedUnits)
-> Parser (Maybe Text) -> Parser CoverageNormalizedUnits
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
"OnDemandNormalizedUnits")
)
instance Prelude.Hashable CoverageNormalizedUnits
instance Prelude.NFData CoverageNormalizedUnits