{-# 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.Batch.Types.ComputeResource where
import Amazonka.Batch.Types.CRAllocationStrategy
import Amazonka.Batch.Types.CRType
import Amazonka.Batch.Types.Ec2Configuration
import Amazonka.Batch.Types.LaunchTemplateSpecification
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ComputeResource = ComputeResource'
{
ComputeResource -> Maybe [Text]
securityGroupIds :: Prelude.Maybe [Prelude.Text],
ComputeResource -> Maybe [Text]
instanceTypes :: Prelude.Maybe [Prelude.Text],
ComputeResource -> Maybe Text
instanceRole :: Prelude.Maybe Prelude.Text,
ComputeResource -> Maybe Text
ec2KeyPair :: Prelude.Maybe Prelude.Text,
ComputeResource -> Maybe Int
minvCpus :: Prelude.Maybe Prelude.Int,
ComputeResource -> Maybe [Ec2Configuration]
ec2Configuration :: Prelude.Maybe [Ec2Configuration],
ComputeResource -> Maybe Int
bidPercentage :: Prelude.Maybe Prelude.Int,
ComputeResource -> Maybe Text
spotIamFleetRole :: Prelude.Maybe Prelude.Text,
ComputeResource -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text,
ComputeResource -> Maybe LaunchTemplateSpecification
launchTemplate :: Prelude.Maybe LaunchTemplateSpecification,
ComputeResource -> Maybe Int
desiredvCpus :: Prelude.Maybe Prelude.Int,
ComputeResource -> Maybe CRAllocationStrategy
allocationStrategy :: Prelude.Maybe CRAllocationStrategy,
ComputeResource -> Maybe Text
placementGroup :: Prelude.Maybe Prelude.Text,
ComputeResource -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ComputeResource -> CRType
type' :: CRType,
ComputeResource -> Int
maxvCpus :: Prelude.Int,
ComputeResource -> [Text]
subnets :: [Prelude.Text]
}
deriving (ComputeResource -> ComputeResource -> Bool
(ComputeResource -> ComputeResource -> Bool)
-> (ComputeResource -> ComputeResource -> Bool)
-> Eq ComputeResource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ComputeResource -> ComputeResource -> Bool
$c/= :: ComputeResource -> ComputeResource -> Bool
== :: ComputeResource -> ComputeResource -> Bool
$c== :: ComputeResource -> ComputeResource -> Bool
Prelude.Eq, ReadPrec [ComputeResource]
ReadPrec ComputeResource
Int -> ReadS ComputeResource
ReadS [ComputeResource]
(Int -> ReadS ComputeResource)
-> ReadS [ComputeResource]
-> ReadPrec ComputeResource
-> ReadPrec [ComputeResource]
-> Read ComputeResource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ComputeResource]
$creadListPrec :: ReadPrec [ComputeResource]
readPrec :: ReadPrec ComputeResource
$creadPrec :: ReadPrec ComputeResource
readList :: ReadS [ComputeResource]
$creadList :: ReadS [ComputeResource]
readsPrec :: Int -> ReadS ComputeResource
$creadsPrec :: Int -> ReadS ComputeResource
Prelude.Read, Int -> ComputeResource -> ShowS
[ComputeResource] -> ShowS
ComputeResource -> String
(Int -> ComputeResource -> ShowS)
-> (ComputeResource -> String)
-> ([ComputeResource] -> ShowS)
-> Show ComputeResource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ComputeResource] -> ShowS
$cshowList :: [ComputeResource] -> ShowS
show :: ComputeResource -> String
$cshow :: ComputeResource -> String
showsPrec :: Int -> ComputeResource -> ShowS
$cshowsPrec :: Int -> ComputeResource -> ShowS
Prelude.Show, (forall x. ComputeResource -> Rep ComputeResource x)
-> (forall x. Rep ComputeResource x -> ComputeResource)
-> Generic ComputeResource
forall x. Rep ComputeResource x -> ComputeResource
forall x. ComputeResource -> Rep ComputeResource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ComputeResource x -> ComputeResource
$cfrom :: forall x. ComputeResource -> Rep ComputeResource x
Prelude.Generic)
newComputeResource ::
CRType ->
Prelude.Int ->
ComputeResource
newComputeResource :: CRType -> Int -> ComputeResource
newComputeResource CRType
pType_ Int
pMaxvCpus_ =
ComputeResource' :: Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource
ComputeResource'
{ $sel:securityGroupIds:ComputeResource' :: Maybe [Text]
securityGroupIds =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:instanceTypes:ComputeResource' :: Maybe [Text]
instanceTypes = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:instanceRole:ComputeResource' :: Maybe Text
instanceRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ec2KeyPair:ComputeResource' :: Maybe Text
ec2KeyPair = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:minvCpus:ComputeResource' :: Maybe Int
minvCpus = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:ec2Configuration:ComputeResource' :: Maybe [Ec2Configuration]
ec2Configuration = Maybe [Ec2Configuration]
forall a. Maybe a
Prelude.Nothing,
$sel:bidPercentage:ComputeResource' :: Maybe Int
bidPercentage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:spotIamFleetRole:ComputeResource' :: Maybe Text
spotIamFleetRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageId:ComputeResource' :: Maybe Text
imageId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:launchTemplate:ComputeResource' :: Maybe LaunchTemplateSpecification
launchTemplate = Maybe LaunchTemplateSpecification
forall a. Maybe a
Prelude.Nothing,
$sel:desiredvCpus:ComputeResource' :: Maybe Int
desiredvCpus = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:allocationStrategy:ComputeResource' :: Maybe CRAllocationStrategy
allocationStrategy = Maybe CRAllocationStrategy
forall a. Maybe a
Prelude.Nothing,
$sel:placementGroup:ComputeResource' :: Maybe Text
placementGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ComputeResource' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:type':ComputeResource' :: CRType
type' = CRType
pType_,
$sel:maxvCpus:ComputeResource' :: Int
maxvCpus = Int
pMaxvCpus_,
$sel:subnets:ComputeResource' :: [Text]
subnets = [Text]
forall a. Monoid a => a
Prelude.mempty
}
computeResource_securityGroupIds :: Lens.Lens' ComputeResource (Prelude.Maybe [Prelude.Text])
computeResource_securityGroupIds :: (Maybe [Text] -> f (Maybe [Text]))
-> ComputeResource -> f ComputeResource
computeResource_securityGroupIds = (ComputeResource -> Maybe [Text])
-> (ComputeResource -> Maybe [Text] -> ComputeResource)
-> Lens
ComputeResource ComputeResource (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:securityGroupIds:ComputeResource' :: ComputeResource -> Maybe [Text]
securityGroupIds} -> Maybe [Text]
securityGroupIds) (\s :: ComputeResource
s@ComputeResource' {} Maybe [Text]
a -> ComputeResource
s {$sel:securityGroupIds:ComputeResource' :: Maybe [Text]
securityGroupIds = Maybe [Text]
a} :: ComputeResource) ((Maybe [Text] -> f (Maybe [Text]))
-> ComputeResource -> f ComputeResource)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ComputeResource
-> f ComputeResource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
computeResource_instanceTypes :: Lens.Lens' ComputeResource (Prelude.Maybe [Prelude.Text])
computeResource_instanceTypes :: (Maybe [Text] -> f (Maybe [Text]))
-> ComputeResource -> f ComputeResource
computeResource_instanceTypes = (ComputeResource -> Maybe [Text])
-> (ComputeResource -> Maybe [Text] -> ComputeResource)
-> Lens
ComputeResource ComputeResource (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe [Text]
instanceTypes :: Maybe [Text]
$sel:instanceTypes:ComputeResource' :: ComputeResource -> Maybe [Text]
instanceTypes} -> Maybe [Text]
instanceTypes) (\s :: ComputeResource
s@ComputeResource' {} Maybe [Text]
a -> ComputeResource
s {$sel:instanceTypes:ComputeResource' :: Maybe [Text]
instanceTypes = Maybe [Text]
a} :: ComputeResource) ((Maybe [Text] -> f (Maybe [Text]))
-> ComputeResource -> f ComputeResource)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ComputeResource
-> f ComputeResource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
computeResource_instanceRole :: Lens.Lens' ComputeResource (Prelude.Maybe Prelude.Text)
computeResource_instanceRole :: (Maybe Text -> f (Maybe Text))
-> ComputeResource -> f ComputeResource
computeResource_instanceRole = (ComputeResource -> Maybe Text)
-> (ComputeResource -> Maybe Text -> ComputeResource)
-> Lens ComputeResource ComputeResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe Text
instanceRole :: Maybe Text
$sel:instanceRole:ComputeResource' :: ComputeResource -> Maybe Text
instanceRole} -> Maybe Text
instanceRole) (\s :: ComputeResource
s@ComputeResource' {} Maybe Text
a -> ComputeResource
s {$sel:instanceRole:ComputeResource' :: Maybe Text
instanceRole = Maybe Text
a} :: ComputeResource)
computeResource_ec2KeyPair :: Lens.Lens' ComputeResource (Prelude.Maybe Prelude.Text)
computeResource_ec2KeyPair :: (Maybe Text -> f (Maybe Text))
-> ComputeResource -> f ComputeResource
computeResource_ec2KeyPair = (ComputeResource -> Maybe Text)
-> (ComputeResource -> Maybe Text -> ComputeResource)
-> Lens ComputeResource ComputeResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe Text
ec2KeyPair :: Maybe Text
$sel:ec2KeyPair:ComputeResource' :: ComputeResource -> Maybe Text
ec2KeyPair} -> Maybe Text
ec2KeyPair) (\s :: ComputeResource
s@ComputeResource' {} Maybe Text
a -> ComputeResource
s {$sel:ec2KeyPair:ComputeResource' :: Maybe Text
ec2KeyPair = Maybe Text
a} :: ComputeResource)
computeResource_minvCpus :: Lens.Lens' ComputeResource (Prelude.Maybe Prelude.Int)
computeResource_minvCpus :: (Maybe Int -> f (Maybe Int))
-> ComputeResource -> f ComputeResource
computeResource_minvCpus = (ComputeResource -> Maybe Int)
-> (ComputeResource -> Maybe Int -> ComputeResource)
-> Lens ComputeResource ComputeResource (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe Int
minvCpus :: Maybe Int
$sel:minvCpus:ComputeResource' :: ComputeResource -> Maybe Int
minvCpus} -> Maybe Int
minvCpus) (\s :: ComputeResource
s@ComputeResource' {} Maybe Int
a -> ComputeResource
s {$sel:minvCpus:ComputeResource' :: Maybe Int
minvCpus = Maybe Int
a} :: ComputeResource)
computeResource_ec2Configuration :: Lens.Lens' ComputeResource (Prelude.Maybe [Ec2Configuration])
computeResource_ec2Configuration :: (Maybe [Ec2Configuration] -> f (Maybe [Ec2Configuration]))
-> ComputeResource -> f ComputeResource
computeResource_ec2Configuration = (ComputeResource -> Maybe [Ec2Configuration])
-> (ComputeResource -> Maybe [Ec2Configuration] -> ComputeResource)
-> Lens
ComputeResource
ComputeResource
(Maybe [Ec2Configuration])
(Maybe [Ec2Configuration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe [Ec2Configuration]
ec2Configuration :: Maybe [Ec2Configuration]
$sel:ec2Configuration:ComputeResource' :: ComputeResource -> Maybe [Ec2Configuration]
ec2Configuration} -> Maybe [Ec2Configuration]
ec2Configuration) (\s :: ComputeResource
s@ComputeResource' {} Maybe [Ec2Configuration]
a -> ComputeResource
s {$sel:ec2Configuration:ComputeResource' :: Maybe [Ec2Configuration]
ec2Configuration = Maybe [Ec2Configuration]
a} :: ComputeResource) ((Maybe [Ec2Configuration] -> f (Maybe [Ec2Configuration]))
-> ComputeResource -> f ComputeResource)
-> ((Maybe [Ec2Configuration] -> f (Maybe [Ec2Configuration]))
-> Maybe [Ec2Configuration] -> f (Maybe [Ec2Configuration]))
-> (Maybe [Ec2Configuration] -> f (Maybe [Ec2Configuration]))
-> ComputeResource
-> f ComputeResource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[Ec2Configuration]
[Ec2Configuration]
[Ec2Configuration]
[Ec2Configuration]
-> Iso
(Maybe [Ec2Configuration])
(Maybe [Ec2Configuration])
(Maybe [Ec2Configuration])
(Maybe [Ec2Configuration])
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 AnIso
[Ec2Configuration]
[Ec2Configuration]
[Ec2Configuration]
[Ec2Configuration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
computeResource_bidPercentage :: Lens.Lens' ComputeResource (Prelude.Maybe Prelude.Int)
computeResource_bidPercentage :: (Maybe Int -> f (Maybe Int))
-> ComputeResource -> f ComputeResource
computeResource_bidPercentage = (ComputeResource -> Maybe Int)
-> (ComputeResource -> Maybe Int -> ComputeResource)
-> Lens ComputeResource ComputeResource (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe Int
bidPercentage :: Maybe Int
$sel:bidPercentage:ComputeResource' :: ComputeResource -> Maybe Int
bidPercentage} -> Maybe Int
bidPercentage) (\s :: ComputeResource
s@ComputeResource' {} Maybe Int
a -> ComputeResource
s {$sel:bidPercentage:ComputeResource' :: Maybe Int
bidPercentage = Maybe Int
a} :: ComputeResource)
computeResource_spotIamFleetRole :: Lens.Lens' ComputeResource (Prelude.Maybe Prelude.Text)
computeResource_spotIamFleetRole :: (Maybe Text -> f (Maybe Text))
-> ComputeResource -> f ComputeResource
computeResource_spotIamFleetRole = (ComputeResource -> Maybe Text)
-> (ComputeResource -> Maybe Text -> ComputeResource)
-> Lens ComputeResource ComputeResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe Text
spotIamFleetRole :: Maybe Text
$sel:spotIamFleetRole:ComputeResource' :: ComputeResource -> Maybe Text
spotIamFleetRole} -> Maybe Text
spotIamFleetRole) (\s :: ComputeResource
s@ComputeResource' {} Maybe Text
a -> ComputeResource
s {$sel:spotIamFleetRole:ComputeResource' :: Maybe Text
spotIamFleetRole = Maybe Text
a} :: ComputeResource)
computeResource_imageId :: Lens.Lens' ComputeResource (Prelude.Maybe Prelude.Text)
computeResource_imageId :: (Maybe Text -> f (Maybe Text))
-> ComputeResource -> f ComputeResource
computeResource_imageId = (ComputeResource -> Maybe Text)
-> (ComputeResource -> Maybe Text -> ComputeResource)
-> Lens ComputeResource ComputeResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe Text
imageId :: Maybe Text
$sel:imageId:ComputeResource' :: ComputeResource -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: ComputeResource
s@ComputeResource' {} Maybe Text
a -> ComputeResource
s {$sel:imageId:ComputeResource' :: Maybe Text
imageId = Maybe Text
a} :: ComputeResource)
computeResource_launchTemplate :: Lens.Lens' ComputeResource (Prelude.Maybe LaunchTemplateSpecification)
computeResource_launchTemplate :: (Maybe LaunchTemplateSpecification
-> f (Maybe LaunchTemplateSpecification))
-> ComputeResource -> f ComputeResource
computeResource_launchTemplate = (ComputeResource -> Maybe LaunchTemplateSpecification)
-> (ComputeResource
-> Maybe LaunchTemplateSpecification -> ComputeResource)
-> Lens
ComputeResource
ComputeResource
(Maybe LaunchTemplateSpecification)
(Maybe LaunchTemplateSpecification)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe LaunchTemplateSpecification
launchTemplate :: Maybe LaunchTemplateSpecification
$sel:launchTemplate:ComputeResource' :: ComputeResource -> Maybe LaunchTemplateSpecification
launchTemplate} -> Maybe LaunchTemplateSpecification
launchTemplate) (\s :: ComputeResource
s@ComputeResource' {} Maybe LaunchTemplateSpecification
a -> ComputeResource
s {$sel:launchTemplate:ComputeResource' :: Maybe LaunchTemplateSpecification
launchTemplate = Maybe LaunchTemplateSpecification
a} :: ComputeResource)
computeResource_desiredvCpus :: Lens.Lens' ComputeResource (Prelude.Maybe Prelude.Int)
computeResource_desiredvCpus :: (Maybe Int -> f (Maybe Int))
-> ComputeResource -> f ComputeResource
computeResource_desiredvCpus = (ComputeResource -> Maybe Int)
-> (ComputeResource -> Maybe Int -> ComputeResource)
-> Lens ComputeResource ComputeResource (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe Int
desiredvCpus :: Maybe Int
$sel:desiredvCpus:ComputeResource' :: ComputeResource -> Maybe Int
desiredvCpus} -> Maybe Int
desiredvCpus) (\s :: ComputeResource
s@ComputeResource' {} Maybe Int
a -> ComputeResource
s {$sel:desiredvCpus:ComputeResource' :: Maybe Int
desiredvCpus = Maybe Int
a} :: ComputeResource)
computeResource_allocationStrategy :: Lens.Lens' ComputeResource (Prelude.Maybe CRAllocationStrategy)
computeResource_allocationStrategy :: (Maybe CRAllocationStrategy -> f (Maybe CRAllocationStrategy))
-> ComputeResource -> f ComputeResource
computeResource_allocationStrategy = (ComputeResource -> Maybe CRAllocationStrategy)
-> (ComputeResource
-> Maybe CRAllocationStrategy -> ComputeResource)
-> Lens
ComputeResource
ComputeResource
(Maybe CRAllocationStrategy)
(Maybe CRAllocationStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe CRAllocationStrategy
allocationStrategy :: Maybe CRAllocationStrategy
$sel:allocationStrategy:ComputeResource' :: ComputeResource -> Maybe CRAllocationStrategy
allocationStrategy} -> Maybe CRAllocationStrategy
allocationStrategy) (\s :: ComputeResource
s@ComputeResource' {} Maybe CRAllocationStrategy
a -> ComputeResource
s {$sel:allocationStrategy:ComputeResource' :: Maybe CRAllocationStrategy
allocationStrategy = Maybe CRAllocationStrategy
a} :: ComputeResource)
computeResource_placementGroup :: Lens.Lens' ComputeResource (Prelude.Maybe Prelude.Text)
computeResource_placementGroup :: (Maybe Text -> f (Maybe Text))
-> ComputeResource -> f ComputeResource
computeResource_placementGroup = (ComputeResource -> Maybe Text)
-> (ComputeResource -> Maybe Text -> ComputeResource)
-> Lens ComputeResource ComputeResource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe Text
placementGroup :: Maybe Text
$sel:placementGroup:ComputeResource' :: ComputeResource -> Maybe Text
placementGroup} -> Maybe Text
placementGroup) (\s :: ComputeResource
s@ComputeResource' {} Maybe Text
a -> ComputeResource
s {$sel:placementGroup:ComputeResource' :: Maybe Text
placementGroup = Maybe Text
a} :: ComputeResource)
computeResource_tags :: Lens.Lens' ComputeResource (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
computeResource_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ComputeResource -> f ComputeResource
computeResource_tags = (ComputeResource -> Maybe (HashMap Text Text))
-> (ComputeResource
-> Maybe (HashMap Text Text) -> ComputeResource)
-> Lens
ComputeResource
ComputeResource
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ComputeResource' :: ComputeResource -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ComputeResource
s@ComputeResource' {} Maybe (HashMap Text Text)
a -> ComputeResource
s {$sel:tags:ComputeResource' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ComputeResource) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ComputeResource -> f ComputeResource)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ComputeResource
-> f ComputeResource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
computeResource_type :: Lens.Lens' ComputeResource CRType
computeResource_type :: (CRType -> f CRType) -> ComputeResource -> f ComputeResource
computeResource_type = (ComputeResource -> CRType)
-> (ComputeResource -> CRType -> ComputeResource)
-> Lens ComputeResource ComputeResource CRType CRType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {CRType
type' :: CRType
$sel:type':ComputeResource' :: ComputeResource -> CRType
type'} -> CRType
type') (\s :: ComputeResource
s@ComputeResource' {} CRType
a -> ComputeResource
s {$sel:type':ComputeResource' :: CRType
type' = CRType
a} :: ComputeResource)
computeResource_maxvCpus :: Lens.Lens' ComputeResource Prelude.Int
computeResource_maxvCpus :: (Int -> f Int) -> ComputeResource -> f ComputeResource
computeResource_maxvCpus = (ComputeResource -> Int)
-> (ComputeResource -> Int -> ComputeResource)
-> Lens ComputeResource ComputeResource Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {Int
maxvCpus :: Int
$sel:maxvCpus:ComputeResource' :: ComputeResource -> Int
maxvCpus} -> Int
maxvCpus) (\s :: ComputeResource
s@ComputeResource' {} Int
a -> ComputeResource
s {$sel:maxvCpus:ComputeResource' :: Int
maxvCpus = Int
a} :: ComputeResource)
computeResource_subnets :: Lens.Lens' ComputeResource [Prelude.Text]
computeResource_subnets :: ([Text] -> f [Text]) -> ComputeResource -> f ComputeResource
computeResource_subnets = (ComputeResource -> [Text])
-> (ComputeResource -> [Text] -> ComputeResource)
-> Lens ComputeResource ComputeResource [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ComputeResource' {[Text]
subnets :: [Text]
$sel:subnets:ComputeResource' :: ComputeResource -> [Text]
subnets} -> [Text]
subnets) (\s :: ComputeResource
s@ComputeResource' {} [Text]
a -> ComputeResource
s {$sel:subnets:ComputeResource' :: [Text]
subnets = [Text]
a} :: ComputeResource) (([Text] -> f [Text]) -> ComputeResource -> f ComputeResource)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ComputeResource
-> f ComputeResource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON ComputeResource where
parseJSON :: Value -> Parser ComputeResource
parseJSON =
String
-> (Object -> Parser ComputeResource)
-> Value
-> Parser ComputeResource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ComputeResource"
( \Object
x ->
Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource
ComputeResource'
(Maybe [Text]
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe [Text])
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"securityGroupIds"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"instanceTypes" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
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
"instanceRole")
Parser
(Maybe Text
-> Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
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
"ec2KeyPair")
Parser
(Maybe Int
-> Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe Int)
-> Parser
(Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"minvCpus")
Parser
(Maybe [Ec2Configuration]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe [Ec2Configuration])
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Ec2Configuration]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ec2Configuration"
Parser (Maybe (Maybe [Ec2Configuration]))
-> Maybe [Ec2Configuration] -> Parser (Maybe [Ec2Configuration])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Ec2Configuration]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"bidPercentage")
Parser
(Maybe Text
-> Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
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
"spotIamFleetRole")
Parser
(Maybe Text
-> Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe Text)
-> Parser
(Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
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
"imageId")
Parser
(Maybe LaunchTemplateSpecification
-> Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe LaunchTemplateSpecification)
-> Parser
(Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LaunchTemplateSpecification)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"launchTemplate")
Parser
(Maybe Int
-> Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe Int)
-> Parser
(Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"desiredvCpus")
Parser
(Maybe CRAllocationStrategy
-> Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe CRAllocationStrategy)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CRAllocationStrategy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"allocationStrategy")
Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> CRType
-> Int
-> [Text]
-> ComputeResource)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> CRType -> Int -> [Text] -> ComputeResource)
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
"placementGroup")
Parser
(Maybe (HashMap Text Text)
-> CRType -> Int -> [Text] -> ComputeResource)
-> Parser (Maybe (HashMap Text Text))
-> Parser (CRType -> Int -> [Text] -> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (CRType -> Int -> [Text] -> ComputeResource)
-> Parser CRType -> Parser (Int -> [Text] -> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser CRType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"type")
Parser (Int -> [Text] -> ComputeResource)
-> Parser Int -> Parser ([Text] -> ComputeResource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"maxvCpus")
Parser ([Text] -> ComputeResource)
-> Parser [Text] -> Parser ComputeResource
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
"subnets" Parser (Maybe [Text]) -> [Text] -> Parser [Text]
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= [Text]
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable ComputeResource
instance Prelude.NFData ComputeResource
instance Core.ToJSON ComputeResource where
toJSON :: ComputeResource -> Value
toJSON ComputeResource' {Int
[Text]
Maybe Int
Maybe [Text]
Maybe [Ec2Configuration]
Maybe Text
Maybe (HashMap Text Text)
Maybe CRAllocationStrategy
Maybe LaunchTemplateSpecification
CRType
subnets :: [Text]
maxvCpus :: Int
type' :: CRType
tags :: Maybe (HashMap Text Text)
placementGroup :: Maybe Text
allocationStrategy :: Maybe CRAllocationStrategy
desiredvCpus :: Maybe Int
launchTemplate :: Maybe LaunchTemplateSpecification
imageId :: Maybe Text
spotIamFleetRole :: Maybe Text
bidPercentage :: Maybe Int
ec2Configuration :: Maybe [Ec2Configuration]
minvCpus :: Maybe Int
ec2KeyPair :: Maybe Text
instanceRole :: Maybe Text
instanceTypes :: Maybe [Text]
securityGroupIds :: Maybe [Text]
$sel:subnets:ComputeResource' :: ComputeResource -> [Text]
$sel:maxvCpus:ComputeResource' :: ComputeResource -> Int
$sel:type':ComputeResource' :: ComputeResource -> CRType
$sel:tags:ComputeResource' :: ComputeResource -> Maybe (HashMap Text Text)
$sel:placementGroup:ComputeResource' :: ComputeResource -> Maybe Text
$sel:allocationStrategy:ComputeResource' :: ComputeResource -> Maybe CRAllocationStrategy
$sel:desiredvCpus:ComputeResource' :: ComputeResource -> Maybe Int
$sel:launchTemplate:ComputeResource' :: ComputeResource -> Maybe LaunchTemplateSpecification
$sel:imageId:ComputeResource' :: ComputeResource -> Maybe Text
$sel:spotIamFleetRole:ComputeResource' :: ComputeResource -> Maybe Text
$sel:bidPercentage:ComputeResource' :: ComputeResource -> Maybe Int
$sel:ec2Configuration:ComputeResource' :: ComputeResource -> Maybe [Ec2Configuration]
$sel:minvCpus:ComputeResource' :: ComputeResource -> Maybe Int
$sel:ec2KeyPair:ComputeResource' :: ComputeResource -> Maybe Text
$sel:instanceRole:ComputeResource' :: ComputeResource -> Maybe Text
$sel:instanceTypes:ComputeResource' :: ComputeResource -> Maybe [Text]
$sel:securityGroupIds:ComputeResource' :: ComputeResource -> Maybe [Text]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"securityGroupIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
securityGroupIds,
(Text
"instanceTypes" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
instanceTypes,
(Text
"instanceRole" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
instanceRole,
(Text
"ec2KeyPair" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ec2KeyPair,
(Text
"minvCpus" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
minvCpus,
(Text
"ec2Configuration" Text -> [Ec2Configuration] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([Ec2Configuration] -> Pair)
-> Maybe [Ec2Configuration] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Ec2Configuration]
ec2Configuration,
(Text
"bidPercentage" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
bidPercentage,
(Text
"spotIamFleetRole" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
spotIamFleetRole,
(Text
"imageId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageId,
(Text
"launchTemplate" Text -> LaunchTemplateSpecification -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(LaunchTemplateSpecification -> Pair)
-> Maybe LaunchTemplateSpecification -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe LaunchTemplateSpecification
launchTemplate,
(Text
"desiredvCpus" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
desiredvCpus,
(Text
"allocationStrategy" Text -> CRAllocationStrategy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(CRAllocationStrategy -> Pair)
-> Maybe CRAllocationStrategy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CRAllocationStrategy
allocationStrategy,
(Text
"placementGroup" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
placementGroup,
(Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"type" Text -> CRType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= CRType
type'),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"maxvCpus" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Int
maxvCpus),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"subnets" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
subnets)
]
)