{-# 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.EMR.Types.InstanceTypeConfig
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EMR.Types.InstanceTypeConfig where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EMR.Types.Configuration
import Amazonka.EMR.Types.EbsConfiguration
import qualified Amazonka.Prelude as Prelude

-- | An instance type configuration for each instance type in an instance
-- fleet, which determines the EC2 instances Amazon EMR attempts to
-- provision to fulfill On-Demand and Spot target capacities. When you use
-- an allocation strategy, you can include a maximum of 30 instance type
-- configurations for a fleet. For more information about how to use an
-- allocation strategy, see
-- <https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html Configure Instance Fleets>.
-- Without an allocation strategy, you may specify a maximum of five
-- instance type configurations for a fleet.
--
-- The instance fleet configuration is available only in Amazon EMR
-- versions 4.8.0 and later, excluding 5.0.x versions.
--
-- /See:/ 'newInstanceTypeConfig' smart constructor.
data InstanceTypeConfig = InstanceTypeConfig'
  { -- | The bid price for each EC2 Spot Instance type as defined by
    -- @InstanceType@. Expressed in USD. If neither @BidPrice@ nor
    -- @BidPriceAsPercentageOfOnDemandPrice@ is provided,
    -- @BidPriceAsPercentageOfOnDemandPrice@ defaults to 100%.
    InstanceTypeConfig -> Maybe Text
bidPrice :: Prelude.Maybe Prelude.Text,
    -- | The bid price, as a percentage of On-Demand price, for each EC2 Spot
    -- Instance as defined by @InstanceType@. Expressed as a number (for
    -- example, 20 specifies 20%). If neither @BidPrice@ nor
    -- @BidPriceAsPercentageOfOnDemandPrice@ is provided,
    -- @BidPriceAsPercentageOfOnDemandPrice@ defaults to 100%.
    InstanceTypeConfig -> Maybe Double
bidPriceAsPercentageOfOnDemandPrice :: Prelude.Maybe Prelude.Double,
    -- | A configuration classification that applies when provisioning cluster
    -- instances, which can include configurations for applications and
    -- software that run on the cluster.
    InstanceTypeConfig -> Maybe [Configuration]
configurations :: Prelude.Maybe [Configuration],
    -- | The custom AMI ID to use for the instance type.
    InstanceTypeConfig -> Maybe Text
customAmiId :: Prelude.Maybe Prelude.Text,
    -- | The configuration of Amazon Elastic Block Store (Amazon EBS) attached to
    -- each instance as defined by @InstanceType@.
    InstanceTypeConfig -> Maybe EbsConfiguration
ebsConfiguration :: Prelude.Maybe EbsConfiguration,
    -- | The number of units that a provisioned instance of this type provides
    -- toward fulfilling the target capacities defined in InstanceFleetConfig.
    -- This value is 1 for a master instance fleet, and must be 1 or greater
    -- for core and task instance fleets. Defaults to 1 if not specified.
    InstanceTypeConfig -> Maybe Natural
weightedCapacity :: Prelude.Maybe Prelude.Natural,
    -- | An EC2 instance type, such as @m3.xlarge@.
    InstanceTypeConfig -> Text
instanceType :: Prelude.Text
  }
  deriving (InstanceTypeConfig -> InstanceTypeConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: InstanceTypeConfig -> InstanceTypeConfig -> Bool
$c/= :: InstanceTypeConfig -> InstanceTypeConfig -> Bool
== :: InstanceTypeConfig -> InstanceTypeConfig -> Bool
$c== :: InstanceTypeConfig -> InstanceTypeConfig -> Bool
Prelude.Eq, ReadPrec [InstanceTypeConfig]
ReadPrec InstanceTypeConfig
Int -> ReadS InstanceTypeConfig
ReadS [InstanceTypeConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [InstanceTypeConfig]
$creadListPrec :: ReadPrec [InstanceTypeConfig]
readPrec :: ReadPrec InstanceTypeConfig
$creadPrec :: ReadPrec InstanceTypeConfig
readList :: ReadS [InstanceTypeConfig]
$creadList :: ReadS [InstanceTypeConfig]
readsPrec :: Int -> ReadS InstanceTypeConfig
$creadsPrec :: Int -> ReadS InstanceTypeConfig
Prelude.Read, Int -> InstanceTypeConfig -> ShowS
[InstanceTypeConfig] -> ShowS
InstanceTypeConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [InstanceTypeConfig] -> ShowS
$cshowList :: [InstanceTypeConfig] -> ShowS
show :: InstanceTypeConfig -> String
$cshow :: InstanceTypeConfig -> String
showsPrec :: Int -> InstanceTypeConfig -> ShowS
$cshowsPrec :: Int -> InstanceTypeConfig -> ShowS
Prelude.Show, forall x. Rep InstanceTypeConfig x -> InstanceTypeConfig
forall x. InstanceTypeConfig -> Rep InstanceTypeConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep InstanceTypeConfig x -> InstanceTypeConfig
$cfrom :: forall x. InstanceTypeConfig -> Rep InstanceTypeConfig x
Prelude.Generic)

-- |
-- Create a value of 'InstanceTypeConfig' 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:
--
-- 'bidPrice', 'instanceTypeConfig_bidPrice' - The bid price for each EC2 Spot Instance type as defined by
-- @InstanceType@. Expressed in USD. If neither @BidPrice@ nor
-- @BidPriceAsPercentageOfOnDemandPrice@ is provided,
-- @BidPriceAsPercentageOfOnDemandPrice@ defaults to 100%.
--
-- 'bidPriceAsPercentageOfOnDemandPrice', 'instanceTypeConfig_bidPriceAsPercentageOfOnDemandPrice' - The bid price, as a percentage of On-Demand price, for each EC2 Spot
-- Instance as defined by @InstanceType@. Expressed as a number (for
-- example, 20 specifies 20%). If neither @BidPrice@ nor
-- @BidPriceAsPercentageOfOnDemandPrice@ is provided,
-- @BidPriceAsPercentageOfOnDemandPrice@ defaults to 100%.
--
-- 'configurations', 'instanceTypeConfig_configurations' - A configuration classification that applies when provisioning cluster
-- instances, which can include configurations for applications and
-- software that run on the cluster.
--
-- 'customAmiId', 'instanceTypeConfig_customAmiId' - The custom AMI ID to use for the instance type.
--
-- 'ebsConfiguration', 'instanceTypeConfig_ebsConfiguration' - The configuration of Amazon Elastic Block Store (Amazon EBS) attached to
-- each instance as defined by @InstanceType@.
--
-- 'weightedCapacity', 'instanceTypeConfig_weightedCapacity' - The number of units that a provisioned instance of this type provides
-- toward fulfilling the target capacities defined in InstanceFleetConfig.
-- This value is 1 for a master instance fleet, and must be 1 or greater
-- for core and task instance fleets. Defaults to 1 if not specified.
--
-- 'instanceType', 'instanceTypeConfig_instanceType' - An EC2 instance type, such as @m3.xlarge@.
newInstanceTypeConfig ::
  -- | 'instanceType'
  Prelude.Text ->
  InstanceTypeConfig
newInstanceTypeConfig :: Text -> InstanceTypeConfig
newInstanceTypeConfig Text
pInstanceType_ =
  InstanceTypeConfig'
    { $sel:bidPrice:InstanceTypeConfig' :: Maybe Text
bidPrice = forall a. Maybe a
Prelude.Nothing,
      $sel:bidPriceAsPercentageOfOnDemandPrice:InstanceTypeConfig' :: Maybe Double
bidPriceAsPercentageOfOnDemandPrice =
        forall a. Maybe a
Prelude.Nothing,
      $sel:configurations:InstanceTypeConfig' :: Maybe [Configuration]
configurations = forall a. Maybe a
Prelude.Nothing,
      $sel:customAmiId:InstanceTypeConfig' :: Maybe Text
customAmiId = forall a. Maybe a
Prelude.Nothing,
      $sel:ebsConfiguration:InstanceTypeConfig' :: Maybe EbsConfiguration
ebsConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:weightedCapacity:InstanceTypeConfig' :: Maybe Natural
weightedCapacity = forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:InstanceTypeConfig' :: Text
instanceType = Text
pInstanceType_
    }

-- | The bid price for each EC2 Spot Instance type as defined by
-- @InstanceType@. Expressed in USD. If neither @BidPrice@ nor
-- @BidPriceAsPercentageOfOnDemandPrice@ is provided,
-- @BidPriceAsPercentageOfOnDemandPrice@ defaults to 100%.
instanceTypeConfig_bidPrice :: Lens.Lens' InstanceTypeConfig (Prelude.Maybe Prelude.Text)
instanceTypeConfig_bidPrice :: Lens' InstanceTypeConfig (Maybe Text)
instanceTypeConfig_bidPrice = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeConfig' {Maybe Text
bidPrice :: Maybe Text
$sel:bidPrice:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Text
bidPrice} -> Maybe Text
bidPrice) (\s :: InstanceTypeConfig
s@InstanceTypeConfig' {} Maybe Text
a -> InstanceTypeConfig
s {$sel:bidPrice:InstanceTypeConfig' :: Maybe Text
bidPrice = Maybe Text
a} :: InstanceTypeConfig)

