{-# 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.EksContainerDetail
-- 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.EksContainerDetail where

import Amazonka.Batch.Types.EksContainerEnvironmentVariable
import Amazonka.Batch.Types.EksContainerResourceRequirements
import Amazonka.Batch.Types.EksContainerSecurityContext
import Amazonka.Batch.Types.EksContainerVolumeMount
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

-- | The details for container properties that are returned by @DescribeJobs@
-- for jobs that use Amazon EKS.
--
-- /See:/ 'newEksContainerDetail' smart constructor.
data EksContainerDetail = EksContainerDetail'
  { -- | An array of arguments to the entrypoint. If this isn\'t specified, the
    -- @CMD@ of the container image is used. This corresponds to the @args@
    -- member in the
    -- <https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#entrypoint Entrypoint>
    -- portion of the
    -- <https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/ Pod>
    -- in Kubernetes. Environment variable references are expanded using the
    -- container\'s environment.
    --
    -- If the referenced environment variable doesn\'t exist, the reference in
    -- the command isn\'t changed. For example, if the reference is to
    -- \"@$(NAME1)@\" and the @NAME1@ environment variable doesn\'t exist, the
    -- command string will remain \"@$(NAME1)@\". @$$@ is replaced with @$@ and
    -- the resulting string isn\'t expanded. For example, @$$(VAR_NAME)@ is
    -- passed as @$(VAR_NAME)@ whether or not the @VAR_NAME@ environment
    -- variable exists. For more information, see
    -- <https://docs.docker.com/engine/reference/builder/#cmd CMD> in the
    -- /Dockerfile reference/ and
    -- <https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/ Define a command and arguments for a pod>
    -- in the /Kubernetes documentation/.
    EksContainerDetail -> Maybe [Text]
args :: Prelude.Maybe [Prelude.Text],
    -- | The entrypoint for the container. For more information, see
    -- <https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#entrypoint Entrypoint>
    -- in the /Kubernetes documentation/.
    EksContainerDetail -> Maybe [Text]
command :: Prelude.Maybe [Prelude.Text],
    -- | The environment variables to pass to a container.
    --
    -- Environment variables cannot start with \"@AWS_BATCH@\". This naming
    -- convention is reserved for variables that Batch sets.
    EksContainerDetail -> Maybe [EksContainerEnvironmentVariable]
env :: Prelude.Maybe [EksContainerEnvironmentVariable],
    -- | The exit code for the job attempt. A non-zero exit code is considered
    -- failed.
    EksContainerDetail -> Maybe Int
exitCode :: Prelude.Maybe Prelude.Int,
    -- | The Docker image used to start the container.
    EksContainerDetail -> Maybe Text
image :: Prelude.Maybe Prelude.Text,
    -- | The image pull policy for the container. Supported values are @Always@,
    -- @IfNotPresent@, and @Never@. This parameter defaults to @Always@ if the
    -- @:latest@ tag is specified, @IfNotPresent@ otherwise. For more
    -- information, see
    -- <https://kubernetes.io/docs/concepts/containers/images/#updating-images Updating images>
    -- in the /Kubernetes documentation/.
    EksContainerDetail -> Maybe Text
imagePullPolicy :: Prelude.Maybe Prelude.Text,
    -- | The name of the container. If the name isn\'t specified, the default
    -- name \"@Default@\" is used. Each container in a pod must have a unique
    -- name.
    EksContainerDetail -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | A short human-readable string to provide additional details for a
    -- running or stopped container. It can be up to 255 characters long.
    EksContainerDetail -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
    -- | The type and amount of resources to assign to a container. The supported
    -- resources include @memory@, @cpu@, and @nvidia.com\/gpu@. For more
    -- information, see
    -- <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Resource management for pods and containers>
    -- in the /Kubernetes documentation/.
    EksContainerDetail -> Maybe EksContainerResourceRequirements
resources :: Prelude.Maybe EksContainerResourceRequirements,
    -- | The security context for a job. For more information, see
    -- <https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ Configure a security context for a pod or container>
    -- in the /Kubernetes documentation/.
    EksContainerDetail -> Maybe EksContainerSecurityContext
securityContext :: Prelude.Maybe EksContainerSecurityContext,
    -- | The volume mounts for the container. Batch supports @emptyDir@,
    -- @hostPath@, and @secret@ volume types. For more information about
    -- volumes and volume mounts in Kubernetes, see
    -- <https://kubernetes.io/docs/concepts/storage/volumes/ Volumes> in the
    -- /Kubernetes documentation/.
    EksContainerDetail -> Maybe [EksContainerVolumeMount]
volumeMounts :: Prelude.Maybe [EksContainerVolumeMount]
  }
  deriving (EksContainerDetail -> EksContainerDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EksContainerDetail -> EksContainerDetail -> Bool
$c/= :: EksContainerDetail -> EksContainerDetail -> Bool
== :: EksContainerDetail -> EksContainerDetail -> Bool
$c== :: EksContainerDetail -> EksContainerDetail -> Bool
Prelude.Eq, ReadPrec [EksContainerDetail]
ReadPrec EksContainerDetail
Int -> ReadS EksContainerDetail
ReadS [EksContainerDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EksContainerDetail]
$creadListPrec :: ReadPrec [EksContainerDetail]
readPrec :: ReadPrec EksContainerDetail
$creadPrec :: ReadPrec EksContainerDetail
readList :: ReadS [EksContainerDetail]
$creadList :: ReadS [EksContainerDetail]
readsPrec :: Int -> ReadS EksContainerDetail
$creadsPrec :: Int -> ReadS EksContainerDetail
Prelude.Read, Int -> EksContainerDetail -> ShowS
[EksContainerDetail] -> ShowS
EksContainerDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EksContainerDetail] -> ShowS
$cshowList :: [EksContainerDetail] -> ShowS
show :: EksContainerDetail -> String
$cshow :: EksContainerDetail -> String
showsPrec :: Int -> EksContainerDetail -> ShowS
$cshowsPrec :: Int -> EksContainerDetail -> ShowS
Prelude.Show, forall x. Rep EksContainerDetail x -> EksContainerDetail
forall x. EksContainerDetail -> Rep EksContainerDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EksContainerDetail x -> EksContainerDetail
$cfrom :: forall x. EksContainerDetail -> Rep EksContainerDetail x
Prelude.Generic)

