{-# 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.TargetCapacitySpecificationRequest 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.DefaultTargetCapacityType
import Amazonka.EC2.Types.TargetCapacityUnitType
import qualified Amazonka.Prelude as Prelude
data TargetCapacitySpecificationRequest = TargetCapacitySpecificationRequest'
{
TargetCapacitySpecificationRequest
-> Maybe DefaultTargetCapacityType
defaultTargetCapacityType :: Prelude.Maybe DefaultTargetCapacityType,
TargetCapacitySpecificationRequest -> Maybe Int
onDemandTargetCapacity :: Prelude.Maybe Prelude.Int,
TargetCapacitySpecificationRequest -> Maybe Int
spotTargetCapacity :: Prelude.Maybe Prelude.Int,
TargetCapacitySpecificationRequest -> Maybe TargetCapacityUnitType
targetCapacityUnitType :: Prelude.Maybe TargetCapacityUnitType,
TargetCapacitySpecificationRequest -> Int
totalTargetCapacity :: Prelude.Int
}
deriving (TargetCapacitySpecificationRequest
-> TargetCapacitySpecificationRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TargetCapacitySpecificationRequest
-> TargetCapacitySpecificationRequest -> Bool
$c/= :: TargetCapacitySpecificationRequest
-> TargetCapacitySpecificationRequest -> Bool
== :: TargetCapacitySpecificationRequest
-> TargetCapacitySpecificationRequest -> Bool
$c== :: TargetCapacitySpecificationRequest
-> TargetCapacitySpecificationRequest -> Bool
Prelude.Eq, ReadPrec [TargetCapacitySpecificationRequest]
ReadPrec TargetCapacitySpecificationRequest
Int -> ReadS TargetCapacitySpecificationRequest
ReadS [TargetCapacitySpecificationRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TargetCapacitySpecificationRequest]
$creadListPrec :: ReadPrec [TargetCapacitySpecificationRequest]
readPrec :: ReadPrec TargetCapacitySpecificationRequest
$creadPrec :: ReadPrec TargetCapacitySpecificationRequest
readList :: ReadS [TargetCapacitySpecificationRequest]
$creadList :: ReadS [TargetCapacitySpecificationRequest]
readsPrec :: Int -> ReadS TargetCapacitySpecificationRequest
$creadsPrec :: Int -> ReadS TargetCapacitySpecificationRequest
Prelude.Read, Int -> TargetCapacitySpecificationRequest -> ShowS
[TargetCapacitySpecificationRequest] -> ShowS
TargetCapacitySpecificationRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TargetCapacitySpecificationRequest] -> ShowS
$cshowList :: [TargetCapacitySpecificationRequest] -> ShowS
show :: TargetCapacitySpecificationRequest -> String
$cshow :: TargetCapacitySpecificationRequest -> String
showsPrec :: Int -> TargetCapacitySpecificationRequest -> ShowS
$cshowsPrec :: Int -> TargetCapacitySpecificationRequest -> ShowS
Prelude.Show, forall x.
Rep TargetCapacitySpecificationRequest x
-> TargetCapacitySpecificationRequest
forall x.
TargetCapacitySpecificationRequest
-> Rep TargetCapacitySpecificationRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TargetCapacitySpecificationRequest x
-> TargetCapacitySpecificationRequest
$cfrom :: forall x.
TargetCapacitySpecificationRequest
-> Rep TargetCapacitySpecificationRequest x
Prelude.Generic)
newTargetCapacitySpecificationRequest ::
Prelude.Int ->
TargetCapacitySpecificationRequest
newTargetCapacitySpecificationRequest :: Int -> TargetCapacitySpecificationRequest
newTargetCapacitySpecificationRequest
Int
pTotalTargetCapacity_ =
TargetCapacitySpecificationRequest'
{ $sel:defaultTargetCapacityType:TargetCapacitySpecificationRequest' :: Maybe DefaultTargetCapacityType
defaultTargetCapacityType =
forall a. Maybe a
Prelude.Nothing,
$sel:onDemandTargetCapacity:TargetCapacitySpecificationRequest' :: Maybe Int
onDemandTargetCapacity =
forall a. Maybe a
Prelude.Nothing,
$sel:spotTargetCapacity:TargetCapacitySpecificationRequest' :: Maybe Int
spotTargetCapacity = forall a. Maybe a
Prelude.Nothing,
$sel:targetCapacityUnitType:TargetCapacitySpecificationRequest' :: Maybe TargetCapacityUnitType
targetCapacityUnitType =
forall a. Maybe a
Prelude.Nothing,
$sel:totalTargetCapacity:TargetCapacitySpecificationRequest' :: Int
totalTargetCapacity =
Int
pTotalTargetCapacity_
}
targetCapacitySpecificationRequest_defaultTargetCapacityType :: Lens.Lens' TargetCapacitySpecificationRequest (Prelude.Maybe DefaultTargetCapacityType)
targetCapacitySpecificationRequest_defaultTargetCapacityType :: Lens'
TargetCapacitySpecificationRequest
(Maybe DefaultTargetCapacityType)
targetCapacitySpecificationRequest_defaultTargetCapacityType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TargetCapacitySpecificationRequest' {Maybe DefaultTargetCapacityType
defaultTargetCapacityType :: Maybe DefaultTargetCapacityType
$sel:defaultTargetCapacityType:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest
-> Maybe DefaultTargetCapacityType
defaultTargetCapacityType} -> Maybe DefaultTargetCapacityType
defaultTargetCapacityType) (\s :: TargetCapacitySpecificationRequest
s@TargetCapacitySpecificationRequest' {} Maybe DefaultTargetCapacityType
a -> TargetCapacitySpecificationRequest
s {$sel:defaultTargetCapacityType:TargetCapacitySpecificationRequest' :: Maybe DefaultTargetCapacityType
defaultTargetCapacityType = Maybe DefaultTargetCapacityType
a} :: TargetCapacitySpecificationRequest)
targetCapacitySpecificationRequest_onDemandTargetCapacity :: Lens.Lens' TargetCapacitySpecificationRequest (Prelude.Maybe Prelude.Int)
targetCapacitySpecificationRequest_onDemandTargetCapacity :: Lens' TargetCapacitySpecificationRequest (Maybe Int)
targetCapacitySpecificationRequest_onDemandTargetCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TargetCapacitySpecificationRequest' {Maybe Int
onDemandTargetCapacity :: Maybe Int
$sel:onDemandTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe Int
onDemandTargetCapacity} -> Maybe Int
onDemandTargetCapacity) (\s :: TargetCapacitySpecificationRequest
s@TargetCapacitySpecificationRequest' {} Maybe Int
a -> TargetCapacitySpecificationRequest
s {$sel:onDemandTargetCapacity:TargetCapacitySpecificationRequest' :: Maybe Int
onDemandTargetCapacity = Maybe Int
a} :: TargetCapacitySpecificationRequest)
targetCapacitySpecificationRequest_spotTargetCapacity :: Lens.Lens' TargetCapacitySpecificationRequest (Prelude.Maybe Prelude.Int)
targetCapacitySpecificationRequest_spotTargetCapacity :: Lens' TargetCapacitySpecificationRequest (Maybe Int)
targetCapacitySpecificationRequest_spotTargetCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TargetCapacitySpecificationRequest' {Maybe Int
spotTargetCapacity :: Maybe Int
$sel:spotTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe Int
spotTargetCapacity} -> Maybe Int
spotTargetCapacity) (\s :: TargetCapacitySpecificationRequest
s@TargetCapacitySpecificationRequest' {} Maybe Int
a -> TargetCapacitySpecificationRequest
s {$sel:spotTargetCapacity:TargetCapacitySpecificationRequest' :: Maybe Int
spotTargetCapacity = Maybe Int
a} :: TargetCapacitySpecificationRequest)
targetCapacitySpecificationRequest_targetCapacityUnitType :: Lens.Lens' TargetCapacitySpecificationRequest (Prelude.Maybe TargetCapacityUnitType)
targetCapacitySpecificationRequest_targetCapacityUnitType :: Lens'
TargetCapacitySpecificationRequest (Maybe TargetCapacityUnitType)
targetCapacitySpecificationRequest_targetCapacityUnitType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TargetCapacitySpecificationRequest' {Maybe TargetCapacityUnitType
targetCapacityUnitType :: Maybe TargetCapacityUnitType
$sel:targetCapacityUnitType:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe TargetCapacityUnitType
targetCapacityUnitType} -> Maybe TargetCapacityUnitType
targetCapacityUnitType) (\s :: TargetCapacitySpecificationRequest
s@TargetCapacitySpecificationRequest' {} Maybe TargetCapacityUnitType
a -> TargetCapacitySpecificationRequest
s {$sel:targetCapacityUnitType:TargetCapacitySpecificationRequest' :: Maybe TargetCapacityUnitType
targetCapacityUnitType = Maybe TargetCapacityUnitType
a} :: TargetCapacitySpecificationRequest)
targetCapacitySpecificationRequest_totalTargetCapacity :: Lens.Lens' TargetCapacitySpecificationRequest Prelude.Int
targetCapacitySpecificationRequest_totalTargetCapacity :: Lens' TargetCapacitySpecificationRequest Int
targetCapacitySpecificationRequest_totalTargetCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TargetCapacitySpecificationRequest' {Int
totalTargetCapacity :: Int
$sel:totalTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Int
totalTargetCapacity} -> Int
totalTargetCapacity) (\s :: TargetCapacitySpecificationRequest
s@TargetCapacitySpecificationRequest' {} Int
a -> TargetCapacitySpecificationRequest
s {$sel:totalTargetCapacity:TargetCapacitySpecificationRequest' :: Int
totalTargetCapacity = Int
a} :: TargetCapacitySpecificationRequest)
instance
Prelude.Hashable
TargetCapacitySpecificationRequest
where
hashWithSalt :: Int -> TargetCapacitySpecificationRequest -> Int
hashWithSalt
Int
_salt
TargetCapacitySpecificationRequest' {Int
Maybe Int
Maybe DefaultTargetCapacityType
Maybe TargetCapacityUnitType
totalTargetCapacity :: Int
targetCapacityUnitType :: Maybe TargetCapacityUnitType
spotTargetCapacity :: Maybe Int
onDemandTargetCapacity :: Maybe Int
defaultTargetCapacityType :: Maybe DefaultTargetCapacityType
$sel:totalTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Int
$sel:targetCapacityUnitType:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe TargetCapacityUnitType
$sel:spotTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe Int
$sel:onDemandTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe Int
$sel:defaultTargetCapacityType:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest
-> Maybe DefaultTargetCapacityType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DefaultTargetCapacityType
defaultTargetCapacityType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
onDemandTargetCapacity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
spotTargetCapacity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TargetCapacityUnitType
targetCapacityUnitType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
totalTargetCapacity
instance
Prelude.NFData
TargetCapacitySpecificationRequest
where
rnf :: TargetCapacitySpecificationRequest -> ()
rnf TargetCapacitySpecificationRequest' {Int
Maybe Int
Maybe DefaultTargetCapacityType
Maybe TargetCapacityUnitType
totalTargetCapacity :: Int
targetCapacityUnitType :: Maybe TargetCapacityUnitType
spotTargetCapacity :: Maybe Int
onDemandTargetCapacity :: Maybe Int
defaultTargetCapacityType :: Maybe DefaultTargetCapacityType
$sel:totalTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Int
$sel:targetCapacityUnitType:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe TargetCapacityUnitType
$sel:spotTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe Int
$sel:onDemandTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe Int
$sel:defaultTargetCapacityType:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest
-> Maybe DefaultTargetCapacityType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe DefaultTargetCapacityType
defaultTargetCapacityType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
onDemandTargetCapacity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
spotTargetCapacity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TargetCapacityUnitType
targetCapacityUnitType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
totalTargetCapacity
instance
Data.ToQuery
TargetCapacitySpecificationRequest
where
toQuery :: TargetCapacitySpecificationRequest -> QueryString
toQuery TargetCapacitySpecificationRequest' {Int
Maybe Int
Maybe DefaultTargetCapacityType
Maybe TargetCapacityUnitType
totalTargetCapacity :: Int
targetCapacityUnitType :: Maybe TargetCapacityUnitType
spotTargetCapacity :: Maybe Int
onDemandTargetCapacity :: Maybe Int
defaultTargetCapacityType :: Maybe DefaultTargetCapacityType
$sel:totalTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Int
$sel:targetCapacityUnitType:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe TargetCapacityUnitType
$sel:spotTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe Int
$sel:onDemandTargetCapacity:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest -> Maybe Int
$sel:defaultTargetCapacityType:TargetCapacitySpecificationRequest' :: TargetCapacitySpecificationRequest
-> Maybe DefaultTargetCapacityType
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"DefaultTargetCapacityType"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe DefaultTargetCapacityType
defaultTargetCapacityType,
ByteString
"OnDemandTargetCapacity"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
onDemandTargetCapacity,
ByteString
"SpotTargetCapacity" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
spotTargetCapacity,
ByteString
"TargetCapacityUnitType"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe TargetCapacityUnitType
targetCapacityUnitType,
ByteString
"TotalTargetCapacity" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Int
totalTargetCapacity
]