-- | The bid price, as a percentage of On-Demand price, for each EC2 Spot
-- Instance as defined by @InstanceType@. Expressed as a number (for
-- example, 20 specifies 20%). If neither @BidPrice@ nor
-- @BidPriceAsPercentageOfOnDemandPrice@ is provided,
-- @BidPriceAsPercentageOfOnDemandPrice@ defaults to 100%.
instanceTypeConfig_bidPriceAsPercentageOfOnDemandPrice :: Lens.Lens' InstanceTypeConfig (Prelude.Maybe Prelude.Double)
instanceTypeConfig_bidPriceAsPercentageOfOnDemandPrice :: Lens' InstanceTypeConfig (Maybe Double)
instanceTypeConfig_bidPriceAsPercentageOfOnDemandPrice = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeConfig' {Maybe Double
bidPriceAsPercentageOfOnDemandPrice :: Maybe Double
$sel:bidPriceAsPercentageOfOnDemandPrice:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Double
bidPriceAsPercentageOfOnDemandPrice} -> Maybe Double
bidPriceAsPercentageOfOnDemandPrice) (\s :: InstanceTypeConfig
s@InstanceTypeConfig' {} Maybe Double
a -> InstanceTypeConfig
s {$sel:bidPriceAsPercentageOfOnDemandPrice:InstanceTypeConfig' :: Maybe Double
bidPriceAsPercentageOfOnDemandPrice = Maybe Double
a} :: InstanceTypeConfig)