-- |
-- Create a value of 'EksContainerDetail' 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:
--
-- 'args', 'eksContainerDetail_args' - An array of arguments to the entrypoint. If this isn\'t specified, the
-- @CMD@ of the container image is used. This corresponds to the @args@
-- member in the
-- <https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#entrypoint Entrypoint>
-- portion of the
-- <https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/ Pod>
-- in Kubernetes. Environment variable references are expanded using the
-- container\'s environment.
--
-- If the referenced environment variable doesn\'t exist, the reference in
-- the command isn\'t changed. For example, if the reference is to
-- \"@$(NAME1)@\" and the @NAME1@ environment variable doesn\'t exist, the
-- command string will remain \"@$(NAME1)@\". @$$@ is replaced with @$@ and
-- the resulting string isn\'t expanded. For example, @$$(VAR_NAME)@ is
-- passed as @$(VAR_NAME)@ whether or not the @VAR_NAME@ environment
-- variable exists. For more information, see
-- <https://docs.docker.com/engine/reference/builder/#cmd CMD> in the
-- /Dockerfile reference/ and
-- <https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/ Define a command and arguments for a pod>
-- in the /Kubernetes documentation/.
--
-- 'command', 'eksContainerDetail_command' - The entrypoint for the container. For more information, see
-- <https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#entrypoint Entrypoint>
-- in the /Kubernetes documentation/.
--
-- 'env', 'eksContainerDetail_env' - The environment variables to pass to a container.
--
-- Environment variables cannot start with \"@AWS_BATCH@\". This naming
-- convention is reserved for variables that Batch sets.
--
-- 'exitCode', 'eksContainerDetail_exitCode' - The exit code for the job attempt. A non-zero exit code is considered
-- failed.
--
-- 'image', 'eksContainerDetail_image' - The Docker image used to start the container.
--
-- 'imagePullPolicy', 'eksContainerDetail_imagePullPolicy' - The image pull policy for the container. Supported values are @Always@,
-- @IfNotPresent@, and @Never@. This parameter defaults to @Always@ if the
-- @:latest@ tag is specified, @IfNotPresent@ otherwise. For more
-- information, see
-- <https://kubernetes.io/docs/concepts/containers/images/#updating-images Updating images>
-- in the /Kubernetes documentation/.
--
-- 'name', 'eksContainerDetail_name' - The name of the container. If the name isn\'t specified, the default
-- name \"@Default@\" is used. Each container in a pod must have a unique
-- name.
--
-- 'reason', 'eksContainerDetail_reason' - A short human-readable string to provide additional details for a
-- running or stopped container. It can be up to 255 characters long.
--
-- 'resources', 'eksContainerDetail_resources' - The type and amount of resources to assign to a container. The supported
-- resources include @memory@, @cpu@, and @nvidia.com\/gpu@. For more
-- information, see
-- <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Resource management for pods and containers>
-- in the /Kubernetes documentation/.
--
-- 'securityContext', 'eksContainerDetail_securityContext' - The security context for a job. For more information, see
-- <https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ Configure a security context for a pod or container>
-- in the /Kubernetes documentation/.
--
-- 'volumeMounts', 'eksContainerDetail_volumeMounts' - The volume mounts for the container. Batch supports @emptyDir@,
-- @hostPath@, and @secret@ volume types. For more information about
-- volumes and volume mounts in Kubernetes, see
-- <https://kubernetes.io/docs/concepts/storage/volumes/ Volumes> in the
-- /Kubernetes documentation/.
newEksContainerDetail ::
  EksContainerDetail
