{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.CostExplorer.Types.EC2ResourceDetails
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.CostExplorer.Types.EC2ResourceDetails where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Details on the Amazon EC2 Resource.
--
-- /See:/ 'newEC2ResourceDetails' smart constructor.
data EC2ResourceDetails = EC2ResourceDetails'
  { -- | The platform of the Amazon Web Services instance. The platform is the
    -- specific combination of operating system, license model, and software on
    -- an instance.
    EC2ResourceDetails -> Maybe Text
platform :: Prelude.Maybe Prelude.Text,
    -- | The number of VCPU cores in the Amazon Web Services instance type.
    EC2ResourceDetails -> Maybe Text
vcpu :: Prelude.Maybe Prelude.Text,
    -- | The network performance capacity of the Amazon Web Services instance.
    EC2ResourceDetails -> Maybe Text
networkPerformance :: Prelude.Maybe Prelude.Text,
    -- | The memory capacity of the Amazon Web Services instance.
    EC2ResourceDetails -> Maybe Text
memory :: Prelude.Maybe Prelude.Text,
    -- | The type of Amazon Web Services instance.
    EC2ResourceDetails -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
    -- | The disk storage of the Amazon Web Services instance. This doesn\'t
    -- include EBS storage.
    EC2ResourceDetails -> Maybe Text
storage :: Prelude.Maybe Prelude.Text,
    -- | The SKU of the product.
    EC2ResourceDetails -> Maybe Text
sku :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services Region of the instance.
    EC2ResourceDetails -> Maybe Text
region :: Prelude.Maybe Prelude.Text,
    -- | The hourly public On-Demand rate for the instance type.
    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)

-- |
-- Create a value of 'EC2ResourceDetails' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'platform', 'eC2ResourceDetails_platform' - The platform of the Amazon Web Services instance. The platform is the
-- specific combination of operating system, license model, and software on
-- an instance.
--
-- 'vcpu', 'eC2ResourceDetails_vcpu' - The number of VCPU cores in the Amazon Web Services instance type.
--
-- 'networkPerformance', 'eC2ResourceDetails_networkPerformance' - The network performance capacity of the Amazon Web Services instance.
--
-- 'memory', 'eC2ResourceDetails_memory' - The memory capacity of the Amazon Web Services instance.
--
-- 'instanceType', 'eC2ResourceDetails_instanceType' - The type of Amazon Web Services instance.
--
-- 'storage', 'eC2ResourceDetails_storage' - The disk storage of the Amazon Web Services instance. This doesn\'t
-- include EBS storage.
--
-- 'sku', 'eC2ResourceDetails_sku' - The SKU of the product.
--
-- 'region', 'eC2ResourceDetails_region' - The Amazon Web Services Region of the instance.
--
-- 'hourlyOnDemandRate', 'eC2ResourceDetails_hourlyOnDemandRate' - The hourly public On-Demand rate for the instance type.
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
    }

-- | The platform of the Amazon Web Services instance. The platform is the
-- specific combination of operating system, license model, and software on
-- an instance.
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)

-- | The number of VCPU cores in the Amazon Web Services instance type.
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)

-- | The network performance capacity of the Amazon Web Services instance.
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)

-- | The memory capacity of the Amazon Web Services instance.
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)

-- | The type of Amazon Web Services instance.
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)

-- | The disk storage of the Amazon Web Services instance. This doesn\'t
-- include EBS storage.
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)

-- | The SKU of the product.
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)

-- | The Amazon Web Services Region of the instance.
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)

-- | The hourly public On-Demand rate for the instance type.
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