{-# 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.MigrationHubOrchestrator.Types.WorkflowStepAutomationConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MigrationHubOrchestrator.Types.PlatformCommand
import Amazonka.MigrationHubOrchestrator.Types.PlatformScriptKey
import Amazonka.MigrationHubOrchestrator.Types.RunEnvironment
import Amazonka.MigrationHubOrchestrator.Types.TargetType
import qualified Amazonka.Prelude as Prelude
data WorkflowStepAutomationConfiguration = WorkflowStepAutomationConfiguration'
{
WorkflowStepAutomationConfiguration -> Maybe PlatformCommand
command :: Prelude.Maybe PlatformCommand,
WorkflowStepAutomationConfiguration -> Maybe RunEnvironment
runEnvironment :: Prelude.Maybe RunEnvironment,
WorkflowStepAutomationConfiguration -> Maybe Text
scriptLocationS3Bucket :: Prelude.Maybe Prelude.Text,
WorkflowStepAutomationConfiguration -> Maybe PlatformScriptKey
scriptLocationS3Key :: Prelude.Maybe PlatformScriptKey,
WorkflowStepAutomationConfiguration -> Maybe TargetType
targetType :: Prelude.Maybe TargetType
}
deriving (WorkflowStepAutomationConfiguration
-> WorkflowStepAutomationConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowStepAutomationConfiguration
-> WorkflowStepAutomationConfiguration -> Bool
$c/= :: WorkflowStepAutomationConfiguration
-> WorkflowStepAutomationConfiguration -> Bool
== :: WorkflowStepAutomationConfiguration
-> WorkflowStepAutomationConfiguration -> Bool
$c== :: WorkflowStepAutomationConfiguration
-> WorkflowStepAutomationConfiguration -> Bool
Prelude.Eq, ReadPrec [WorkflowStepAutomationConfiguration]
ReadPrec WorkflowStepAutomationConfiguration
Int -> ReadS WorkflowStepAutomationConfiguration
ReadS [WorkflowStepAutomationConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowStepAutomationConfiguration]
$creadListPrec :: ReadPrec [WorkflowStepAutomationConfiguration]
readPrec :: ReadPrec WorkflowStepAutomationConfiguration
$creadPrec :: ReadPrec WorkflowStepAutomationConfiguration
readList :: ReadS [WorkflowStepAutomationConfiguration]
$creadList :: ReadS [WorkflowStepAutomationConfiguration]
readsPrec :: Int -> ReadS WorkflowStepAutomationConfiguration
$creadsPrec :: Int -> ReadS WorkflowStepAutomationConfiguration
Prelude.Read, Int -> WorkflowStepAutomationConfiguration -> ShowS
[WorkflowStepAutomationConfiguration] -> ShowS
WorkflowStepAutomationConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowStepAutomationConfiguration] -> ShowS
$cshowList :: [WorkflowStepAutomationConfiguration] -> ShowS
show :: WorkflowStepAutomationConfiguration -> String
$cshow :: WorkflowStepAutomationConfiguration -> String
showsPrec :: Int -> WorkflowStepAutomationConfiguration -> ShowS
$cshowsPrec :: Int -> WorkflowStepAutomationConfiguration -> ShowS
Prelude.Show, forall x.
Rep WorkflowStepAutomationConfiguration x
-> WorkflowStepAutomationConfiguration
forall x.
WorkflowStepAutomationConfiguration
-> Rep WorkflowStepAutomationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkflowStepAutomationConfiguration x
-> WorkflowStepAutomationConfiguration
$cfrom :: forall x.
WorkflowStepAutomationConfiguration
-> Rep WorkflowStepAutomationConfiguration x
Prelude.Generic)
newWorkflowStepAutomationConfiguration ::
WorkflowStepAutomationConfiguration
newWorkflowStepAutomationConfiguration :: WorkflowStepAutomationConfiguration
newWorkflowStepAutomationConfiguration =
WorkflowStepAutomationConfiguration'
{ $sel:command:WorkflowStepAutomationConfiguration' :: Maybe PlatformCommand
command =
forall a. Maybe a
Prelude.Nothing,
$sel:runEnvironment:WorkflowStepAutomationConfiguration' :: Maybe RunEnvironment
runEnvironment = forall a. Maybe a
Prelude.Nothing,
$sel:scriptLocationS3Bucket:WorkflowStepAutomationConfiguration' :: Maybe Text
scriptLocationS3Bucket =
forall a. Maybe a
Prelude.Nothing,
$sel:scriptLocationS3Key:WorkflowStepAutomationConfiguration' :: Maybe PlatformScriptKey
scriptLocationS3Key = forall a. Maybe a
Prelude.Nothing,
$sel:targetType:WorkflowStepAutomationConfiguration' :: Maybe TargetType
targetType = forall a. Maybe a
Prelude.Nothing
}
workflowStepAutomationConfiguration_command :: Lens.Lens' WorkflowStepAutomationConfiguration (Prelude.Maybe PlatformCommand)
workflowStepAutomationConfiguration_command :: Lens' WorkflowStepAutomationConfiguration (Maybe PlatformCommand)
workflowStepAutomationConfiguration_command = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowStepAutomationConfiguration' {Maybe PlatformCommand
command :: Maybe PlatformCommand
$sel:command:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe PlatformCommand
command} -> Maybe PlatformCommand
command) (\s :: WorkflowStepAutomationConfiguration
s@WorkflowStepAutomationConfiguration' {} Maybe PlatformCommand
a -> WorkflowStepAutomationConfiguration
s {$sel:command:WorkflowStepAutomationConfiguration' :: Maybe PlatformCommand
command = Maybe PlatformCommand
a} :: WorkflowStepAutomationConfiguration)
workflowStepAutomationConfiguration_runEnvironment :: Lens.Lens' WorkflowStepAutomationConfiguration (Prelude.Maybe RunEnvironment)
workflowStepAutomationConfiguration_runEnvironment :: Lens' WorkflowStepAutomationConfiguration (Maybe RunEnvironment)
workflowStepAutomationConfiguration_runEnvironment = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowStepAutomationConfiguration' {Maybe RunEnvironment
runEnvironment :: Maybe RunEnvironment
$sel:runEnvironment:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe RunEnvironment
runEnvironment} -> Maybe RunEnvironment
runEnvironment) (\s :: WorkflowStepAutomationConfiguration
s@WorkflowStepAutomationConfiguration' {} Maybe RunEnvironment
a -> WorkflowStepAutomationConfiguration
s {$sel:runEnvironment:WorkflowStepAutomationConfiguration' :: Maybe RunEnvironment
runEnvironment = Maybe RunEnvironment
a} :: WorkflowStepAutomationConfiguration)
workflowStepAutomationConfiguration_scriptLocationS3Bucket :: Lens.Lens' WorkflowStepAutomationConfiguration (Prelude.Maybe Prelude.Text)
workflowStepAutomationConfiguration_scriptLocationS3Bucket :: Lens' WorkflowStepAutomationConfiguration (Maybe Text)
workflowStepAutomationConfiguration_scriptLocationS3Bucket = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowStepAutomationConfiguration' {Maybe Text
scriptLocationS3Bucket :: Maybe Text
$sel:scriptLocationS3Bucket:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe Text
scriptLocationS3Bucket} -> Maybe Text
scriptLocationS3Bucket) (\s :: WorkflowStepAutomationConfiguration
s@WorkflowStepAutomationConfiguration' {} Maybe Text
a -> WorkflowStepAutomationConfiguration
s {$sel:scriptLocationS3Bucket:WorkflowStepAutomationConfiguration' :: Maybe Text
scriptLocationS3Bucket = Maybe Text
a} :: WorkflowStepAutomationConfiguration)
workflowStepAutomationConfiguration_scriptLocationS3Key :: Lens.Lens' WorkflowStepAutomationConfiguration (Prelude.Maybe PlatformScriptKey)
workflowStepAutomationConfiguration_scriptLocationS3Key :: Lens' WorkflowStepAutomationConfiguration (Maybe PlatformScriptKey)
workflowStepAutomationConfiguration_scriptLocationS3Key = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowStepAutomationConfiguration' {Maybe PlatformScriptKey
scriptLocationS3Key :: Maybe PlatformScriptKey
$sel:scriptLocationS3Key:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe PlatformScriptKey
scriptLocationS3Key} -> Maybe PlatformScriptKey
scriptLocationS3Key) (\s :: WorkflowStepAutomationConfiguration
s@WorkflowStepAutomationConfiguration' {} Maybe PlatformScriptKey
a -> WorkflowStepAutomationConfiguration
s {$sel:scriptLocationS3Key:WorkflowStepAutomationConfiguration' :: Maybe PlatformScriptKey
scriptLocationS3Key = Maybe PlatformScriptKey
a} :: WorkflowStepAutomationConfiguration)
workflowStepAutomationConfiguration_targetType :: Lens.Lens' WorkflowStepAutomationConfiguration (Prelude.Maybe TargetType)
workflowStepAutomationConfiguration_targetType :: Lens' WorkflowStepAutomationConfiguration (Maybe TargetType)
workflowStepAutomationConfiguration_targetType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowStepAutomationConfiguration' {Maybe TargetType
targetType :: Maybe TargetType
$sel:targetType:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe TargetType
targetType} -> Maybe TargetType
targetType) (\s :: WorkflowStepAutomationConfiguration
s@WorkflowStepAutomationConfiguration' {} Maybe TargetType
a -> WorkflowStepAutomationConfiguration
s {$sel:targetType:WorkflowStepAutomationConfiguration' :: Maybe TargetType
targetType = Maybe TargetType
a} :: WorkflowStepAutomationConfiguration)
instance
Data.FromJSON
WorkflowStepAutomationConfiguration
where
parseJSON :: Value -> Parser WorkflowStepAutomationConfiguration
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WorkflowStepAutomationConfiguration"
( \Object
x ->
Maybe PlatformCommand
-> Maybe RunEnvironment
-> Maybe Text
-> Maybe PlatformScriptKey
-> Maybe TargetType
-> WorkflowStepAutomationConfiguration
WorkflowStepAutomationConfiguration'
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
"command")
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
"runEnvironment")
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
"scriptLocationS3Bucket")
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
"scriptLocationS3Key")
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
"targetType")
)
instance
Prelude.Hashable
WorkflowStepAutomationConfiguration
where
hashWithSalt :: Int -> WorkflowStepAutomationConfiguration -> Int
hashWithSalt
Int
_salt
WorkflowStepAutomationConfiguration' {Maybe Text
Maybe PlatformCommand
Maybe PlatformScriptKey
Maybe RunEnvironment
Maybe TargetType
targetType :: Maybe TargetType
scriptLocationS3Key :: Maybe PlatformScriptKey
scriptLocationS3Bucket :: Maybe Text
runEnvironment :: Maybe RunEnvironment
command :: Maybe PlatformCommand
$sel:targetType:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe TargetType
$sel:scriptLocationS3Key:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe PlatformScriptKey
$sel:scriptLocationS3Bucket:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe Text
$sel:runEnvironment:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe RunEnvironment
$sel:command:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe PlatformCommand
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PlatformCommand
command
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RunEnvironment
runEnvironment
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
scriptLocationS3Bucket
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PlatformScriptKey
scriptLocationS3Key
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TargetType
targetType
instance
Prelude.NFData
WorkflowStepAutomationConfiguration
where
rnf :: WorkflowStepAutomationConfiguration -> ()
rnf WorkflowStepAutomationConfiguration' {Maybe Text
Maybe PlatformCommand
Maybe PlatformScriptKey
Maybe RunEnvironment
Maybe TargetType
targetType :: Maybe TargetType
scriptLocationS3Key :: Maybe PlatformScriptKey
scriptLocationS3Bucket :: Maybe Text
runEnvironment :: Maybe RunEnvironment
command :: Maybe PlatformCommand
$sel:targetType:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe TargetType
$sel:scriptLocationS3Key:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe PlatformScriptKey
$sel:scriptLocationS3Bucket:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe Text
$sel:runEnvironment:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe RunEnvironment
$sel:command:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe PlatformCommand
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe PlatformCommand
command
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RunEnvironment
runEnvironment
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
scriptLocationS3Bucket
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PlatformScriptKey
scriptLocationS3Key
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TargetType
targetType
instance
Data.ToJSON
WorkflowStepAutomationConfiguration
where
toJSON :: WorkflowStepAutomationConfiguration -> Value
toJSON WorkflowStepAutomationConfiguration' {Maybe Text
Maybe PlatformCommand
Maybe PlatformScriptKey
Maybe RunEnvironment
Maybe TargetType
targetType :: Maybe TargetType
scriptLocationS3Key :: Maybe PlatformScriptKey
scriptLocationS3Bucket :: Maybe Text
runEnvironment :: Maybe RunEnvironment
command :: Maybe PlatformCommand
$sel:targetType:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe TargetType
$sel:scriptLocationS3Key:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe PlatformScriptKey
$sel:scriptLocationS3Bucket:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe Text
$sel:runEnvironment:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe RunEnvironment
$sel:command:WorkflowStepAutomationConfiguration' :: WorkflowStepAutomationConfiguration -> Maybe PlatformCommand
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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 PlatformCommand
command,
(Key
"runEnvironment" 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 RunEnvironment
runEnvironment,
(Key
"scriptLocationS3Bucket" 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
scriptLocationS3Bucket,
(Key
"scriptLocationS3Key" 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 PlatformScriptKey
scriptLocationS3Key,
(Key
"targetType" 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 TargetType
targetType
]
)