newEksContainerDetail :: EksContainerDetail
newEksContainerDetail =
  EksContainerDetail'
    { $sel:args:EksContainerDetail' :: Maybe [Text]
args = forall a. Maybe a
Prelude.Nothing,
      $sel:command:EksContainerDetail' :: Maybe [Text]
command = forall a. Maybe a
Prelude.Nothing,
      $sel:env:EksContainerDetail' :: Maybe [EksContainerEnvironmentVariable]
env = forall a. Maybe a
Prelude.Nothing,
      $sel:exitCode:EksContainerDetail' :: Maybe Int
exitCode = forall a. Maybe a
Prelude.Nothing,
      $sel:image:EksContainerDetail' :: Maybe Text
image = forall a. Maybe a
Prelude.Nothing,
      $sel:imagePullPolicy:EksContainerDetail' :: Maybe Text
imagePullPolicy = forall a. Maybe a
Prelude.Nothing,
      $sel:name:EksContainerDetail' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:reason:EksContainerDetail' :: Maybe Text
reason = forall a. Maybe a
Prelude.Nothing,
      $sel:resources:EksContainerDetail' :: Maybe EksContainerResourceRequirements
resources = forall a. Maybe a
Prelude.Nothing,
      $sel:securityContext:EksContainerDetail' :: Maybe EksContainerSecurityContext
securityContext = forall a. Maybe a
Prelude.Nothing,
      $sel:volumeMounts:EksContainerDetail' :: Maybe [EksContainerVolumeMount]
volumeMounts = forall a. Maybe a
Prelude.Nothing
    }

