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