{-# 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.CurrentInstance where
import qualified Amazonka.Core as Core
import Amazonka.CostExplorer.Types.ResourceDetails
import Amazonka.CostExplorer.Types.ResourceUtilization
import Amazonka.CostExplorer.Types.TagValues
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CurrentInstance = CurrentInstance'
{
CurrentInstance -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
CurrentInstance -> Maybe Text
currencyCode :: Prelude.Maybe Prelude.Text,
CurrentInstance -> Maybe ResourceUtilization
resourceUtilization :: Prelude.Maybe ResourceUtilization,
CurrentInstance -> Maybe ResourceDetails
resourceDetails :: Prelude.Maybe ResourceDetails,
CurrentInstance -> Maybe Text
totalRunningHoursInLookbackPeriod :: Prelude.Maybe Prelude.Text,
CurrentInstance -> Maybe Text
reservationCoveredHoursInLookbackPeriod :: Prelude.Maybe Prelude.Text,
CurrentInstance -> Maybe Text
onDemandHoursInLookbackPeriod :: Prelude.Maybe Prelude.Text,
CurrentInstance -> Maybe Text
monthlyCost :: Prelude.Maybe Prelude.Text,
CurrentInstance -> Maybe Text
instanceName :: Prelude.Maybe Prelude.Text,
CurrentInstance -> Maybe Text
savingsPlansCoveredHoursInLookbackPeriod :: Prelude.Maybe Prelude.Text,
CurrentInstance -> Maybe [TagValues]
tags :: Prelude.Maybe [TagValues]
}
deriving (CurrentInstance -> CurrentInstance -> Bool
(CurrentInstance -> CurrentInstance -> Bool)
-> (CurrentInstance -> CurrentInstance -> Bool)
-> Eq CurrentInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CurrentInstance -> CurrentInstance -> Bool
$c/= :: CurrentInstance -> CurrentInstance -> Bool
== :: CurrentInstance -> CurrentInstance -> Bool
$c== :: CurrentInstance -> CurrentInstance -> Bool
Prelude.Eq, ReadPrec [CurrentInstance]
ReadPrec CurrentInstance
Int -> ReadS CurrentInstance
ReadS [CurrentInstance]
(Int -> ReadS CurrentInstance)
-> ReadS [CurrentInstance]
-> ReadPrec CurrentInstance
-> ReadPrec [CurrentInstance]
-> Read CurrentInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CurrentInstance]
$creadListPrec :: ReadPrec [CurrentInstance]
readPrec :: ReadPrec CurrentInstance
$creadPrec :: ReadPrec CurrentInstance
readList :: ReadS [CurrentInstance]
$creadList :: ReadS [CurrentInstance]
readsPrec :: Int -> ReadS CurrentInstance
$creadsPrec :: Int -> ReadS CurrentInstance
Prelude.Read, Int -> CurrentInstance -> ShowS
[CurrentInstance] -> ShowS
CurrentInstance -> String
(Int -> CurrentInstance -> ShowS)
-> (CurrentInstance -> String)
-> ([CurrentInstance] -> ShowS)
-> Show CurrentInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CurrentInstance] -> ShowS
$cshowList :: [CurrentInstance] -> ShowS
show :: CurrentInstance -> String
$cshow :: CurrentInstance -> String
showsPrec :: Int -> CurrentInstance -> ShowS
$cshowsPrec :: Int -> CurrentInstance -> ShowS
Prelude.Show, (forall x. CurrentInstance -> Rep CurrentInstance x)
-> (forall x. Rep CurrentInstance x -> CurrentInstance)
-> Generic CurrentInstance
forall x. Rep CurrentInstance x -> CurrentInstance
forall x. CurrentInstance -> Rep CurrentInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CurrentInstance x -> CurrentInstance
$cfrom :: forall x. CurrentInstance -> Rep CurrentInstance x
Prelude.Generic)
newCurrentInstance ::
CurrentInstance
newCurrentInstance :: CurrentInstance
newCurrentInstance =
CurrentInstance' :: Maybe Text
-> Maybe Text
-> Maybe ResourceUtilization
-> Maybe ResourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance
CurrentInstance'
{ $sel:resourceId:CurrentInstance' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:currencyCode:CurrentInstance' :: Maybe Text
currencyCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceUtilization:CurrentInstance' :: Maybe ResourceUtilization
resourceUtilization = Maybe ResourceUtilization
forall a. Maybe a
Prelude.Nothing,
$sel:resourceDetails:CurrentInstance' :: Maybe ResourceDetails
resourceDetails = Maybe ResourceDetails
forall a. Maybe a
Prelude.Nothing,
$sel:totalRunningHoursInLookbackPeriod:CurrentInstance' :: Maybe Text
totalRunningHoursInLookbackPeriod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservationCoveredHoursInLookbackPeriod:CurrentInstance' :: Maybe Text
reservationCoveredHoursInLookbackPeriod =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:onDemandHoursInLookbackPeriod:CurrentInstance' :: Maybe Text
onDemandHoursInLookbackPeriod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:monthlyCost:CurrentInstance' :: Maybe Text
monthlyCost = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceName:CurrentInstance' :: Maybe Text
instanceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:savingsPlansCoveredHoursInLookbackPeriod:CurrentInstance' :: Maybe Text
savingsPlansCoveredHoursInLookbackPeriod =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CurrentInstance' :: Maybe [TagValues]
tags = Maybe [TagValues]
forall a. Maybe a
Prelude.Nothing
}
currentInstance_resourceId :: Lens.Lens' CurrentInstance (Prelude.Maybe Prelude.Text)
currentInstance_resourceId :: (Maybe Text -> f (Maybe Text))
-> CurrentInstance -> f CurrentInstance
currentInstance_resourceId = (CurrentInstance -> Maybe Text)
-> (CurrentInstance -> Maybe Text -> CurrentInstance)
-> Lens CurrentInstance CurrentInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:CurrentInstance' :: CurrentInstance -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe Text
a -> CurrentInstance
s {$sel:resourceId:CurrentInstance' :: Maybe Text
resourceId = Maybe Text
a} :: CurrentInstance)
currentInstance_currencyCode :: Lens.Lens' CurrentInstance (Prelude.Maybe Prelude.Text)
currentInstance_currencyCode :: (Maybe Text -> f (Maybe Text))
-> CurrentInstance -> f CurrentInstance
currentInstance_currencyCode = (CurrentInstance -> Maybe Text)
-> (CurrentInstance -> Maybe Text -> CurrentInstance)
-> Lens CurrentInstance CurrentInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe Text
currencyCode :: Maybe Text
$sel:currencyCode:CurrentInstance' :: CurrentInstance -> Maybe Text
currencyCode} -> Maybe Text
currencyCode) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe Text
a -> CurrentInstance
s {$sel:currencyCode:CurrentInstance' :: Maybe Text
currencyCode = Maybe Text
a} :: CurrentInstance)
currentInstance_resourceUtilization :: Lens.Lens' CurrentInstance (Prelude.Maybe ResourceUtilization)
currentInstance_resourceUtilization :: (Maybe ResourceUtilization -> f (Maybe ResourceUtilization))
-> CurrentInstance -> f CurrentInstance
currentInstance_resourceUtilization = (CurrentInstance -> Maybe ResourceUtilization)
-> (CurrentInstance
-> Maybe ResourceUtilization -> CurrentInstance)
-> Lens
CurrentInstance
CurrentInstance
(Maybe ResourceUtilization)
(Maybe ResourceUtilization)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe ResourceUtilization
resourceUtilization :: Maybe ResourceUtilization
$sel:resourceUtilization:CurrentInstance' :: CurrentInstance -> Maybe ResourceUtilization
resourceUtilization} -> Maybe ResourceUtilization
resourceUtilization) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe ResourceUtilization
a -> CurrentInstance
s {$sel:resourceUtilization:CurrentInstance' :: Maybe ResourceUtilization
resourceUtilization = Maybe ResourceUtilization
a} :: CurrentInstance)
currentInstance_resourceDetails :: Lens.Lens' CurrentInstance (Prelude.Maybe ResourceDetails)
currentInstance_resourceDetails :: (Maybe ResourceDetails -> f (Maybe ResourceDetails))
-> CurrentInstance -> f CurrentInstance
currentInstance_resourceDetails = (CurrentInstance -> Maybe ResourceDetails)
-> (CurrentInstance -> Maybe ResourceDetails -> CurrentInstance)
-> Lens
CurrentInstance
CurrentInstance
(Maybe ResourceDetails)
(Maybe ResourceDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe ResourceDetails
resourceDetails :: Maybe ResourceDetails
$sel:resourceDetails:CurrentInstance' :: CurrentInstance -> Maybe ResourceDetails
resourceDetails} -> Maybe ResourceDetails
resourceDetails) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe ResourceDetails
a -> CurrentInstance
s {$sel:resourceDetails:CurrentInstance' :: Maybe ResourceDetails
resourceDetails = Maybe ResourceDetails
a} :: CurrentInstance)
currentInstance_totalRunningHoursInLookbackPeriod :: Lens.Lens' CurrentInstance (Prelude.Maybe Prelude.Text)
currentInstance_totalRunningHoursInLookbackPeriod :: (Maybe Text -> f (Maybe Text))
-> CurrentInstance -> f CurrentInstance
currentInstance_totalRunningHoursInLookbackPeriod = (CurrentInstance -> Maybe Text)
-> (CurrentInstance -> Maybe Text -> CurrentInstance)
-> Lens CurrentInstance CurrentInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe Text
totalRunningHoursInLookbackPeriod :: Maybe Text
$sel:totalRunningHoursInLookbackPeriod:CurrentInstance' :: CurrentInstance -> Maybe Text
totalRunningHoursInLookbackPeriod} -> Maybe Text
totalRunningHoursInLookbackPeriod) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe Text
a -> CurrentInstance
s {$sel:totalRunningHoursInLookbackPeriod:CurrentInstance' :: Maybe Text
totalRunningHoursInLookbackPeriod = Maybe Text
a} :: CurrentInstance)
currentInstance_reservationCoveredHoursInLookbackPeriod :: Lens.Lens' CurrentInstance (Prelude.Maybe Prelude.Text)
currentInstance_reservationCoveredHoursInLookbackPeriod :: (Maybe Text -> f (Maybe Text))
-> CurrentInstance -> f CurrentInstance
currentInstance_reservationCoveredHoursInLookbackPeriod = (CurrentInstance -> Maybe Text)
-> (CurrentInstance -> Maybe Text -> CurrentInstance)
-> Lens CurrentInstance CurrentInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe Text
reservationCoveredHoursInLookbackPeriod :: Maybe Text
$sel:reservationCoveredHoursInLookbackPeriod:CurrentInstance' :: CurrentInstance -> Maybe Text
reservationCoveredHoursInLookbackPeriod} -> Maybe Text
reservationCoveredHoursInLookbackPeriod) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe Text
a -> CurrentInstance
s {$sel:reservationCoveredHoursInLookbackPeriod:CurrentInstance' :: Maybe Text
reservationCoveredHoursInLookbackPeriod = Maybe Text
a} :: CurrentInstance)
currentInstance_onDemandHoursInLookbackPeriod :: Lens.Lens' CurrentInstance (Prelude.Maybe Prelude.Text)
currentInstance_onDemandHoursInLookbackPeriod :: (Maybe Text -> f (Maybe Text))
-> CurrentInstance -> f CurrentInstance
currentInstance_onDemandHoursInLookbackPeriod = (CurrentInstance -> Maybe Text)
-> (CurrentInstance -> Maybe Text -> CurrentInstance)
-> Lens CurrentInstance CurrentInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe Text
onDemandHoursInLookbackPeriod :: Maybe Text
$sel:onDemandHoursInLookbackPeriod:CurrentInstance' :: CurrentInstance -> Maybe Text
onDemandHoursInLookbackPeriod} -> Maybe Text
onDemandHoursInLookbackPeriod) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe Text
a -> CurrentInstance
s {$sel:onDemandHoursInLookbackPeriod:CurrentInstance' :: Maybe Text
onDemandHoursInLookbackPeriod = Maybe Text
a} :: CurrentInstance)
currentInstance_monthlyCost :: Lens.Lens' CurrentInstance (Prelude.Maybe Prelude.Text)
currentInstance_monthlyCost :: (Maybe Text -> f (Maybe Text))
-> CurrentInstance -> f CurrentInstance
currentInstance_monthlyCost = (CurrentInstance -> Maybe Text)
-> (CurrentInstance -> Maybe Text -> CurrentInstance)
-> Lens CurrentInstance CurrentInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe Text
monthlyCost :: Maybe Text
$sel:monthlyCost:CurrentInstance' :: CurrentInstance -> Maybe Text
monthlyCost} -> Maybe Text
monthlyCost) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe Text
a -> CurrentInstance
s {$sel:monthlyCost:CurrentInstance' :: Maybe Text
monthlyCost = Maybe Text
a} :: CurrentInstance)
currentInstance_instanceName :: Lens.Lens' CurrentInstance (Prelude.Maybe Prelude.Text)
currentInstance_instanceName :: (Maybe Text -> f (Maybe Text))
-> CurrentInstance -> f CurrentInstance
currentInstance_instanceName = (CurrentInstance -> Maybe Text)
-> (CurrentInstance -> Maybe Text -> CurrentInstance)
-> Lens CurrentInstance CurrentInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe Text
instanceName :: Maybe Text
$sel:instanceName:CurrentInstance' :: CurrentInstance -> Maybe Text
instanceName} -> Maybe Text
instanceName) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe Text
a -> CurrentInstance
s {$sel:instanceName:CurrentInstance' :: Maybe Text
instanceName = Maybe Text
a} :: CurrentInstance)
currentInstance_savingsPlansCoveredHoursInLookbackPeriod :: Lens.Lens' CurrentInstance (Prelude.Maybe Prelude.Text)
currentInstance_savingsPlansCoveredHoursInLookbackPeriod :: (Maybe Text -> f (Maybe Text))
-> CurrentInstance -> f CurrentInstance
currentInstance_savingsPlansCoveredHoursInLookbackPeriod = (CurrentInstance -> Maybe Text)
-> (CurrentInstance -> Maybe Text -> CurrentInstance)
-> Lens CurrentInstance CurrentInstance (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe Text
savingsPlansCoveredHoursInLookbackPeriod :: Maybe Text
$sel:savingsPlansCoveredHoursInLookbackPeriod:CurrentInstance' :: CurrentInstance -> Maybe Text
savingsPlansCoveredHoursInLookbackPeriod} -> Maybe Text
savingsPlansCoveredHoursInLookbackPeriod) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe Text
a -> CurrentInstance
s {$sel:savingsPlansCoveredHoursInLookbackPeriod:CurrentInstance' :: Maybe Text
savingsPlansCoveredHoursInLookbackPeriod = Maybe Text
a} :: CurrentInstance)
currentInstance_tags :: Lens.Lens' CurrentInstance (Prelude.Maybe [TagValues])
currentInstance_tags :: (Maybe [TagValues] -> f (Maybe [TagValues]))
-> CurrentInstance -> f CurrentInstance
currentInstance_tags = (CurrentInstance -> Maybe [TagValues])
-> (CurrentInstance -> Maybe [TagValues] -> CurrentInstance)
-> Lens
CurrentInstance
CurrentInstance
(Maybe [TagValues])
(Maybe [TagValues])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CurrentInstance' {Maybe [TagValues]
tags :: Maybe [TagValues]
$sel:tags:CurrentInstance' :: CurrentInstance -> Maybe [TagValues]
tags} -> Maybe [TagValues]
tags) (\s :: CurrentInstance
s@CurrentInstance' {} Maybe [TagValues]
a -> CurrentInstance
s {$sel:tags:CurrentInstance' :: Maybe [TagValues]
tags = Maybe [TagValues]
a} :: CurrentInstance) ((Maybe [TagValues] -> f (Maybe [TagValues]))
-> CurrentInstance -> f CurrentInstance)
-> ((Maybe [TagValues] -> f (Maybe [TagValues]))
-> Maybe [TagValues] -> f (Maybe [TagValues]))
-> (Maybe [TagValues] -> f (Maybe [TagValues]))
-> CurrentInstance
-> f CurrentInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TagValues] [TagValues] [TagValues] [TagValues]
-> Iso
(Maybe [TagValues])
(Maybe [TagValues])
(Maybe [TagValues])
(Maybe [TagValues])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [TagValues] [TagValues] [TagValues] [TagValues]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON CurrentInstance where
parseJSON :: Value -> Parser CurrentInstance
parseJSON =
String
-> (Object -> Parser CurrentInstance)
-> Value
-> Parser CurrentInstance
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"CurrentInstance"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe ResourceUtilization
-> Maybe ResourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance
CurrentInstance'
(Maybe Text
-> Maybe Text
-> Maybe ResourceUtilization
-> Maybe ResourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ResourceUtilization
-> Maybe ResourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
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
"ResourceId")
Parser
(Maybe Text
-> Maybe ResourceUtilization
-> Maybe ResourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe ResourceUtilization
-> Maybe ResourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
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
"CurrencyCode")
Parser
(Maybe ResourceUtilization
-> Maybe ResourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
-> Parser (Maybe ResourceUtilization)
-> Parser
(Maybe ResourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceUtilization)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceUtilization")
Parser
(Maybe ResourceDetails
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
-> Parser (Maybe ResourceDetails)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceDetails")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
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
"TotalRunningHoursInLookbackPeriod")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
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
"ReservationCoveredHoursInLookbackPeriod"
)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
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
"OnDemandHoursInLookbackPeriod")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [TagValues]
-> CurrentInstance)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe [TagValues] -> CurrentInstance)
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
"MonthlyCost")
Parser
(Maybe Text -> Maybe Text -> Maybe [TagValues] -> CurrentInstance)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe [TagValues] -> CurrentInstance)
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
"InstanceName")
Parser (Maybe Text -> Maybe [TagValues] -> CurrentInstance)
-> Parser (Maybe Text)
-> Parser (Maybe [TagValues] -> CurrentInstance)
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
"SavingsPlansCoveredHoursInLookbackPeriod"
)
Parser (Maybe [TagValues] -> CurrentInstance)
-> Parser (Maybe [TagValues]) -> Parser CurrentInstance
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [TagValues]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Tags" Parser (Maybe (Maybe [TagValues]))
-> Maybe [TagValues] -> Parser (Maybe [TagValues])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [TagValues]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable CurrentInstance
instance Prelude.NFData CurrentInstance