-- | An array of arguments to the entrypoint. If this isn\'t specified, the
-- @CMD@ of the container image is used. This corresponds to the @args@
-- member in the
-- <https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#entrypoint Entrypoint>
-- portion of the
-- <https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/ Pod>
-- in Kubernetes. Environment variable references are expanded using the
-- container\'s environment.
--
-- If the referenced environment variable doesn\'t exist, the reference in
-- the command isn\'t changed. For example, if the reference is to
-- \"@$(NAME1)@\" and the @NAME1@ environment variable doesn\'t exist, the
-- command string will remain \"@$(NAME1)@\". @$$@ is replaced with @$@ and
-- the resulting string isn\'t expanded. For example, @$$(VAR_NAME)@ is
-- passed as @$(VAR_NAME)@ whether or not the @VAR_NAME@ environment
-- variable exists. For more information, see
-- <https://docs.docker.com/engine/reference/builder/#cmd CMD> in the
-- /Dockerfile reference/ and
-- <https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/ Define a command and arguments for a pod>
-- in the /Kubernetes documentation/.
eksContainerDetail_args :: Lens.Lens' EksContainerDetail (Prelude.Maybe [Prelude.Text])
eksContainerDetail_args :: Lens' EksContainerDetail (Maybe [Text])
eksContainerDetail_args = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe [Text]
args :: Maybe [Text]
$sel:args:EksContainerDetail' :: EksContainerDetail -> Maybe [Text]
args} -> Maybe [Text]
args) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe [Text]
a -> EksContainerDetail
s {$sel:args:EksContainerDetail' :: Maybe [Text]
args = Maybe [Text]
a} :: EksContainerDetail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The entrypoint for the container. For more information, see
-- <https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#entrypoint Entrypoint>
-- in the /Kubernetes documentation/.
eksContainerDetail_command :: Lens.Lens' EksContainerDetail (Prelude.Maybe [Prelude.Text])
eksContainerDetail_command :: Lens' EksContainerDetail (Maybe [Text])
eksContainerDetail_command = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe [Text]
command :: Maybe [Text]
$sel:command:EksContainerDetail' :: EksContainerDetail -> Maybe [Text]
command} -> Maybe [Text]
command) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe [Text]
a -> EksContainerDetail
s {$sel:command:EksContainerDetail' :: Maybe [Text]
command = Maybe [Text]
a} :: EksContainerDetail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The environment variables to pass to a container.
--
-- Environment variables cannot start with \"@AWS_BATCH@\". This naming
-- convention is reserved for variables that Batch sets.
eksContainerDetail_env :: Lens.Lens' EksContainerDetail (Prelude.Maybe [EksContainerEnvironmentVariable])
eksContainerDetail_env :: Lens' EksContainerDetail (Maybe [EksContainerEnvironmentVariable])
eksContainerDetail_env = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe [EksContainerEnvironmentVariable]
env :: Maybe [EksContainerEnvironmentVariable]
$sel:env:EksContainerDetail' :: EksContainerDetail -> Maybe [EksContainerEnvironmentVariable]
env} -> Maybe [EksContainerEnvironmentVariable]
env) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe [EksContainerEnvironmentVariable]
a -> EksContainerDetail
s {$sel:env:EksContainerDetail' :: Maybe [EksContainerEnvironmentVariable]
env = Maybe [EksContainerEnvironmentVariable]
a} :: EksContainerDetail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The exit code for the job attempt. A non-zero exit code is considered
-- failed.
eksContainerDetail_exitCode :: Lens.Lens' EksContainerDetail (Prelude.Maybe Prelude.Int)
eksContainerDetail_exitCode :: Lens' EksContainerDetail (Maybe Int)
eksContainerDetail_exitCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe Int
exitCode :: Maybe Int
$sel:exitCode:EksContainerDetail' :: EksContainerDetail -> Maybe Int
exitCode} -> Maybe Int
exitCode) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe Int
a -> EksContainerDetail
s {$sel:exitCode:EksContainerDetail' :: Maybe Int
exitCode = Maybe Int
a} :: EksContainerDetail)

-- | The Docker image used to start the container.
eksContainerDetail_image :: Lens.Lens' EksContainerDetail (Prelude.Maybe Prelude.Text)
eksContainerDetail_image :: Lens' EksContainerDetail (Maybe Text)
eksContainerDetail_image = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe Text
image :: Maybe Text
$sel:image:EksContainerDetail' :: EksContainerDetail -> Maybe Text
image} -> Maybe Text
image) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe Text
a -> EksContainerDetail
s {$sel:image:EksContainerDetail' :: Maybe Text
image = Maybe Text
a} :: EksContainerDetail)

-- | The image pull policy for the container. Supported values are @Always@,
-- @IfNotPresent@, and @Never@. This parameter defaults to @Always@ if the
-- @:latest@ tag is specified, @IfNotPresent@ otherwise. For more
-- information, see
-- <https://kubernetes.io/docs/concepts/containers/images/#updating-images Updating images>
-- in the /Kubernetes documentation/.
eksContainerDetail_imagePullPolicy :: Lens.Lens' EksContainerDetail (Prelude.Maybe Prelude.Text)
eksContainerDetail_imagePullPolicy :: Lens' EksContainerDetail (Maybe Text)
eksContainerDetail_imagePullPolicy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe Text
imagePullPolicy :: Maybe Text
$sel:imagePullPolicy:EksContainerDetail' :: EksContainerDetail -> Maybe Text
imagePullPolicy} -> Maybe Text
imagePullPolicy) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe Text
a -> EksContainerDetail
s {$sel:imagePullPolicy:EksContainerDetail' :: Maybe Text
imagePullPolicy = Maybe Text
a} :: EksContainerDetail)

-- | The name of the container. If the name isn\'t specified, the default
-- name \"@Default@\" is used. Each container in a pod must have a unique
-- name.
eksContainerDetail_name :: Lens.Lens' EksContainerDetail (Prelude.Maybe Prelude.Text)
eksContainerDetail_name :: Lens' EksContainerDetail (Maybe Text)
eksContainerDetail_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe Text
name :: Maybe Text
$sel:name:EksContainerDetail' :: EksContainerDetail -> Maybe Text
name} -> Maybe Text
name) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe Text
a -> EksContainerDetail
s {$sel:name:EksContainerDetail' :: Maybe Text
name = Maybe Text
a} :: EksContainerDetail)

