{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Batch.Types.EksPropertiesDetail
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Batch.Types.EksPropertiesDetail where

import Amazonka.Batch.Types.EksPodPropertiesDetail
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

-- | An object that contains the details for the Kubernetes resources of a
-- job.
--
-- /See:/ 'newEksPropertiesDetail' smart constructor.
data EksPropertiesDetail = EksPropertiesDetail'
  { -- | The properties for the Kubernetes pod resources of a job.
    EksPropertiesDetail -> Maybe EksPodPropertiesDetail
podProperties :: Prelude.Maybe EksPodPropertiesDetail
  }
  deriving (EksPropertiesDetail -> EksPropertiesDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EksPropertiesDetail -> EksPropertiesDetail -> Bool
$c/= :: EksPropertiesDetail -> EksPropertiesDetail -> Bool
== :: EksPropertiesDetail -> EksPropertiesDetail -> Bool
$c== :: EksPropertiesDetail -> EksPropertiesDetail -> Bool
Prelude.Eq, ReadPrec [EksPropertiesDetail]
ReadPrec EksPropertiesDetail
Int -> ReadS EksPropertiesDetail
ReadS [EksPropertiesDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EksPropertiesDetail]
$creadListPrec :: ReadPrec [EksPropertiesDetail]
readPrec :: ReadPrec EksPropertiesDetail
$creadPrec :: ReadPrec EksPropertiesDetail
readList :: ReadS [EksPropertiesDetail]
$creadList :: ReadS [EksPropertiesDetail]
readsPrec :: Int -> ReadS EksPropertiesDetail
$creadsPrec :: Int -> ReadS EksPropertiesDetail
Prelude.Read, Int -> EksPropertiesDetail -> ShowS
[EksPropertiesDetail] -> ShowS
EksPropertiesDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EksPropertiesDetail] -> ShowS
$cshowList :: [EksPropertiesDetail] -> ShowS
show :: EksPropertiesDetail -> String
$cshow :: EksPropertiesDetail -> String
showsPrec :: Int -> EksPropertiesDetail -> ShowS
$cshowsPrec :: Int -> EksPropertiesDetail -> ShowS
Prelude.Show, forall x. Rep EksPropertiesDetail x -> EksPropertiesDetail
forall x. EksPropertiesDetail -> Rep EksPropertiesDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EksPropertiesDetail x -> EksPropertiesDetail
$cfrom :: forall x. EksPropertiesDetail -> Rep EksPropertiesDetail x
Prelude.Generic)

-- |
-- Create a value of 'EksPropertiesDetail' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'podProperties', 'eksPropertiesDetail_podProperties' - The properties for the Kubernetes pod resources of a job.
newEksPropertiesDetail ::
  EksPropertiesDetail
newEksPropertiesDetail :: EksPropertiesDetail
newEksPropertiesDetail =
  EksPropertiesDetail'
    { $sel:podProperties:EksPropertiesDetail' :: Maybe EksPodPropertiesDetail
podProperties =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The properties for the Kubernetes pod resources of a job.
eksPropertiesDetail_podProperties :: Lens.Lens' EksPropertiesDetail (Prelude.Maybe EksPodPropertiesDetail)
eksPropertiesDetail_podProperties :: Lens' EksPropertiesDetail (Maybe EksPodPropertiesDetail)
eksPropertiesDetail_podProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksPropertiesDetail' {Maybe EksPodPropertiesDetail
podProperties :: Maybe EksPodPropertiesDetail
$sel:podProperties:EksPropertiesDetail' :: EksPropertiesDetail -> Maybe EksPodPropertiesDetail
podProperties} -> Maybe EksPodPropertiesDetail
podProperties) (\s :: EksPropertiesDetail
s@EksPropertiesDetail' {} Maybe EksPodPropertiesDetail
a -> EksPropertiesDetail
s {$sel:podProperties:EksPropertiesDetail' :: Maybe EksPodPropertiesDetail
podProperties = Maybe EksPodPropertiesDetail
a} :: EksPropertiesDetail)

instance Data.FromJSON EksPropertiesDetail where
  parseJSON :: Value -> Parser EksPropertiesDetail
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"EksPropertiesDetail"
      ( \Object
x ->
          Maybe EksPodPropertiesDetail -> EksPropertiesDetail
EksPropertiesDetail'
            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 EksPropertiesDetail where
  hashWithSalt :: Int -> EksPropertiesDetail -> Int
hashWithSalt Int
_salt EksPropertiesDetail' {Maybe EksPodPropertiesDetail
podProperties :: Maybe EksPodPropertiesDetail
$sel:podProperties:EksPropertiesDetail' :: EksPropertiesDetail -> Maybe EksPodPropertiesDetail
..} =
    Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EksPodPropertiesDetail
podProperties

instance Prelude.NFData EksPropertiesDetail where
  rnf :: EksPropertiesDetail -> ()
rnf EksPropertiesDetail' {Maybe EksPodPropertiesDetail
podProperties :: Maybe EksPodPropertiesDetail
$sel:podProperties:EksPropertiesDetail' :: EksPropertiesDetail -> Maybe EksPodPropertiesDetail
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe EksPodPropertiesDetail
podProperties