{-# 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.EC2.Types.ReservationFleetInstanceSpecification where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import Amazonka.EC2.Types.CapacityReservationInstancePlatform
import Amazonka.EC2.Types.InstanceType
import qualified Amazonka.Prelude as Prelude
data ReservationFleetInstanceSpecification = ReservationFleetInstanceSpecification'
{
ReservationFleetInstanceSpecification -> Maybe Text
availabilityZone :: Prelude.Maybe Prelude.Text,
ReservationFleetInstanceSpecification -> Maybe Text
availabilityZoneId :: Prelude.Maybe Prelude.Text,
ReservationFleetInstanceSpecification -> Maybe Bool
ebsOptimized :: Prelude.Maybe Prelude.Bool,
ReservationFleetInstanceSpecification
-> Maybe CapacityReservationInstancePlatform
instancePlatform :: Prelude.Maybe CapacityReservationInstancePlatform,
ReservationFleetInstanceSpecification -> Maybe InstanceType
instanceType :: Prelude.Maybe InstanceType,
ReservationFleetInstanceSpecification -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
ReservationFleetInstanceSpecification -> Maybe Double
weight :: Prelude.Maybe Prelude.Double
}
deriving (ReservationFleetInstanceSpecification
-> ReservationFleetInstanceSpecification -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ReservationFleetInstanceSpecification
-> ReservationFleetInstanceSpecification -> Bool
$c/= :: ReservationFleetInstanceSpecification
-> ReservationFleetInstanceSpecification -> Bool
== :: ReservationFleetInstanceSpecification
-> ReservationFleetInstanceSpecification -> Bool
$c== :: ReservationFleetInstanceSpecification
-> ReservationFleetInstanceSpecification -> Bool
Prelude.Eq, ReadPrec [ReservationFleetInstanceSpecification]
ReadPrec ReservationFleetInstanceSpecification
Int -> ReadS ReservationFleetInstanceSpecification
ReadS [ReservationFleetInstanceSpecification]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ReservationFleetInstanceSpecification]
$creadListPrec :: ReadPrec [ReservationFleetInstanceSpecification]
readPrec :: ReadPrec ReservationFleetInstanceSpecification
$creadPrec :: ReadPrec ReservationFleetInstanceSpecification
readList :: ReadS [ReservationFleetInstanceSpecification]
$creadList :: ReadS [ReservationFleetInstanceSpecification]
readsPrec :: Int -> ReadS ReservationFleetInstanceSpecification
$creadsPrec :: Int -> ReadS ReservationFleetInstanceSpecification
Prelude.Read, Int -> ReservationFleetInstanceSpecification -> ShowS
[ReservationFleetInstanceSpecification] -> ShowS
ReservationFleetInstanceSpecification -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ReservationFleetInstanceSpecification] -> ShowS
$cshowList :: [ReservationFleetInstanceSpecification] -> ShowS
show :: ReservationFleetInstanceSpecification -> String
$cshow :: ReservationFleetInstanceSpecification -> String
showsPrec :: Int -> ReservationFleetInstanceSpecification -> ShowS
$cshowsPrec :: Int -> ReservationFleetInstanceSpecification -> ShowS
Prelude.Show, forall x.
Rep ReservationFleetInstanceSpecification x
-> ReservationFleetInstanceSpecification
forall x.
ReservationFleetInstanceSpecification
-> Rep ReservationFleetInstanceSpecification x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ReservationFleetInstanceSpecification x
-> ReservationFleetInstanceSpecification
$cfrom :: forall x.
ReservationFleetInstanceSpecification
-> Rep ReservationFleetInstanceSpecification x
Prelude.Generic)
newReservationFleetInstanceSpecification ::
ReservationFleetInstanceSpecification
newReservationFleetInstanceSpecification :: ReservationFleetInstanceSpecification
newReservationFleetInstanceSpecification =
ReservationFleetInstanceSpecification'
{ $sel:availabilityZone:ReservationFleetInstanceSpecification' :: Maybe Text
availabilityZone =
forall a. Maybe a
Prelude.Nothing,
$sel:availabilityZoneId:ReservationFleetInstanceSpecification' :: Maybe Text
availabilityZoneId = forall a. Maybe a
Prelude.Nothing,
$sel:ebsOptimized:ReservationFleetInstanceSpecification' :: Maybe Bool
ebsOptimized = forall a. Maybe a
Prelude.Nothing,
$sel:instancePlatform:ReservationFleetInstanceSpecification' :: Maybe CapacityReservationInstancePlatform
instancePlatform = forall a. Maybe a
Prelude.Nothing,
$sel:instanceType:ReservationFleetInstanceSpecification' :: Maybe InstanceType
instanceType = forall a. Maybe a
Prelude.Nothing,
$sel:priority:ReservationFleetInstanceSpecification' :: Maybe Natural
priority = forall a. Maybe a
Prelude.Nothing,
$sel:weight:ReservationFleetInstanceSpecification' :: Maybe Double
weight = forall a. Maybe a
Prelude.Nothing
}
reservationFleetInstanceSpecification_availabilityZone :: Lens.Lens' ReservationFleetInstanceSpecification (Prelude.Maybe Prelude.Text)
reservationFleetInstanceSpecification_availabilityZone :: Lens' ReservationFleetInstanceSpecification (Maybe Text)
reservationFleetInstanceSpecification_availabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationFleetInstanceSpecification' {Maybe Text
availabilityZone :: Maybe Text
$sel:availabilityZone:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Text
availabilityZone} -> Maybe Text
availabilityZone) (\s :: ReservationFleetInstanceSpecification
s@ReservationFleetInstanceSpecification' {} Maybe Text
a -> ReservationFleetInstanceSpecification
s {$sel:availabilityZone:ReservationFleetInstanceSpecification' :: Maybe Text
availabilityZone = Maybe Text
a} :: ReservationFleetInstanceSpecification)
reservationFleetInstanceSpecification_availabilityZoneId :: Lens.Lens' ReservationFleetInstanceSpecification (Prelude.Maybe Prelude.Text)
reservationFleetInstanceSpecification_availabilityZoneId :: Lens' ReservationFleetInstanceSpecification (Maybe Text)
reservationFleetInstanceSpecification_availabilityZoneId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationFleetInstanceSpecification' {Maybe Text
availabilityZoneId :: Maybe Text
$sel:availabilityZoneId:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Text
availabilityZoneId} -> Maybe Text
availabilityZoneId) (\s :: ReservationFleetInstanceSpecification
s@ReservationFleetInstanceSpecification' {} Maybe Text
a -> ReservationFleetInstanceSpecification
s {$sel:availabilityZoneId:ReservationFleetInstanceSpecification' :: Maybe Text
availabilityZoneId = Maybe Text
a} :: ReservationFleetInstanceSpecification)
reservationFleetInstanceSpecification_ebsOptimized :: Lens.Lens' ReservationFleetInstanceSpecification (Prelude.Maybe Prelude.Bool)
reservationFleetInstanceSpecification_ebsOptimized :: Lens' ReservationFleetInstanceSpecification (Maybe Bool)
reservationFleetInstanceSpecification_ebsOptimized = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationFleetInstanceSpecification' {Maybe Bool
ebsOptimized :: Maybe Bool
$sel:ebsOptimized:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Bool
ebsOptimized} -> Maybe Bool
ebsOptimized) (\s :: ReservationFleetInstanceSpecification
s@ReservationFleetInstanceSpecification' {} Maybe Bool
a -> ReservationFleetInstanceSpecification
s {$sel:ebsOptimized:ReservationFleetInstanceSpecification' :: Maybe Bool
ebsOptimized = Maybe Bool
a} :: ReservationFleetInstanceSpecification)
reservationFleetInstanceSpecification_instancePlatform :: Lens.Lens' ReservationFleetInstanceSpecification (Prelude.Maybe CapacityReservationInstancePlatform)
reservationFleetInstanceSpecification_instancePlatform :: Lens'
ReservationFleetInstanceSpecification
(Maybe CapacityReservationInstancePlatform)
reservationFleetInstanceSpecification_instancePlatform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationFleetInstanceSpecification' {Maybe CapacityReservationInstancePlatform
instancePlatform :: Maybe CapacityReservationInstancePlatform
$sel:instancePlatform:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification
-> Maybe CapacityReservationInstancePlatform
instancePlatform} -> Maybe CapacityReservationInstancePlatform
instancePlatform) (\s :: ReservationFleetInstanceSpecification
s@ReservationFleetInstanceSpecification' {} Maybe CapacityReservationInstancePlatform
a -> ReservationFleetInstanceSpecification
s {$sel:instancePlatform:ReservationFleetInstanceSpecification' :: Maybe CapacityReservationInstancePlatform
instancePlatform = Maybe CapacityReservationInstancePlatform
a} :: ReservationFleetInstanceSpecification)
reservationFleetInstanceSpecification_instanceType :: Lens.Lens' ReservationFleetInstanceSpecification (Prelude.Maybe InstanceType)
reservationFleetInstanceSpecification_instanceType :: Lens' ReservationFleetInstanceSpecification (Maybe InstanceType)
reservationFleetInstanceSpecification_instanceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationFleetInstanceSpecification' {Maybe InstanceType
instanceType :: Maybe InstanceType
$sel:instanceType:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe InstanceType
instanceType} -> Maybe InstanceType
instanceType) (\s :: ReservationFleetInstanceSpecification
s@ReservationFleetInstanceSpecification' {} Maybe InstanceType
a -> ReservationFleetInstanceSpecification
s {$sel:instanceType:ReservationFleetInstanceSpecification' :: Maybe InstanceType
instanceType = Maybe InstanceType
a} :: ReservationFleetInstanceSpecification)
reservationFleetInstanceSpecification_priority :: Lens.Lens' ReservationFleetInstanceSpecification (Prelude.Maybe Prelude.Natural)
reservationFleetInstanceSpecification_priority :: Lens' ReservationFleetInstanceSpecification (Maybe Natural)
reservationFleetInstanceSpecification_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationFleetInstanceSpecification' {Maybe Natural
priority :: Maybe Natural
$sel:priority:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: ReservationFleetInstanceSpecification
s@ReservationFleetInstanceSpecification' {} Maybe Natural
a -> ReservationFleetInstanceSpecification
s {$sel:priority:ReservationFleetInstanceSpecification' :: Maybe Natural
priority = Maybe Natural
a} :: ReservationFleetInstanceSpecification)
reservationFleetInstanceSpecification_weight :: Lens.Lens' ReservationFleetInstanceSpecification (Prelude.Maybe Prelude.Double)
reservationFleetInstanceSpecification_weight :: Lens' ReservationFleetInstanceSpecification (Maybe Double)
reservationFleetInstanceSpecification_weight = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ReservationFleetInstanceSpecification' {Maybe Double
weight :: Maybe Double
$sel:weight:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Double
weight} -> Maybe Double
weight) (\s :: ReservationFleetInstanceSpecification
s@ReservationFleetInstanceSpecification' {} Maybe Double
a -> ReservationFleetInstanceSpecification
s {$sel:weight:ReservationFleetInstanceSpecification' :: Maybe Double
weight = Maybe Double
a} :: ReservationFleetInstanceSpecification)
instance
Prelude.Hashable
ReservationFleetInstanceSpecification
where
hashWithSalt :: Int -> ReservationFleetInstanceSpecification -> Int
hashWithSalt
Int
_salt
ReservationFleetInstanceSpecification' {Maybe Bool
Maybe Double
Maybe Natural
Maybe Text
Maybe CapacityReservationInstancePlatform
Maybe InstanceType
weight :: Maybe Double
priority :: Maybe Natural
instanceType :: Maybe InstanceType
instancePlatform :: Maybe CapacityReservationInstancePlatform
ebsOptimized :: Maybe Bool
availabilityZoneId :: Maybe Text
availabilityZone :: Maybe Text
$sel:weight:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Double
$sel:priority:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Natural
$sel:instanceType:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe InstanceType
$sel:instancePlatform:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification
-> Maybe CapacityReservationInstancePlatform
$sel:ebsOptimized:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Bool
$sel:availabilityZoneId:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Text
$sel:availabilityZone:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
availabilityZone
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
availabilityZoneId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
ebsOptimized
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CapacityReservationInstancePlatform
instancePlatform
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceType
instanceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
priority
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
weight
instance
Prelude.NFData
ReservationFleetInstanceSpecification
where
rnf :: ReservationFleetInstanceSpecification -> ()
rnf ReservationFleetInstanceSpecification' {Maybe Bool
Maybe Double
Maybe Natural
Maybe Text
Maybe CapacityReservationInstancePlatform
Maybe InstanceType
weight :: Maybe Double
priority :: Maybe Natural
instanceType :: Maybe InstanceType
instancePlatform :: Maybe CapacityReservationInstancePlatform
ebsOptimized :: Maybe Bool
availabilityZoneId :: Maybe Text
availabilityZone :: Maybe Text
$sel:weight:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Double
$sel:priority:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Natural
$sel:instanceType:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe InstanceType
$sel:instancePlatform:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification
-> Maybe CapacityReservationInstancePlatform
$sel:ebsOptimized:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Bool
$sel:availabilityZoneId:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Text
$sel:availabilityZone:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
availabilityZone
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
availabilityZoneId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
ebsOptimized
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CapacityReservationInstancePlatform
instancePlatform
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceType
instanceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
priority
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
weight
instance
Data.ToQuery
ReservationFleetInstanceSpecification
where
toQuery :: ReservationFleetInstanceSpecification -> QueryString
toQuery ReservationFleetInstanceSpecification' {Maybe Bool
Maybe Double
Maybe Natural
Maybe Text
Maybe CapacityReservationInstancePlatform
Maybe InstanceType
weight :: Maybe Double
priority :: Maybe Natural
instanceType :: Maybe InstanceType
instancePlatform :: Maybe CapacityReservationInstancePlatform
ebsOptimized :: Maybe Bool
availabilityZoneId :: Maybe Text
availabilityZone :: Maybe Text
$sel:weight:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Double
$sel:priority:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Natural
$sel:instanceType:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe InstanceType
$sel:instancePlatform:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification
-> Maybe CapacityReservationInstancePlatform
$sel:ebsOptimized:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Bool
$sel:availabilityZoneId:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Text
$sel:availabilityZone:ReservationFleetInstanceSpecification' :: ReservationFleetInstanceSpecification -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"AvailabilityZone" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
availabilityZone,
ByteString
"AvailabilityZoneId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
availabilityZoneId,
ByteString
"EbsOptimized" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
ebsOptimized,
ByteString
"InstancePlatform" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe CapacityReservationInstancePlatform
instancePlatform,
ByteString
"InstanceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe InstanceType
instanceType,
ByteString
"Priority" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
priority,
ByteString
"Weight" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Double
weight
]