-- | A short human-readable string to provide additional details for a
-- running or stopped container. It can be up to 255 characters long.
eksContainerDetail_reason :: Lens.Lens' EksContainerDetail (Prelude.Maybe Prelude.Text)
eksContainerDetail_reason :: Lens' EksContainerDetail (Maybe Text)
eksContainerDetail_reason = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe Text
reason :: Maybe Text
$sel:reason:EksContainerDetail' :: EksContainerDetail -> Maybe Text
reason} -> Maybe Text
reason) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe Text
a -> EksContainerDetail
s {$sel:reason:EksContainerDetail' :: Maybe Text
reason = Maybe Text
a} :: EksContainerDetail)

-- | The type and amount of resources to assign to a container. The supported
-- resources include @memory@, @cpu@, and @nvidia.com\/gpu@. For more
-- information, see
-- <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ Resource management for pods and containers>
-- in the /Kubernetes documentation/.
eksContainerDetail_resources :: Lens.Lens' EksContainerDetail (Prelude.Maybe EksContainerResourceRequirements)
eksContainerDetail_resources :: Lens' EksContainerDetail (Maybe EksContainerResourceRequirements)
eksContainerDetail_resources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe EksContainerResourceRequirements
resources :: Maybe EksContainerResourceRequirements
$sel:resources:EksContainerDetail' :: EksContainerDetail -> Maybe EksContainerResourceRequirements
resources} -> Maybe EksContainerResourceRequirements
resources) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe EksContainerResourceRequirements
a -> EksContainerDetail
s {$sel:resources:EksContainerDetail' :: Maybe EksContainerResourceRequirements
resources = Maybe EksContainerResourceRequirements
a} :: EksContainerDetail)

-- | The security context for a job. For more information, see
-- <https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ Configure a security context for a pod or container>
-- in the /Kubernetes documentation/.
eksContainerDetail_securityContext :: Lens.Lens' EksContainerDetail (Prelude.Maybe EksContainerSecurityContext)
eksContainerDetail_securityContext :: Lens' EksContainerDetail (Maybe EksContainerSecurityContext)
eksContainerDetail_securityContext = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe EksContainerSecurityContext
securityContext :: Maybe EksContainerSecurityContext
$sel:securityContext:EksContainerDetail' :: EksContainerDetail -> Maybe EksContainerSecurityContext
securityContext} -> Maybe EksContainerSecurityContext
securityContext) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe EksContainerSecurityContext
a -> EksContainerDetail
s {$sel:securityContext:EksContainerDetail' :: Maybe EksContainerSecurityContext
securityContext = Maybe EksContainerSecurityContext
a} :: EksContainerDetail)

-- | The volume mounts for the container. Batch supports @emptyDir@,
-- @hostPath@, and @secret@ volume types. For more information about
-- volumes and volume mounts in Kubernetes, see
-- <https://kubernetes.io/docs/concepts/storage/volumes/ Volumes> in the
-- /Kubernetes documentation/.
eksContainerDetail_volumeMounts :: Lens.Lens' EksContainerDetail (Prelude.Maybe [EksContainerVolumeMount])
eksContainerDetail_volumeMounts :: Lens' EksContainerDetail (Maybe [EksContainerVolumeMount])
eksContainerDetail_volumeMounts = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerDetail' {Maybe [EksContainerVolumeMount]
volumeMounts :: Maybe [EksContainerVolumeMount]
$sel:volumeMounts:EksContainerDetail' :: EksContainerDetail -> Maybe [EksContainerVolumeMount]
volumeMounts} -> Maybe [EksContainerVolumeMount]
volumeMounts) (\s :: EksContainerDetail
s@EksContainerDetail' {} Maybe [EksContainerVolumeMount]
a -> EksContainerDetail
s {$sel:volumeMounts:EksContainerDetail' :: Maybe [EksContainerVolumeMount]
volumeMounts = Maybe [EksContainerVolumeMount]
a} :: EksContainerDetail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON EksContainerDetail where
  parseJSON :: Value -> Parser EksContainerDetail
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"EksContainerDetail"
      ( \Object
x ->
          Maybe [Text]
-> Maybe [Text]
-> Maybe [EksContainerEnvironmentVariable]
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe EksContainerResourceRequirements
-> Maybe EksContainerSecurityContext
-> Maybe [EksContainerVolumeMount]
-> EksContainerDetail
EksContainerDetail'
            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
"args" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"command" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"env" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"exitCode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"image")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"imagePullPolicy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"reason")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"resources")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"securityContext")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"volumeMounts" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable EksContainerDetail where
  hashWithSalt :: Int -> EksContainerDetail -> Int
