{-# 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.EC2ResourceDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data EC2ResourceDetails = EC2ResourceDetails'
{
EC2ResourceDetails -> Maybe Text
hourlyOnDemandRate :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
memory :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
networkPerformance :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
platform :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
sku :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
storage :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
vcpu :: Prelude.Maybe Prelude.Text
}
deriving (EC2ResourceDetails -> EC2ResourceDetails -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EC2ResourceDetails -> EC2ResourceDetails -> Bool
$c/= :: EC2ResourceDetails -> EC2ResourceDetails -> Bool
== :: EC2ResourceDetails -> EC2ResourceDetails -> Bool
$c== :: EC2ResourceDetails -> EC2ResourceDetails -> Bool
Prelude.Eq, ReadPrec [EC2ResourceDetails]
ReadPrec EC2ResourceDetails
Int -> ReadS EC2ResourceDetails
ReadS [EC2ResourceDetails]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EC2ResourceDetails]
$creadListPrec :: ReadPrec [EC2ResourceDetails]
readPrec :: ReadPrec EC2ResourceDetails
$creadPrec :: ReadPrec EC2ResourceDetails
readList :: ReadS [EC2ResourceDetails]
$creadList :: ReadS [EC2ResourceDetails]
readsPrec :: Int -> ReadS EC2ResourceDetails
$creadsPrec :: Int -> ReadS EC2ResourceDetails
Prelude.Read, Int -> EC2ResourceDetails -> ShowS
[EC2ResourceDetails] -> ShowS
EC2ResourceDetails -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EC2ResourceDetails] -> ShowS
$cshowList :: [EC2ResourceDetails] -> ShowS
show :: EC2ResourceDetails -> String
$cshow :: EC2ResourceDetails -> String
showsPrec :: Int -> EC2ResourceDetails -> ShowS
$cshowsPrec :: Int -> EC2ResourceDetails -> ShowS
Prelude.Show, forall x. Rep EC2ResourceDetails x -> EC2ResourceDetails
forall x. EC2ResourceDetails -> Rep EC2ResourceDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EC2ResourceDetails x -> EC2ResourceDetails
$cfrom :: forall x. EC2ResourceDetails -> Rep EC2ResourceDetails x
Prelude.Generic)
newEC2ResourceDetails ::
EC2ResourceDetails
newEC2ResourceDetails :: EC2ResourceDetails
newEC2ResourceDetails =
EC2ResourceDetails'
{ $sel:hourlyOnDemandRate:EC2ResourceDetails' :: Maybe Text
hourlyOnDemandRate =
forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:EC2ResourceDetails' :: Maybe Text
instanceType = forall a. Maybe a
Prelude.Nothing,
$sel:memory:EC2ResourceDetails' :: Maybe Text
memory = forall a. Maybe a
Prelude.Nothing,
$sel:networkPerformance:EC2ResourceDetails' :: Maybe Text
networkPerformance = forall a. Maybe a
Prelude.Nothing,
$sel:platform:EC2ResourceDetails' :: Maybe Text
platform = forall a. Maybe a
Prelude.Nothing,
$sel:region:EC2ResourceDetails' :: Maybe Text
region = forall a. Maybe a
Prelude.Nothing,
$sel:sku:EC2ResourceDetails' :: Maybe Text
sku = forall a. Maybe a
Prelude.Nothing,
$sel:storage:EC2ResourceDetails' :: Maybe Text
storage = forall a. Maybe a
Prelude.Nothing,
$sel:vcpu:EC2ResourceDetails' :: Maybe Text
vcpu = forall a. Maybe a
Prelude.Nothing
}
eC2ResourceDetails_hourlyOnDemandRate :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_hourlyOnDemandRate :: Lens' EC2ResourceDetails (Maybe Text)
eC2ResourceDetails_hourlyOnDemandRate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ResourceDetails' {Maybe Text
hourlyOnDemandRate :: Maybe Text
$sel:hourlyOnDemandRate:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
hourlyOnDemandRate} -> Maybe Text
hourlyOnDemandRate) (\s :: EC2ResourceDetails
s@EC2ResourceDetails' {} Maybe Text
a -> EC2ResourceDetails
s {$sel:hourlyOnDemandRate:EC2ResourceDetails' :: Maybe Text
hourlyOnDemandRate = Maybe Text
a} :: EC2ResourceDetails)
eC2ResourceDetails_instanceType :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_instanceType :: Lens' EC2ResourceDetails (Maybe Text)
eC2ResourceDetails_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ResourceDetails' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: EC2ResourceDetails
s@EC2ResourceDetails' {} Maybe Text
a -> EC2ResourceDetails
s {$sel:instanceType:EC2ResourceDetails' :: Maybe Text
instanceType = Maybe Text
a} :: EC2ResourceDetails)
eC2ResourceDetails_memory :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_memory :: Lens' EC2ResourceDetails (Maybe Text)
eC2ResourceDetails_memory = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ResourceDetails' {Maybe Text
memory :: Maybe Text
$sel:memory:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
memory} -> Maybe Text
memory) (\s :: EC2ResourceDetails
s@EC2ResourceDetails' {} Maybe Text
a -> EC2ResourceDetails
s {$sel:memory:EC2ResourceDetails' :: Maybe Text
memory = Maybe Text
a} :: EC2ResourceDetails)
eC2ResourceDetails_networkPerformance :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_networkPerformance :: Lens' EC2ResourceDetails (Maybe Text)
eC2ResourceDetails_networkPerformance = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ResourceDetails' {Maybe Text
networkPerformance :: Maybe Text
$sel:networkPerformance:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
networkPerformance} -> Maybe Text
networkPerformance) (\s :: EC2ResourceDetails
s@EC2ResourceDetails' {} Maybe Text
a -> EC2ResourceDetails
s {$sel:networkPerformance:EC2ResourceDetails' :: Maybe Text
networkPerformance = Maybe Text
a} :: EC2ResourceDetails)
eC2ResourceDetails_platform :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_platform :: Lens' EC2ResourceDetails (Maybe Text)
eC2ResourceDetails_platform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ResourceDetails' {Maybe Text
platform :: Maybe Text
$sel:platform:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
platform} -> Maybe Text
platform) (\s :: EC2ResourceDetails
s@EC2ResourceDetails' {} Maybe Text
a -> EC2ResourceDetails
s {$sel:platform:EC2ResourceDetails' :: Maybe Text
platform = Maybe Text
a} :: EC2ResourceDetails)
eC2ResourceDetails_region :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_region :: Lens' EC2ResourceDetails (Maybe Text)
eC2ResourceDetails_region = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ResourceDetails' {Maybe Text
region :: Maybe Text
$sel:region:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
region} -> Maybe Text
region) (\s :: EC2ResourceDetails
s@EC2ResourceDetails' {} Maybe Text
a -> EC2ResourceDetails
s {$sel:region:EC2ResourceDetails' :: Maybe Text
region = Maybe Text
a} :: EC2ResourceDetails)
eC2ResourceDetails_sku :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_sku :: Lens' EC2ResourceDetails (Maybe Text)
eC2ResourceDetails_sku = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ResourceDetails' {Maybe Text
sku :: Maybe Text
$sel:sku:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
sku} -> Maybe Text
sku) (\s :: EC2ResourceDetails
s@EC2ResourceDetails' {} Maybe Text
a -> EC2ResourceDetails
s {$sel:sku:EC2ResourceDetails' :: Maybe Text
sku = Maybe Text
a} :: EC2ResourceDetails)
eC2ResourceDetails_storage :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_storage :: Lens' EC2ResourceDetails (Maybe Text)
eC2ResourceDetails_storage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ResourceDetails' {Maybe Text
storage :: Maybe Text
$sel:storage:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
storage} -> Maybe Text
storage) (\s :: EC2ResourceDetails
s@EC2ResourceDetails' {} Maybe Text
a -> EC2ResourceDetails
s {$sel:storage:EC2ResourceDetails' :: Maybe Text
storage = Maybe Text
a} :: EC2ResourceDetails)
eC2ResourceDetails_vcpu :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_vcpu :: Lens' EC2ResourceDetails (Maybe Text)
eC2ResourceDetails_vcpu = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EC2ResourceDetails' {Maybe Text
vcpu :: Maybe Text
$sel:vcpu:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
vcpu} -> Maybe Text
vcpu) (\s :: EC2ResourceDetails
s@EC2ResourceDetails' {} Maybe Text
a -> EC2ResourceDetails
s {$sel:vcpu:EC2ResourceDetails' :: Maybe Text
vcpu = Maybe Text
a} :: EC2ResourceDetails)
instance Data.FromJSON EC2ResourceDetails where
parseJSON :: Value -> Parser EC2ResourceDetails
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"EC2ResourceDetails"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails
EC2ResourceDetails'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"HourlyOnDemandRate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"InstanceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Memory")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"NetworkPerformance")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Platform")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Region")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Sku")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Storage")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"Vcpu")
)
instance Prelude.Hashable EC2ResourceDetails where
hashWithSalt :: Int -> EC2ResourceDetails -> Int
hashWithSalt Int
_salt EC2ResourceDetails' {Maybe Text
vcpu :: Maybe Text
storage :: Maybe Text
sku :: Maybe Text
region :: Maybe Text
platform :: Maybe Text
networkPerformance :: Maybe Text
memory :: Maybe Text
instanceType :: Maybe Text
hourlyOnDemandRate :: Maybe Text
$sel:vcpu:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:storage:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:sku:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:region:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:platform:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:networkPerformance:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:memory:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:instanceType:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:hourlyOnDemandRate:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hourlyOnDemandRate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
instanceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
memory
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkPerformance
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
platform
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
region
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
sku
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
storage
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vcpu
instance Prelude.NFData EC2ResourceDetails where
rnf :: EC2ResourceDetails -> ()
rnf EC2ResourceDetails' {Maybe Text
vcpu :: Maybe Text
storage :: Maybe Text
sku :: Maybe Text
region :: Maybe Text
platform :: Maybe Text
networkPerformance :: Maybe Text
memory :: Maybe Text
instanceType :: Maybe Text
hourlyOnDemandRate :: Maybe Text
$sel:vcpu:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:storage:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:sku:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:region:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:platform:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:networkPerformance:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:memory:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:instanceType:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
$sel:hourlyOnDemandRate:EC2ResourceDetails' :: EC2ResourceDetails -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hourlyOnDemandRate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
instanceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
memory
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkPerformance
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
platform
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
region
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
sku
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
storage
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vcpu