{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data EC2ResourceDetails = EC2ResourceDetails'
{
EC2ResourceDetails -> Maybe Text
platform :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
vcpu :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
networkPerformance :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
memory :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
storage :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
sku :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
EC2ResourceDetails -> Maybe Text
hourlyOnDemandRate :: Prelude.Maybe Prelude.Text
}
deriving (EC2ResourceDetails -> EC2ResourceDetails -> Bool
(EC2ResourceDetails -> EC2ResourceDetails -> Bool)
-> (EC2ResourceDetails -> EC2ResourceDetails -> Bool)
-> Eq EC2ResourceDetails
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]
(Int -> ReadS EC2ResourceDetails)
-> ReadS [EC2ResourceDetails]
-> ReadPrec EC2ResourceDetails
-> ReadPrec [EC2ResourceDetails]
-> Read 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
(Int -> EC2ResourceDetails -> ShowS)
-> (EC2ResourceDetails -> String)
-> ([EC2ResourceDetails] -> ShowS)
-> Show EC2ResourceDetails
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. EC2ResourceDetails -> Rep EC2ResourceDetails x)
-> (forall x. Rep EC2ResourceDetails x -> EC2ResourceDetails)
-> Generic EC2ResourceDetails
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' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails
EC2ResourceDetails'
{ $sel:platform:EC2ResourceDetails' :: Maybe Text
platform = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vcpu:EC2ResourceDetails' :: Maybe Text
vcpu = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:networkPerformance:EC2ResourceDetails' :: Maybe Text
networkPerformance = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:memory:EC2ResourceDetails' :: Maybe Text
memory = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:EC2ResourceDetails' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:storage:EC2ResourceDetails' :: Maybe Text
storage = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sku:EC2ResourceDetails' :: Maybe Text
sku = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:region:EC2ResourceDetails' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hourlyOnDemandRate:EC2ResourceDetails' :: Maybe Text
hourlyOnDemandRate = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
eC2ResourceDetails_platform :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_platform :: (Maybe Text -> f (Maybe Text))
-> EC2ResourceDetails -> f EC2ResourceDetails
eC2ResourceDetails_platform = (EC2ResourceDetails -> Maybe Text)
-> (EC2ResourceDetails -> Maybe Text -> EC2ResourceDetails)
-> Lens
EC2ResourceDetails EC2ResourceDetails (Maybe Text) (Maybe Text)
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_vcpu :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_vcpu :: (Maybe Text -> f (Maybe Text))
-> EC2ResourceDetails -> f EC2ResourceDetails
eC2ResourceDetails_vcpu = (EC2ResourceDetails -> Maybe Text)
-> (EC2ResourceDetails -> Maybe Text -> EC2ResourceDetails)
-> Lens
EC2ResourceDetails EC2ResourceDetails (Maybe Text) (Maybe Text)
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)
eC2ResourceDetails_networkPerformance :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_networkPerformance :: (Maybe Text -> f (Maybe Text))
-> EC2ResourceDetails -> f EC2ResourceDetails
eC2ResourceDetails_networkPerformance = (EC2ResourceDetails -> Maybe Text)
-> (EC2ResourceDetails -> Maybe Text -> EC2ResourceDetails)
-> Lens
EC2ResourceDetails EC2ResourceDetails (Maybe Text) (Maybe Text)
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_memory :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_memory :: (Maybe Text -> f (Maybe Text))
-> EC2ResourceDetails -> f EC2ResourceDetails
eC2ResourceDetails_memory = (EC2ResourceDetails -> Maybe Text)
-> (EC2ResourceDetails -> Maybe Text -> EC2ResourceDetails)
-> Lens
EC2ResourceDetails EC2ResourceDetails (Maybe Text) (Maybe Text)
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_instanceType :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_instanceType :: (Maybe Text -> f (Maybe Text))
-> EC2ResourceDetails -> f EC2ResourceDetails
eC2ResourceDetails_instanceType = (EC2ResourceDetails -> Maybe Text)
-> (EC2ResourceDetails -> Maybe Text -> EC2ResourceDetails)
-> Lens
EC2ResourceDetails EC2ResourceDetails (Maybe Text) (Maybe Text)
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_storage :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_storage :: (Maybe Text -> f (Maybe Text))
-> EC2ResourceDetails -> f EC2ResourceDetails
eC2ResourceDetails_storage = (EC2ResourceDetails -> Maybe Text)
-> (EC2ResourceDetails -> Maybe Text -> EC2ResourceDetails)
-> Lens
EC2ResourceDetails EC2ResourceDetails (Maybe Text) (Maybe Text)
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_sku :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_sku :: (Maybe Text -> f (Maybe Text))
-> EC2ResourceDetails -> f EC2ResourceDetails
eC2ResourceDetails_sku = (EC2ResourceDetails -> Maybe Text)
-> (EC2ResourceDetails -> Maybe Text -> EC2ResourceDetails)
-> Lens
EC2ResourceDetails EC2ResourceDetails (Maybe Text) (Maybe Text)
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_region :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_region :: (Maybe Text -> f (Maybe Text))
-> EC2ResourceDetails -> f EC2ResourceDetails
eC2ResourceDetails_region = (EC2ResourceDetails -> Maybe Text)
-> (EC2ResourceDetails -> Maybe Text -> EC2ResourceDetails)
-> Lens
EC2ResourceDetails EC2ResourceDetails (Maybe Text) (Maybe Text)
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_hourlyOnDemandRate :: Lens.Lens' EC2ResourceDetails (Prelude.Maybe Prelude.Text)
eC2ResourceDetails_hourlyOnDemandRate :: (Maybe Text -> f (Maybe Text))
-> EC2ResourceDetails -> f EC2ResourceDetails
eC2ResourceDetails_hourlyOnDemandRate = (EC2ResourceDetails -> Maybe Text)
-> (EC2ResourceDetails -> Maybe Text -> EC2ResourceDetails)
-> Lens
EC2ResourceDetails EC2ResourceDetails (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON EC2ResourceDetails where
parseJSON :: Value -> Parser EC2ResourceDetails
parseJSON =
String
-> (Object -> Parser EC2ResourceDetails)
-> Value
-> Parser EC2ResourceDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.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'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails)
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
"Platform")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails)
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
"Vcpu")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails)
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
"NetworkPerformance")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails)
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
"Memory")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> EC2ResourceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> EC2ResourceDetails)
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
"InstanceType")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> EC2ResourceDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> EC2ResourceDetails)
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
"Storage")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> EC2ResourceDetails)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> EC2ResourceDetails)
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
"Sku")
Parser (Maybe Text -> Maybe Text -> EC2ResourceDetails)
-> Parser (Maybe Text) -> Parser (Maybe Text -> EC2ResourceDetails)
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
"Region")
Parser (Maybe Text -> EC2ResourceDetails)
-> Parser (Maybe Text) -> Parser EC2ResourceDetails
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
"HourlyOnDemandRate")
)
instance Prelude.Hashable EC2ResourceDetails
instance Prelude.NFData EC2ResourceDetails