-- | A configuration classification that applies when provisioning cluster
-- instances, which can include configurations for applications and
-- software that run on the cluster.
instanceTypeConfig_configurations :: Lens.Lens' InstanceTypeConfig (Prelude.Maybe [Configuration])
instanceTypeConfig_configurations :: Lens' InstanceTypeConfig (Maybe [Configuration])
instanceTypeConfig_configurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeConfig' {Maybe [Configuration]
configurations :: Maybe [Configuration]
$sel:configurations:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe [Configuration]
configurations} -> Maybe [Configuration]
configurations) (\s :: InstanceTypeConfig
s@InstanceTypeConfig' {} Maybe [Configuration]
a -> InstanceTypeConfig
s {$sel:configurations:InstanceTypeConfig' :: Maybe [Configuration]
configurations = Maybe [Configuration]
a} :: InstanceTypeConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The custom AMI ID to use for the instance type.
instanceTypeConfig_customAmiId :: Lens.Lens' InstanceTypeConfig (Prelude.Maybe Prelude.Text)
instanceTypeConfig_customAmiId :: Lens' InstanceTypeConfig (Maybe Text)
instanceTypeConfig_customAmiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeConfig' {Maybe Text
customAmiId :: Maybe Text
$sel:customAmiId:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Text
customAmiId} -> Maybe Text
customAmiId) (\s :: InstanceTypeConfig
s@InstanceTypeConfig' {} Maybe Text
a -> InstanceTypeConfig
s {$sel:customAmiId:InstanceTypeConfig' :: Maybe Text
customAmiId = Maybe Text
a} :: InstanceTypeConfig)

-- | The configuration of Amazon Elastic Block Store (Amazon EBS) attached to
-- each instance as defined by @InstanceType@.
instanceTypeConfig_ebsConfiguration :: Lens.Lens' InstanceTypeConfig (Prelude.Maybe EbsConfiguration)
instanceTypeConfig_ebsConfiguration :: Lens' InstanceTypeConfig (Maybe EbsConfiguration)
instanceTypeConfig_ebsConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeConfig' {Maybe EbsConfiguration
ebsConfiguration :: Maybe EbsConfiguration
$sel:ebsConfiguration:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe EbsConfiguration
ebsConfiguration} -> Maybe EbsConfiguration
ebsConfiguration) (\s :: InstanceTypeConfig
s@InstanceTypeConfig' {} Maybe EbsConfiguration
a -> InstanceTypeConfig
s {$sel:ebsConfiguration:InstanceTypeConfig' :: Maybe EbsConfiguration
ebsConfiguration = Maybe EbsConfiguration
a} :: InstanceTypeConfig)

-- | The number of units that a provisioned instance of this type provides
-- toward fulfilling the target capacities defined in InstanceFleetConfig.
-- This value is 1 for a master instance fleet, and must be 1 or greater
-- for core and task instance fleets. Defaults to 1 if not specified.
instanceTypeConfig_weightedCapacity :: Lens.Lens' InstanceTypeConfig (Prelude.Maybe Prelude.Natural)
instanceTypeConfig_weightedCapacity :: Lens' InstanceTypeConfig (Maybe Natural)
instanceTypeConfig_weightedCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeConfig' {Maybe Natural
weightedCapacity :: Maybe Natural
$sel:weightedCapacity:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Natural
weightedCapacity} -> Maybe Natural
weightedCapacity) (\s :: InstanceTypeConfig
s@InstanceTypeConfig' {} Maybe Natural
a -> InstanceTypeConfig
s {$sel:weightedCapacity:InstanceTypeConfig' :: Maybe Natural
weightedCapacity = Maybe Natural
a} :: InstanceTypeConfig)

