{-# 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.JobDefinition where
import Amazonka.Batch.Types.ContainerProperties
import Amazonka.Batch.Types.JobTimeout
import Amazonka.Batch.Types.NodeProperties
import Amazonka.Batch.Types.PlatformCapability
import Amazonka.Batch.Types.RetryStrategy
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data JobDefinition = JobDefinition'
{
JobDefinition -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
JobDefinition -> Maybe Bool
propagateTags :: Prelude.Maybe Prelude.Bool,
JobDefinition -> Maybe RetryStrategy
retryStrategy :: Prelude.Maybe RetryStrategy,
JobDefinition -> Maybe [PlatformCapability]
platformCapabilities :: Prelude.Maybe [PlatformCapability],
JobDefinition -> Maybe (HashMap Text Text)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
JobDefinition -> Maybe JobTimeout
timeout :: Prelude.Maybe JobTimeout,
JobDefinition -> Maybe ContainerProperties
containerProperties :: Prelude.Maybe ContainerProperties,
JobDefinition -> Maybe NodeProperties
nodeProperties :: Prelude.Maybe NodeProperties,
JobDefinition -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
JobDefinition -> Text
jobDefinitionName :: Prelude.Text,
JobDefinition -> Text
jobDefinitionArn :: Prelude.Text,
JobDefinition -> Int
revision :: Prelude.Int,
JobDefinition -> Text
type' :: Prelude.Text
}
deriving (JobDefinition -> JobDefinition -> Bool
(JobDefinition -> JobDefinition -> Bool)
-> (JobDefinition -> JobDefinition -> Bool) -> Eq JobDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: JobDefinition -> JobDefinition -> Bool
$c/= :: JobDefinition -> JobDefinition -> Bool
== :: JobDefinition -> JobDefinition -> Bool
$c== :: JobDefinition -> JobDefinition -> Bool
Prelude.Eq, ReadPrec [JobDefinition]
ReadPrec JobDefinition
Int -> ReadS JobDefinition
ReadS [JobDefinition]
(Int -> ReadS JobDefinition)
-> ReadS [JobDefinition]
-> ReadPrec JobDefinition
-> ReadPrec [JobDefinition]
-> Read JobDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [JobDefinition]
$creadListPrec :: ReadPrec [JobDefinition]
readPrec :: ReadPrec JobDefinition
$creadPrec :: ReadPrec JobDefinition
readList :: ReadS [JobDefinition]
$creadList :: ReadS [JobDefinition]
readsPrec :: Int -> ReadS JobDefinition
$creadsPrec :: Int -> ReadS JobDefinition
Prelude.Read, Int -> JobDefinition -> ShowS
[JobDefinition] -> ShowS
JobDefinition -> String
(Int -> JobDefinition -> ShowS)
-> (JobDefinition -> String)
-> ([JobDefinition] -> ShowS)
-> Show JobDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [JobDefinition] -> ShowS
$cshowList :: [JobDefinition] -> ShowS
show :: JobDefinition -> String
$cshow :: JobDefinition -> String
showsPrec :: Int -> JobDefinition -> ShowS
$cshowsPrec :: Int -> JobDefinition -> ShowS
Prelude.Show, (forall x. JobDefinition -> Rep JobDefinition x)
-> (forall x. Rep JobDefinition x -> JobDefinition)
-> Generic JobDefinition
forall x. Rep JobDefinition x -> JobDefinition
forall x. JobDefinition -> Rep JobDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep JobDefinition x -> JobDefinition
$cfrom :: forall x. JobDefinition -> Rep JobDefinition x
Prelude.Generic)
newJobDefinition ::
Prelude.Text ->
Prelude.Text ->
Prelude.Int ->
Prelude.Text ->
JobDefinition
newJobDefinition :: Text -> Text -> Int -> Text -> JobDefinition
newJobDefinition
Text
pJobDefinitionName_
Text
pJobDefinitionArn_
Int
pRevision_
Text
pType_ =
JobDefinition' :: Maybe Text
-> Maybe Bool
-> Maybe RetryStrategy
-> Maybe [PlatformCapability]
-> Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition
JobDefinition'
{ $sel:status:JobDefinition' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:propagateTags:JobDefinition' :: Maybe Bool
propagateTags = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:retryStrategy:JobDefinition' :: Maybe RetryStrategy
retryStrategy = Maybe RetryStrategy
forall a. Maybe a
Prelude.Nothing,
$sel:platformCapabilities:JobDefinition' :: Maybe [PlatformCapability]
platformCapabilities = Maybe [PlatformCapability]
forall a. Maybe a
Prelude.Nothing,
$sel:parameters:JobDefinition' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:timeout:JobDefinition' :: Maybe JobTimeout
timeout = Maybe JobTimeout
forall a. Maybe a
Prelude.Nothing,
$sel:containerProperties:JobDefinition' :: Maybe ContainerProperties
containerProperties = Maybe ContainerProperties
forall a. Maybe a
Prelude.Nothing,
$sel:nodeProperties:JobDefinition' :: Maybe NodeProperties
nodeProperties = Maybe NodeProperties
forall a. Maybe a
Prelude.Nothing,
$sel:tags:JobDefinition' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:jobDefinitionName:JobDefinition' :: Text
jobDefinitionName = Text
pJobDefinitionName_,
$sel:jobDefinitionArn:JobDefinition' :: Text
jobDefinitionArn = Text
pJobDefinitionArn_,
$sel:revision:JobDefinition' :: Int
revision = Int
pRevision_,
$sel:type':JobDefinition' :: Text
type' = Text
pType_
}
jobDefinition_status :: Lens.Lens' JobDefinition (Prelude.Maybe Prelude.Text)
jobDefinition_status :: (Maybe Text -> f (Maybe Text)) -> JobDefinition -> f JobDefinition
jobDefinition_status = (JobDefinition -> Maybe Text)
-> (JobDefinition -> Maybe Text -> JobDefinition)
-> Lens JobDefinition JobDefinition (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Maybe Text
status :: Maybe Text
$sel:status:JobDefinition' :: JobDefinition -> Maybe Text
status} -> Maybe Text
status) (\s :: JobDefinition
s@JobDefinition' {} Maybe Text
a -> JobDefinition
s {$sel:status:JobDefinition' :: Maybe Text
status = Maybe Text
a} :: JobDefinition)
jobDefinition_propagateTags :: Lens.Lens' JobDefinition (Prelude.Maybe Prelude.Bool)
jobDefinition_propagateTags :: (Maybe Bool -> f (Maybe Bool)) -> JobDefinition -> f JobDefinition
jobDefinition_propagateTags = (JobDefinition -> Maybe Bool)
-> (JobDefinition -> Maybe Bool -> JobDefinition)
-> Lens JobDefinition JobDefinition (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Maybe Bool
propagateTags :: Maybe Bool
$sel:propagateTags:JobDefinition' :: JobDefinition -> Maybe Bool
propagateTags} -> Maybe Bool
propagateTags) (\s :: JobDefinition
s@JobDefinition' {} Maybe Bool
a -> JobDefinition
s {$sel:propagateTags:JobDefinition' :: Maybe Bool
propagateTags = Maybe Bool
a} :: JobDefinition)
jobDefinition_retryStrategy :: Lens.Lens' JobDefinition (Prelude.Maybe RetryStrategy)
jobDefinition_retryStrategy :: (Maybe RetryStrategy -> f (Maybe RetryStrategy))
-> JobDefinition -> f JobDefinition
jobDefinition_retryStrategy = (JobDefinition -> Maybe RetryStrategy)
-> (JobDefinition -> Maybe RetryStrategy -> JobDefinition)
-> Lens
JobDefinition
JobDefinition
(Maybe RetryStrategy)
(Maybe RetryStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Maybe RetryStrategy
retryStrategy :: Maybe RetryStrategy
$sel:retryStrategy:JobDefinition' :: JobDefinition -> Maybe RetryStrategy
retryStrategy} -> Maybe RetryStrategy
retryStrategy) (\s :: JobDefinition
s@JobDefinition' {} Maybe RetryStrategy
a -> JobDefinition
s {$sel:retryStrategy:JobDefinition' :: Maybe RetryStrategy
retryStrategy = Maybe RetryStrategy
a} :: JobDefinition)
jobDefinition_platformCapabilities :: Lens.Lens' JobDefinition (Prelude.Maybe [PlatformCapability])
jobDefinition_platformCapabilities :: (Maybe [PlatformCapability] -> f (Maybe [PlatformCapability]))
-> JobDefinition -> f JobDefinition
jobDefinition_platformCapabilities = (JobDefinition -> Maybe [PlatformCapability])
-> (JobDefinition -> Maybe [PlatformCapability] -> JobDefinition)
-> Lens
JobDefinition
JobDefinition
(Maybe [PlatformCapability])
(Maybe [PlatformCapability])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Maybe [PlatformCapability]
platformCapabilities :: Maybe [PlatformCapability]
$sel:platformCapabilities:JobDefinition' :: JobDefinition -> Maybe [PlatformCapability]
platformCapabilities} -> Maybe [PlatformCapability]
platformCapabilities) (\s :: JobDefinition
s@JobDefinition' {} Maybe [PlatformCapability]
a -> JobDefinition
s {$sel:platformCapabilities:JobDefinition' :: Maybe [PlatformCapability]
platformCapabilities = Maybe [PlatformCapability]
a} :: JobDefinition) ((Maybe [PlatformCapability] -> f (Maybe [PlatformCapability]))
-> JobDefinition -> f JobDefinition)
-> ((Maybe [PlatformCapability] -> f (Maybe [PlatformCapability]))
-> Maybe [PlatformCapability] -> f (Maybe [PlatformCapability]))
-> (Maybe [PlatformCapability] -> f (Maybe [PlatformCapability]))
-> JobDefinition
-> f JobDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[PlatformCapability]
[PlatformCapability]
[PlatformCapability]
[PlatformCapability]
-> Iso
(Maybe [PlatformCapability])
(Maybe [PlatformCapability])
(Maybe [PlatformCapability])
(Maybe [PlatformCapability])
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 AnIso
[PlatformCapability]
[PlatformCapability]
[PlatformCapability]
[PlatformCapability]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
jobDefinition_parameters :: Lens.Lens' JobDefinition (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
jobDefinition_parameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JobDefinition -> f JobDefinition
jobDefinition_parameters = (JobDefinition -> Maybe (HashMap Text Text))
-> (JobDefinition -> Maybe (HashMap Text Text) -> JobDefinition)
-> Lens
JobDefinition
JobDefinition
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Maybe (HashMap Text Text)
parameters :: Maybe (HashMap Text Text)
$sel:parameters:JobDefinition' :: JobDefinition -> Maybe (HashMap Text Text)
parameters} -> Maybe (HashMap Text Text)
parameters) (\s :: JobDefinition
s@JobDefinition' {} Maybe (HashMap Text Text)
a -> JobDefinition
s {$sel:parameters:JobDefinition' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
a} :: JobDefinition) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JobDefinition -> f JobDefinition)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JobDefinition
-> f JobDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
jobDefinition_timeout :: Lens.Lens' JobDefinition (Prelude.Maybe JobTimeout)
jobDefinition_timeout :: (Maybe JobTimeout -> f (Maybe JobTimeout))
-> JobDefinition -> f JobDefinition
jobDefinition_timeout = (JobDefinition -> Maybe JobTimeout)
-> (JobDefinition -> Maybe JobTimeout -> JobDefinition)
-> Lens
JobDefinition JobDefinition (Maybe JobTimeout) (Maybe JobTimeout)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Maybe JobTimeout
timeout :: Maybe JobTimeout
$sel:timeout:JobDefinition' :: JobDefinition -> Maybe JobTimeout
timeout} -> Maybe JobTimeout
timeout) (\s :: JobDefinition
s@JobDefinition' {} Maybe JobTimeout
a -> JobDefinition
s {$sel:timeout:JobDefinition' :: Maybe JobTimeout
timeout = Maybe JobTimeout
a} :: JobDefinition)
jobDefinition_containerProperties :: Lens.Lens' JobDefinition (Prelude.Maybe ContainerProperties)
jobDefinition_containerProperties :: (Maybe ContainerProperties -> f (Maybe ContainerProperties))
-> JobDefinition -> f JobDefinition
jobDefinition_containerProperties = (JobDefinition -> Maybe ContainerProperties)
-> (JobDefinition -> Maybe ContainerProperties -> JobDefinition)
-> Lens
JobDefinition
JobDefinition
(Maybe ContainerProperties)
(Maybe ContainerProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Maybe ContainerProperties
containerProperties :: Maybe ContainerProperties
$sel:containerProperties:JobDefinition' :: JobDefinition -> Maybe ContainerProperties
containerProperties} -> Maybe ContainerProperties
containerProperties) (\s :: JobDefinition
s@JobDefinition' {} Maybe ContainerProperties
a -> JobDefinition
s {$sel:containerProperties:JobDefinition' :: Maybe ContainerProperties
containerProperties = Maybe ContainerProperties
a} :: JobDefinition)
jobDefinition_nodeProperties :: Lens.Lens' JobDefinition (Prelude.Maybe NodeProperties)
jobDefinition_nodeProperties :: (Maybe NodeProperties -> f (Maybe NodeProperties))
-> JobDefinition -> f JobDefinition
jobDefinition_nodeProperties = (JobDefinition -> Maybe NodeProperties)
-> (JobDefinition -> Maybe NodeProperties -> JobDefinition)
-> Lens
JobDefinition
JobDefinition
(Maybe NodeProperties)
(Maybe NodeProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Maybe NodeProperties
nodeProperties :: Maybe NodeProperties
$sel:nodeProperties:JobDefinition' :: JobDefinition -> Maybe NodeProperties
nodeProperties} -> Maybe NodeProperties
nodeProperties) (\s :: JobDefinition
s@JobDefinition' {} Maybe NodeProperties
a -> JobDefinition
s {$sel:nodeProperties:JobDefinition' :: Maybe NodeProperties
nodeProperties = Maybe NodeProperties
a} :: JobDefinition)
jobDefinition_tags :: Lens.Lens' JobDefinition (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
jobDefinition_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JobDefinition -> f JobDefinition
jobDefinition_tags = (JobDefinition -> Maybe (HashMap Text Text))
-> (JobDefinition -> Maybe (HashMap Text Text) -> JobDefinition)
-> Lens
JobDefinition
JobDefinition
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:JobDefinition' :: JobDefinition -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: JobDefinition
s@JobDefinition' {} Maybe (HashMap Text Text)
a -> JobDefinition
s {$sel:tags:JobDefinition' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: JobDefinition) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JobDefinition -> f JobDefinition)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> JobDefinition
-> f JobDefinition
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
jobDefinition_jobDefinitionName :: Lens.Lens' JobDefinition Prelude.Text
jobDefinition_jobDefinitionName :: (Text -> f Text) -> JobDefinition -> f JobDefinition
jobDefinition_jobDefinitionName = (JobDefinition -> Text)
-> (JobDefinition -> Text -> JobDefinition)
-> Lens JobDefinition JobDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Text
jobDefinitionName :: Text
$sel:jobDefinitionName:JobDefinition' :: JobDefinition -> Text
jobDefinitionName} -> Text
jobDefinitionName) (\s :: JobDefinition
s@JobDefinition' {} Text
a -> JobDefinition
s {$sel:jobDefinitionName:JobDefinition' :: Text
jobDefinitionName = Text
a} :: JobDefinition)
jobDefinition_jobDefinitionArn :: Lens.Lens' JobDefinition Prelude.Text
jobDefinition_jobDefinitionArn :: (Text -> f Text) -> JobDefinition -> f JobDefinition
jobDefinition_jobDefinitionArn = (JobDefinition -> Text)
-> (JobDefinition -> Text -> JobDefinition)
-> Lens JobDefinition JobDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Text
jobDefinitionArn :: Text
$sel:jobDefinitionArn:JobDefinition' :: JobDefinition -> Text
jobDefinitionArn} -> Text
jobDefinitionArn) (\s :: JobDefinition
s@JobDefinition' {} Text
a -> JobDefinition
s {$sel:jobDefinitionArn:JobDefinition' :: Text
jobDefinitionArn = Text
a} :: JobDefinition)
jobDefinition_revision :: Lens.Lens' JobDefinition Prelude.Int
jobDefinition_revision :: (Int -> f Int) -> JobDefinition -> f JobDefinition
jobDefinition_revision = (JobDefinition -> Int)
-> (JobDefinition -> Int -> JobDefinition)
-> Lens JobDefinition JobDefinition Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Int
revision :: Int
$sel:revision:JobDefinition' :: JobDefinition -> Int
revision} -> Int
revision) (\s :: JobDefinition
s@JobDefinition' {} Int
a -> JobDefinition
s {$sel:revision:JobDefinition' :: Int
revision = Int
a} :: JobDefinition)
jobDefinition_type :: Lens.Lens' JobDefinition Prelude.Text
jobDefinition_type :: (Text -> f Text) -> JobDefinition -> f JobDefinition
jobDefinition_type = (JobDefinition -> Text)
-> (JobDefinition -> Text -> JobDefinition)
-> Lens JobDefinition JobDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\JobDefinition' {Text
type' :: Text
$sel:type':JobDefinition' :: JobDefinition -> Text
type'} -> Text
type') (\s :: JobDefinition
s@JobDefinition' {} Text
a -> JobDefinition
s {$sel:type':JobDefinition' :: Text
type' = Text
a} :: JobDefinition)
instance Core.FromJSON JobDefinition where
parseJSON :: Value -> Parser JobDefinition
parseJSON =
String
-> (Object -> Parser JobDefinition)
-> Value
-> Parser JobDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"JobDefinition"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe RetryStrategy
-> Maybe [PlatformCapability]
-> Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition
JobDefinition'
(Maybe Text
-> Maybe Bool
-> Maybe RetryStrategy
-> Maybe [PlatformCapability]
-> Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe RetryStrategy
-> Maybe [PlatformCapability]
-> Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Bool
-> Maybe RetryStrategy
-> Maybe [PlatformCapability]
-> Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
-> Parser (Maybe Bool)
-> Parser
(Maybe RetryStrategy
-> Maybe [PlatformCapability]
-> Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"propagateTags")
Parser
(Maybe RetryStrategy
-> Maybe [PlatformCapability]
-> Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
-> Parser (Maybe RetryStrategy)
-> Parser
(Maybe [PlatformCapability]
-> Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RetryStrategy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"retryStrategy")
Parser
(Maybe [PlatformCapability]
-> Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
-> Parser (Maybe [PlatformCapability])
-> Parser
(Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [PlatformCapability]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"platformCapabilities"
Parser (Maybe (Maybe [PlatformCapability]))
-> Maybe [PlatformCapability]
-> Parser (Maybe [PlatformCapability])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [PlatformCapability]
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe (HashMap Text Text)
-> Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"parameters" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe JobTimeout
-> Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
-> Parser (Maybe JobTimeout)
-> Parser
(Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe JobTimeout)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timeout")
Parser
(Maybe ContainerProperties
-> Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
-> Parser (Maybe ContainerProperties)
-> Parser
(Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContainerProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"containerProperties")
Parser
(Maybe NodeProperties
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Int
-> Text
-> JobDefinition)
-> Parser (Maybe NodeProperties)
-> Parser
(Maybe (HashMap Text Text)
-> Text -> Text -> Int -> Text -> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NodeProperties)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"nodeProperties")
Parser
(Maybe (HashMap Text Text)
-> Text -> Text -> Int -> Text -> JobDefinition)
-> Parser (Maybe (HashMap Text Text))
-> Parser (Text -> Text -> Int -> Text -> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tags" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Parser (Text -> Text -> Int -> Text -> JobDefinition)
-> Parser Text -> Parser (Text -> Int -> Text -> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"jobDefinitionName")
Parser (Text -> Int -> Text -> JobDefinition)
-> Parser Text -> Parser (Int -> Text -> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"jobDefinitionArn")
Parser (Int -> Text -> JobDefinition)
-> Parser Int -> Parser (Text -> JobDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"revision")
Parser (Text -> JobDefinition)
-> Parser Text -> Parser JobDefinition
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"type")
)
instance Prelude.Hashable JobDefinition
instance Prelude.NFData JobDefinition