hashWithSalt Int
_salt EksContainerDetail' {Maybe Int
Maybe [Text]
Maybe [EksContainerEnvironmentVariable]
Maybe [EksContainerVolumeMount]
Maybe Text
Maybe EksContainerResourceRequirements
Maybe EksContainerSecurityContext
volumeMounts :: Maybe [EksContainerVolumeMount]
securityContext :: Maybe EksContainerSecurityContext
resources :: Maybe EksContainerResourceRequirements
reason :: Maybe Text
name :: Maybe Text
imagePullPolicy :: Maybe Text
image :: Maybe Text
exitCode :: Maybe Int
env :: Maybe [EksContainerEnvironmentVariable]
command :: Maybe [Text]
args :: Maybe [Text]
$sel:volumeMounts:EksContainerDetail' :: EksContainerDetail -> Maybe [EksContainerVolumeMount]
$sel:securityContext:EksContainerDetail' :: EksContainerDetail -> Maybe EksContainerSecurityContext
$sel:resources:EksContainerDetail' :: EksContainerDetail -> Maybe EksContainerResourceRequirements
$sel:reason:EksContainerDetail' :: EksContainerDetail -> Maybe Text
$sel:name:EksContainerDetail' :: EksContainerDetail -> Maybe Text
$sel:imagePullPolicy:EksContainerDetail' :: EksContainerDetail -> Maybe Text
$sel:image:EksContainerDetail' :: EksContainerDetail -> Maybe Text
$sel:exitCode:EksContainerDetail' :: EksContainerDetail -> Maybe Int
$sel:env:EksContainerDetail' :: EksContainerDetail -> Maybe [EksContainerEnvironmentVariable]
$sel:command:EksContainerDetail' :: EksContainerDetail -> Maybe [Text]
$sel:args:EksContainerDetail' :: EksContainerDetail -> Maybe [Text]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
args
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
command
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [EksContainerEnvironmentVariable]
env
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
exitCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
image
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
imagePullPolicy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
reason
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EksContainerResourceRequirements
resources
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EksContainerSecurityContext
securityContext
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [EksContainerVolumeMount]
volumeMounts

instance Prelude.NFData EksContainerDetail where
  rnf :: EksContainerDetail -> ()
rnf EksContainerDetail' {Maybe Int
Maybe [Text]
Maybe [EksContainerEnvironmentVariable]
Maybe [EksContainerVolumeMount]
Maybe Text
Maybe EksContainerResourceRequirements
Maybe EksContainerSecurityContext
volumeMounts :: Maybe [EksContainerVolumeMount]
securityContext :: Maybe EksContainerSecurityContext
resources :: Maybe EksContainerResourceRequirements
reason :: Maybe Text
name :: Maybe Text
imagePullPolicy :: Maybe Text
image :: Maybe Text
exitCode :: Maybe Int
env :: Maybe [EksContainerEnvironmentVariable]
command :: Maybe [Text]
args :: Maybe [Text]
$sel:volumeMounts:EksContainerDetail' :: EksContainerDetail -> Maybe [EksContainerVolumeMount]
$sel:securityContext:EksContainerDetail' :: EksContainerDetail -> Maybe EksContainerSecurityContext
$sel:resources:EksContainerDetail' :: EksContainerDetail -> Maybe EksContainerResourceRequirements
$sel:reason:EksContainerDetail' :: EksContainerDetail -> Maybe Text
$sel:name:EksContainerDetail' :: EksContainerDetail -> Maybe Text
$sel:imagePullPolicy:EksContainerDetail' :: EksContainerDetail -> Maybe Text
$sel:image:EksContainerDetail' :: EksContainerDetail -> Maybe Text
$sel:exitCode:EksContainerDetail' :: EksContainerDetail -> Maybe Int
$sel:env:EksContainerDetail' :: EksContainerDetail -> Maybe [EksContainerEnvironmentVariable]
$sel:command:EksContainerDetail' :: EksContainerDetail -> Maybe [Text]
$sel:args:EksContainerDetail' :: EksContainerDetail -> Maybe [Text]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
args
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
command
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [EksContainerEnvironmentVariable]
env
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
exitCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
image
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
imagePullPolicy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
reason
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EksContainerResourceRequirements
resources
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EksContainerSecurityContext
securityContext
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [EksContainerVolumeMount]
volumeMounts