{-# 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.EMRServerless.Types.WorkerTypeSpecificationInput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EMRServerless.Types.ImageConfigurationInput
import qualified Amazonka.Prelude as Prelude
data WorkerTypeSpecificationInput = WorkerTypeSpecificationInput'
{
WorkerTypeSpecificationInput -> Maybe ImageConfigurationInput
imageConfiguration :: Prelude.Maybe ImageConfigurationInput
}
deriving (WorkerTypeSpecificationInput
-> WorkerTypeSpecificationInput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkerTypeSpecificationInput
-> WorkerTypeSpecificationInput -> Bool
$c/= :: WorkerTypeSpecificationInput
-> WorkerTypeSpecificationInput -> Bool
== :: WorkerTypeSpecificationInput
-> WorkerTypeSpecificationInput -> Bool
$c== :: WorkerTypeSpecificationInput
-> WorkerTypeSpecificationInput -> Bool
Prelude.Eq, ReadPrec [WorkerTypeSpecificationInput]
ReadPrec WorkerTypeSpecificationInput
Int -> ReadS WorkerTypeSpecificationInput
ReadS [WorkerTypeSpecificationInput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkerTypeSpecificationInput]
$creadListPrec :: ReadPrec [WorkerTypeSpecificationInput]
readPrec :: ReadPrec WorkerTypeSpecificationInput
$creadPrec :: ReadPrec WorkerTypeSpecificationInput
readList :: ReadS [WorkerTypeSpecificationInput]
$creadList :: ReadS [WorkerTypeSpecificationInput]
readsPrec :: Int -> ReadS WorkerTypeSpecificationInput
$creadsPrec :: Int -> ReadS WorkerTypeSpecificationInput
Prelude.Read, Int -> WorkerTypeSpecificationInput -> ShowS
[WorkerTypeSpecificationInput] -> ShowS
WorkerTypeSpecificationInput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkerTypeSpecificationInput] -> ShowS
$cshowList :: [WorkerTypeSpecificationInput] -> ShowS
show :: WorkerTypeSpecificationInput -> String
$cshow :: WorkerTypeSpecificationInput -> String
showsPrec :: Int -> WorkerTypeSpecificationInput -> ShowS
$cshowsPrec :: Int -> WorkerTypeSpecificationInput -> ShowS
Prelude.Show, forall x.
Rep WorkerTypeSpecificationInput x -> WorkerTypeSpecificationInput
forall x.
WorkerTypeSpecificationInput -> Rep WorkerTypeSpecificationInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkerTypeSpecificationInput x -> WorkerTypeSpecificationInput
$cfrom :: forall x.
WorkerTypeSpecificationInput -> Rep WorkerTypeSpecificationInput x
Prelude.Generic)
newWorkerTypeSpecificationInput ::
WorkerTypeSpecificationInput
newWorkerTypeSpecificationInput :: WorkerTypeSpecificationInput
newWorkerTypeSpecificationInput =
WorkerTypeSpecificationInput'
{ $sel:imageConfiguration:WorkerTypeSpecificationInput' :: Maybe ImageConfigurationInput
imageConfiguration =
forall a. Maybe a
Prelude.Nothing
}
workerTypeSpecificationInput_imageConfiguration :: Lens.Lens' WorkerTypeSpecificationInput (Prelude.Maybe ImageConfigurationInput)
workerTypeSpecificationInput_imageConfiguration :: Lens' WorkerTypeSpecificationInput (Maybe ImageConfigurationInput)
workerTypeSpecificationInput_imageConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkerTypeSpecificationInput' {Maybe ImageConfigurationInput
imageConfiguration :: Maybe ImageConfigurationInput
$sel:imageConfiguration:WorkerTypeSpecificationInput' :: WorkerTypeSpecificationInput -> Maybe ImageConfigurationInput
imageConfiguration} -> Maybe ImageConfigurationInput
imageConfiguration) (\s :: WorkerTypeSpecificationInput
s@WorkerTypeSpecificationInput' {} Maybe ImageConfigurationInput
a -> WorkerTypeSpecificationInput
s {$sel:imageConfiguration:WorkerTypeSpecificationInput' :: Maybe ImageConfigurationInput
imageConfiguration = Maybe ImageConfigurationInput
a} :: WorkerTypeSpecificationInput)
instance
Prelude.Hashable
WorkerTypeSpecificationInput
where
hashWithSalt :: Int -> WorkerTypeSpecificationInput -> Int
hashWithSalt Int
_salt WorkerTypeSpecificationInput' {Maybe ImageConfigurationInput
imageConfiguration :: Maybe ImageConfigurationInput
$sel:imageConfiguration:WorkerTypeSpecificationInput' :: WorkerTypeSpecificationInput -> Maybe ImageConfigurationInput
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ImageConfigurationInput
imageConfiguration
instance Prelude.NFData WorkerTypeSpecificationInput where
rnf :: WorkerTypeSpecificationInput -> ()
rnf WorkerTypeSpecificationInput' {Maybe ImageConfigurationInput
imageConfiguration :: Maybe ImageConfigurationInput
$sel:imageConfiguration:WorkerTypeSpecificationInput' :: WorkerTypeSpecificationInput -> Maybe ImageConfigurationInput
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ImageConfigurationInput
imageConfiguration
instance Data.ToJSON WorkerTypeSpecificationInput where
toJSON :: WorkerTypeSpecificationInput -> Value
toJSON WorkerTypeSpecificationInput' {Maybe ImageConfigurationInput
imageConfiguration :: Maybe ImageConfigurationInput
$sel:imageConfiguration:WorkerTypeSpecificationInput' :: WorkerTypeSpecificationInput -> Maybe ImageConfigurationInput
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"imageConfiguration" 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 ImageConfigurationInput
imageConfiguration
]
)