{-# 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.EksContainerOverride where
import Amazonka.Batch.Types.EksContainerEnvironmentVariable
import Amazonka.Batch.Types.EksContainerResourceRequirements
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 EksContainerOverride = EksContainerOverride'
{
EksContainerOverride -> Maybe [Text]
args :: Prelude.Maybe [Prelude.Text],
EksContainerOverride -> Maybe [Text]
command :: Prelude.Maybe [Prelude.Text],
EksContainerOverride -> Maybe [EksContainerEnvironmentVariable]
env :: Prelude.Maybe [EksContainerEnvironmentVariable],
EksContainerOverride -> Maybe Text
image :: Prelude.Maybe Prelude.Text,
EksContainerOverride -> Maybe EksContainerResourceRequirements
resources :: Prelude.Maybe EksContainerResourceRequirements
}
deriving (EksContainerOverride -> EksContainerOverride -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EksContainerOverride -> EksContainerOverride -> Bool
$c/= :: EksContainerOverride -> EksContainerOverride -> Bool
== :: EksContainerOverride -> EksContainerOverride -> Bool
$c== :: EksContainerOverride -> EksContainerOverride -> Bool
Prelude.Eq, ReadPrec [EksContainerOverride]
ReadPrec EksContainerOverride
Int -> ReadS EksContainerOverride
ReadS [EksContainerOverride]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EksContainerOverride]
$creadListPrec :: ReadPrec [EksContainerOverride]
readPrec :: ReadPrec EksContainerOverride
$creadPrec :: ReadPrec EksContainerOverride
readList :: ReadS [EksContainerOverride]
$creadList :: ReadS [EksContainerOverride]
readsPrec :: Int -> ReadS EksContainerOverride
$creadsPrec :: Int -> ReadS EksContainerOverride
Prelude.Read, Int -> EksContainerOverride -> ShowS
[EksContainerOverride] -> ShowS
EksContainerOverride -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EksContainerOverride] -> ShowS
$cshowList :: [EksContainerOverride] -> ShowS
show :: EksContainerOverride -> String
$cshow :: EksContainerOverride -> String
showsPrec :: Int -> EksContainerOverride -> ShowS
$cshowsPrec :: Int -> EksContainerOverride -> ShowS
Prelude.Show, forall x. Rep EksContainerOverride x -> EksContainerOverride
forall x. EksContainerOverride -> Rep EksContainerOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep EksContainerOverride x -> EksContainerOverride
$cfrom :: forall x. EksContainerOverride -> Rep EksContainerOverride x
Prelude.Generic)
newEksContainerOverride ::
EksContainerOverride
newEksContainerOverride :: EksContainerOverride
newEksContainerOverride =
EksContainerOverride'
{ $sel:args:EksContainerOverride' :: Maybe [Text]
args = forall a. Maybe a
Prelude.Nothing,
$sel:command:EksContainerOverride' :: Maybe [Text]
command = forall a. Maybe a
Prelude.Nothing,
$sel:env:EksContainerOverride' :: Maybe [EksContainerEnvironmentVariable]
env = forall a. Maybe a
Prelude.Nothing,
$sel:image:EksContainerOverride' :: Maybe Text
image = forall a. Maybe a
Prelude.Nothing,
$sel:resources:EksContainerOverride' :: Maybe EksContainerResourceRequirements
resources = forall a. Maybe a
Prelude.Nothing
}
eksContainerOverride_args :: Lens.Lens' EksContainerOverride (Prelude.Maybe [Prelude.Text])
eksContainerOverride_args :: Lens' EksContainerOverride (Maybe [Text])
eksContainerOverride_args = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerOverride' {Maybe [Text]
args :: Maybe [Text]
$sel:args:EksContainerOverride' :: EksContainerOverride -> Maybe [Text]
args} -> Maybe [Text]
args) (\s :: EksContainerOverride
s@EksContainerOverride' {} Maybe [Text]
a -> EksContainerOverride
s {$sel:args:EksContainerOverride' :: Maybe [Text]
args = Maybe [Text]
a} :: EksContainerOverride) 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
eksContainerOverride_command :: Lens.Lens' EksContainerOverride (Prelude.Maybe [Prelude.Text])
eksContainerOverride_command :: Lens' EksContainerOverride (Maybe [Text])
eksContainerOverride_command = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerOverride' {Maybe [Text]
command :: Maybe [Text]
$sel:command:EksContainerOverride' :: EksContainerOverride -> Maybe [Text]
command} -> Maybe [Text]
command) (\s :: EksContainerOverride
s@EksContainerOverride' {} Maybe [Text]
a -> EksContainerOverride
s {$sel:command:EksContainerOverride' :: Maybe [Text]
command = Maybe [Text]
a} :: EksContainerOverride) 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
eksContainerOverride_env :: Lens.Lens' EksContainerOverride (Prelude.Maybe [EksContainerEnvironmentVariable])
eksContainerOverride_env :: Lens'
EksContainerOverride (Maybe [EksContainerEnvironmentVariable])
eksContainerOverride_env = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerOverride' {Maybe [EksContainerEnvironmentVariable]
env :: Maybe [EksContainerEnvironmentVariable]
$sel:env:EksContainerOverride' :: EksContainerOverride -> Maybe [EksContainerEnvironmentVariable]
env} -> Maybe [EksContainerEnvironmentVariable]
env) (\s :: EksContainerOverride
s@EksContainerOverride' {} Maybe [EksContainerEnvironmentVariable]
a -> EksContainerOverride
s {$sel:env:EksContainerOverride' :: Maybe [EksContainerEnvironmentVariable]
env = Maybe [EksContainerEnvironmentVariable]
a} :: EksContainerOverride) 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
eksContainerOverride_image :: Lens.Lens' EksContainerOverride (Prelude.Maybe Prelude.Text)
eksContainerOverride_image :: Lens' EksContainerOverride (Maybe Text)
eksContainerOverride_image = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerOverride' {Maybe Text
image :: Maybe Text
$sel:image:EksContainerOverride' :: EksContainerOverride -> Maybe Text
image} -> Maybe Text
image) (\s :: EksContainerOverride
s@EksContainerOverride' {} Maybe Text
a -> EksContainerOverride
s {$sel:image:EksContainerOverride' :: Maybe Text
image = Maybe Text
a} :: EksContainerOverride)
eksContainerOverride_resources :: Lens.Lens' EksContainerOverride (Prelude.Maybe EksContainerResourceRequirements)
eksContainerOverride_resources :: Lens' EksContainerOverride (Maybe EksContainerResourceRequirements)
eksContainerOverride_resources = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EksContainerOverride' {Maybe EksContainerResourceRequirements
resources :: Maybe EksContainerResourceRequirements
$sel:resources:EksContainerOverride' :: EksContainerOverride -> Maybe EksContainerResourceRequirements
resources} -> Maybe EksContainerResourceRequirements
resources) (\s :: EksContainerOverride
s@EksContainerOverride' {} Maybe EksContainerResourceRequirements
a -> EksContainerOverride
s {$sel:resources:EksContainerOverride' :: Maybe EksContainerResourceRequirements
resources = Maybe EksContainerResourceRequirements
a} :: EksContainerOverride)
instance Prelude.Hashable EksContainerOverride where
hashWithSalt :: Int -> EksContainerOverride -> Int
hashWithSalt Int
_salt EksContainerOverride' {Maybe [Text]
Maybe [EksContainerEnvironmentVariable]
Maybe Text
Maybe EksContainerResourceRequirements
resources :: Maybe EksContainerResourceRequirements
image :: Maybe Text
env :: Maybe [EksContainerEnvironmentVariable]
command :: Maybe [Text]
args :: Maybe [Text]
$sel:resources:EksContainerOverride' :: EksContainerOverride -> Maybe EksContainerResourceRequirements
$sel:image:EksContainerOverride' :: EksContainerOverride -> Maybe Text
$sel:env:EksContainerOverride' :: EksContainerOverride -> Maybe [EksContainerEnvironmentVariable]
$sel:command:EksContainerOverride' :: EksContainerOverride -> Maybe [Text]
$sel:args:EksContainerOverride' :: EksContainerOverride -> 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 Text
image
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EksContainerResourceRequirements
resources
instance Prelude.NFData EksContainerOverride where
rnf :: EksContainerOverride -> ()
rnf EksContainerOverride' {Maybe [Text]
Maybe [EksContainerEnvironmentVariable]
Maybe Text
Maybe EksContainerResourceRequirements
resources :: Maybe EksContainerResourceRequirements
image :: Maybe Text
env :: Maybe [EksContainerEnvironmentVariable]
command :: Maybe [Text]
args :: Maybe [Text]
$sel:resources:EksContainerOverride' :: EksContainerOverride -> Maybe EksContainerResourceRequirements
$sel:image:EksContainerOverride' :: EksContainerOverride -> Maybe Text
$sel:env:EksContainerOverride' :: EksContainerOverride -> Maybe [EksContainerEnvironmentVariable]
$sel:command:EksContainerOverride' :: EksContainerOverride -> Maybe [Text]
$sel:args:EksContainerOverride' :: EksContainerOverride -> 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 Text
image
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EksContainerResourceRequirements
resources
instance Data.ToJSON EksContainerOverride where
toJSON :: EksContainerOverride -> Value
toJSON EksContainerOverride' {Maybe [Text]
Maybe [EksContainerEnvironmentVariable]
Maybe Text
Maybe EksContainerResourceRequirements
resources :: Maybe EksContainerResourceRequirements
image :: Maybe Text
env :: Maybe [EksContainerEnvironmentVariable]
command :: Maybe [Text]
args :: Maybe [Text]
$sel:resources:EksContainerOverride' :: EksContainerOverride -> Maybe EksContainerResourceRequirements
$sel:image:EksContainerOverride' :: EksContainerOverride -> Maybe Text
$sel:env:EksContainerOverride' :: EksContainerOverride -> Maybe [EksContainerEnvironmentVariable]
$sel:command:EksContainerOverride' :: EksContainerOverride -> Maybe [Text]
$sel:args:EksContainerOverride' :: EksContainerOverride -> Maybe [Text]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"args" 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 [Text]
args,
(Key
"command" 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 [Text]
command,
(Key
"env" 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 [EksContainerEnvironmentVariable]
env,
(Key
"image" 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 Text
image,
(Key
"resources" 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 EksContainerResourceRequirements
resources
]
)