-- | An EC2 instance type, such as @m3.xlarge@.
instanceTypeConfig_instanceType :: Lens.Lens' InstanceTypeConfig Prelude.Text
instanceTypeConfig_instanceType :: Lens' InstanceTypeConfig Text
instanceTypeConfig_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\InstanceTypeConfig' {Text
instanceType :: Text
$sel:instanceType:InstanceTypeConfig' :: InstanceTypeConfig -> Text
instanceType} -> Text
instanceType) (\s :: InstanceTypeConfig
s@InstanceTypeConfig' {} Text
a -> InstanceTypeConfig
s {$sel:instanceType:InstanceTypeConfig' :: Text
instanceType = Text
a} :: InstanceTypeConfig)

instance Prelude.Hashable InstanceTypeConfig where
  hashWithSalt :: Int -> InstanceTypeConfig -> Int
hashWithSalt Int
_salt InstanceTypeConfig' {Maybe Double
Maybe Natural
Maybe [Configuration]
Maybe Text
Maybe EbsConfiguration
Text
instanceType :: Text
weightedCapacity :: Maybe Natural
ebsConfiguration :: Maybe EbsConfiguration
customAmiId :: Maybe Text
configurations :: Maybe [Configuration]
bidPriceAsPercentageOfOnDemandPrice :: Maybe Double
bidPrice :: Maybe Text
$sel:instanceType:InstanceTypeConfig' :: InstanceTypeConfig -> Text
$sel:weightedCapacity:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Natural
$sel:ebsConfiguration:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe EbsConfiguration
$sel:customAmiId:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Text
$sel:configurations:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe [Configuration]
$sel:bidPriceAsPercentageOfOnDemandPrice:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Double
$sel:bidPrice:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
bidPrice
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
bidPriceAsPercentageOfOnDemandPrice
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Configuration]
configurations
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customAmiId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EbsConfiguration
ebsConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
weightedCapacity
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceType

instance Prelude.NFData InstanceTypeConfig where
  rnf :: InstanceTypeConfig -> ()
rnf InstanceTypeConfig' {Maybe Double
Maybe Natural
Maybe [Configuration]
Maybe Text
Maybe EbsConfiguration
Text
instanceType :: Text
weightedCapacity :: Maybe Natural
ebsConfiguration :: Maybe EbsConfiguration
customAmiId :: Maybe Text
configurations :: Maybe [Configuration]
bidPriceAsPercentageOfOnDemandPrice :: Maybe Double
bidPrice :: Maybe Text
$sel:instanceType:InstanceTypeConfig' :: InstanceTypeConfig -> Text
$sel:weightedCapacity:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Natural
$sel:ebsConfiguration:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe EbsConfiguration
$sel:customAmiId:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Text
$sel:configurations:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe [Configuration]
$sel:bidPriceAsPercentageOfOnDemandPrice:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Double
$sel:bidPrice:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
bidPrice
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
bidPriceAsPercentageOfOnDemandPrice
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Configuration]
configurations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customAmiId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EbsConfiguration
ebsConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
weightedCapacity
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
instanceType

instance Data.ToJSON InstanceTypeConfig where
  toJSON :: InstanceTypeConfig -> Value
toJSON InstanceTypeConfig' {Maybe Double
Maybe Natural
Maybe [Configuration]
Maybe Text
Maybe EbsConfiguration
Text
instanceType :: Text
weightedCapacity :: Maybe Natural
ebsConfiguration :: Maybe EbsConfiguration
customAmiId :: Maybe Text
configurations :: Maybe [Configuration]
bidPriceAsPercentageOfOnDemandPrice :: Maybe Double
bidPrice :: Maybe Text
$sel:instanceType:InstanceTypeConfig' :: InstanceTypeConfig -> Text
$sel:weightedCapacity:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Natural
$sel:ebsConfiguration:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe EbsConfiguration
$sel:customAmiId:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Text
$sel:configurations:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe [Configuration]
$sel:bidPriceAsPercentageOfOnDemandPrice:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Double
$sel:bidPrice:InstanceTypeConfig' :: InstanceTypeConfig -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"BidPrice" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
bidPrice,
            (Key
"BidPriceAsPercentageOfOnDemandPrice" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
bidPriceAsPercentageOfOnDemandPrice,
            (Key
"Configurations" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Configuration]
configurations,
            (Key
"CustomAmiId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customAmiId,
            (Key
"EbsConfiguration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EbsConfiguration
ebsConfiguration,
            (Key
"WeightedCapacity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
weightedCapacity,
            forall a. a -> Maybe a
Prelude.Just (Key
"InstanceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
instanceType)
          ]
      )