{-# 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.CodeDeploy.Types.DeploymentTarget where
import Amazonka.CodeDeploy.Types.CloudFormationTarget
import Amazonka.CodeDeploy.Types.DeploymentTargetType
import Amazonka.CodeDeploy.Types.ECSTarget
import Amazonka.CodeDeploy.Types.InstanceTarget
import Amazonka.CodeDeploy.Types.LambdaTarget
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 DeploymentTarget = DeploymentTarget'
{ DeploymentTarget -> Maybe CloudFormationTarget
cloudFormationTarget :: Prelude.Maybe CloudFormationTarget,
DeploymentTarget -> Maybe DeploymentTargetType
deploymentTargetType :: Prelude.Maybe DeploymentTargetType,
DeploymentTarget -> Maybe ECSTarget
ecsTarget :: Prelude.Maybe ECSTarget,
DeploymentTarget -> Maybe InstanceTarget
instanceTarget :: Prelude.Maybe InstanceTarget,
DeploymentTarget -> Maybe LambdaTarget
lambdaTarget :: Prelude.Maybe LambdaTarget
}
deriving (DeploymentTarget -> DeploymentTarget -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeploymentTarget -> DeploymentTarget -> Bool
$c/= :: DeploymentTarget -> DeploymentTarget -> Bool
== :: DeploymentTarget -> DeploymentTarget -> Bool
$c== :: DeploymentTarget -> DeploymentTarget -> Bool
Prelude.Eq, ReadPrec [DeploymentTarget]
ReadPrec DeploymentTarget
Int -> ReadS DeploymentTarget
ReadS [DeploymentTarget]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeploymentTarget]
$creadListPrec :: ReadPrec [DeploymentTarget]
readPrec :: ReadPrec DeploymentTarget
$creadPrec :: ReadPrec DeploymentTarget
readList :: ReadS [DeploymentTarget]
$creadList :: ReadS [DeploymentTarget]
readsPrec :: Int -> ReadS DeploymentTarget
$creadsPrec :: Int -> ReadS DeploymentTarget
Prelude.Read, Int -> DeploymentTarget -> ShowS
[DeploymentTarget] -> ShowS
DeploymentTarget -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeploymentTarget] -> ShowS
$cshowList :: [DeploymentTarget] -> ShowS
show :: DeploymentTarget -> String
$cshow :: DeploymentTarget -> String
showsPrec :: Int -> DeploymentTarget -> ShowS
$cshowsPrec :: Int -> DeploymentTarget -> ShowS
Prelude.Show, forall x. Rep DeploymentTarget x -> DeploymentTarget
forall x. DeploymentTarget -> Rep DeploymentTarget x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeploymentTarget x -> DeploymentTarget
$cfrom :: forall x. DeploymentTarget -> Rep DeploymentTarget x
Prelude.Generic)
newDeploymentTarget ::
DeploymentTarget
newDeploymentTarget :: DeploymentTarget
newDeploymentTarget =
DeploymentTarget'
{ $sel:cloudFormationTarget:DeploymentTarget' :: Maybe CloudFormationTarget
cloudFormationTarget =
forall a. Maybe a
Prelude.Nothing,
$sel:deploymentTargetType:DeploymentTarget' :: Maybe DeploymentTargetType
deploymentTargetType = forall a. Maybe a
Prelude.Nothing,
$sel:ecsTarget:DeploymentTarget' :: Maybe ECSTarget
ecsTarget = forall a. Maybe a
Prelude.Nothing,
$sel:instanceTarget:DeploymentTarget' :: Maybe InstanceTarget
instanceTarget = forall a. Maybe a
Prelude.Nothing,
$sel:lambdaTarget:DeploymentTarget' :: Maybe LambdaTarget
lambdaTarget = forall a. Maybe a
Prelude.Nothing
}
deploymentTarget_cloudFormationTarget :: Lens.Lens' DeploymentTarget (Prelude.Maybe CloudFormationTarget)
deploymentTarget_cloudFormationTarget :: Lens' DeploymentTarget (Maybe CloudFormationTarget)
deploymentTarget_cloudFormationTarget = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentTarget' {Maybe CloudFormationTarget
cloudFormationTarget :: Maybe CloudFormationTarget
$sel:cloudFormationTarget:DeploymentTarget' :: DeploymentTarget -> Maybe CloudFormationTarget
cloudFormationTarget} -> Maybe CloudFormationTarget
cloudFormationTarget) (\s :: DeploymentTarget
s@DeploymentTarget' {} Maybe CloudFormationTarget
a -> DeploymentTarget
s {$sel:cloudFormationTarget:DeploymentTarget' :: Maybe CloudFormationTarget
cloudFormationTarget = Maybe CloudFormationTarget
a} :: DeploymentTarget)
deploymentTarget_deploymentTargetType :: Lens.Lens' DeploymentTarget (Prelude.Maybe DeploymentTargetType)
deploymentTarget_deploymentTargetType :: Lens' DeploymentTarget (Maybe DeploymentTargetType)
deploymentTarget_deploymentTargetType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentTarget' {Maybe DeploymentTargetType
deploymentTargetType :: Maybe DeploymentTargetType
$sel:deploymentTargetType:DeploymentTarget' :: DeploymentTarget -> Maybe DeploymentTargetType
deploymentTargetType} -> Maybe DeploymentTargetType
deploymentTargetType) (\s :: DeploymentTarget
s@DeploymentTarget' {} Maybe DeploymentTargetType
a -> DeploymentTarget
s {$sel:deploymentTargetType:DeploymentTarget' :: Maybe DeploymentTargetType
deploymentTargetType = Maybe DeploymentTargetType
a} :: DeploymentTarget)
deploymentTarget_ecsTarget :: Lens.Lens' DeploymentTarget (Prelude.Maybe ECSTarget)
deploymentTarget_ecsTarget :: Lens' DeploymentTarget (Maybe ECSTarget)
deploymentTarget_ecsTarget = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentTarget' {Maybe ECSTarget
ecsTarget :: Maybe ECSTarget
$sel:ecsTarget:DeploymentTarget' :: DeploymentTarget -> Maybe ECSTarget
ecsTarget} -> Maybe ECSTarget
ecsTarget) (\s :: DeploymentTarget
s@DeploymentTarget' {} Maybe ECSTarget
a -> DeploymentTarget
s {$sel:ecsTarget:DeploymentTarget' :: Maybe ECSTarget
ecsTarget = Maybe ECSTarget
a} :: DeploymentTarget)
deploymentTarget_instanceTarget :: Lens.Lens' DeploymentTarget (Prelude.Maybe InstanceTarget)
deploymentTarget_instanceTarget :: Lens' DeploymentTarget (Maybe InstanceTarget)
deploymentTarget_instanceTarget = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentTarget' {Maybe InstanceTarget
instanceTarget :: Maybe InstanceTarget
$sel:instanceTarget:DeploymentTarget' :: DeploymentTarget -> Maybe InstanceTarget
instanceTarget} -> Maybe InstanceTarget
instanceTarget) (\s :: DeploymentTarget
s@DeploymentTarget' {} Maybe InstanceTarget
a -> DeploymentTarget
s {$sel:instanceTarget:DeploymentTarget' :: Maybe InstanceTarget
instanceTarget = Maybe InstanceTarget
a} :: DeploymentTarget)
deploymentTarget_lambdaTarget :: Lens.Lens' DeploymentTarget (Prelude.Maybe LambdaTarget)
deploymentTarget_lambdaTarget :: Lens' DeploymentTarget (Maybe LambdaTarget)
deploymentTarget_lambdaTarget = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeploymentTarget' {Maybe LambdaTarget
lambdaTarget :: Maybe LambdaTarget
$sel:lambdaTarget:DeploymentTarget' :: DeploymentTarget -> Maybe LambdaTarget
lambdaTarget} -> Maybe LambdaTarget
lambdaTarget) (\s :: DeploymentTarget
s@DeploymentTarget' {} Maybe LambdaTarget
a -> DeploymentTarget
s {$sel:lambdaTarget:DeploymentTarget' :: Maybe LambdaTarget
lambdaTarget = Maybe LambdaTarget
a} :: DeploymentTarget)
instance Data.FromJSON DeploymentTarget where
parseJSON :: Value -> Parser DeploymentTarget
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DeploymentTarget"
( \Object
x ->
Maybe CloudFormationTarget
-> Maybe DeploymentTargetType
-> Maybe ECSTarget
-> Maybe InstanceTarget
-> Maybe LambdaTarget
-> DeploymentTarget
DeploymentTarget'
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
"cloudFormationTarget")
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
"deploymentTargetType")
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
"ecsTarget")
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
"instanceTarget")
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
"lambdaTarget")
)
instance Prelude.Hashable DeploymentTarget where
hashWithSalt :: Int -> DeploymentTarget -> Int
hashWithSalt Int
_salt DeploymentTarget' {Maybe DeploymentTargetType
Maybe LambdaTarget
Maybe InstanceTarget
Maybe ECSTarget
Maybe CloudFormationTarget
lambdaTarget :: Maybe LambdaTarget
instanceTarget :: Maybe InstanceTarget
ecsTarget :: Maybe ECSTarget
deploymentTargetType :: Maybe DeploymentTargetType
cloudFormationTarget :: Maybe CloudFormationTarget
$sel:lambdaTarget:DeploymentTarget' :: DeploymentTarget -> Maybe LambdaTarget
$sel:instanceTarget:DeploymentTarget' :: DeploymentTarget -> Maybe InstanceTarget
$sel:ecsTarget:DeploymentTarget' :: DeploymentTarget -> Maybe ECSTarget
$sel:deploymentTargetType:DeploymentTarget' :: DeploymentTarget -> Maybe DeploymentTargetType
$sel:cloudFormationTarget:DeploymentTarget' :: DeploymentTarget -> Maybe CloudFormationTarget
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CloudFormationTarget
cloudFormationTarget
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeploymentTargetType
deploymentTargetType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ECSTarget
ecsTarget
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe InstanceTarget
instanceTarget
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LambdaTarget
lambdaTarget
instance Prelude.NFData DeploymentTarget where
rnf :: DeploymentTarget -> ()
rnf DeploymentTarget' {Maybe DeploymentTargetType
Maybe LambdaTarget
Maybe InstanceTarget
Maybe ECSTarget
Maybe CloudFormationTarget
lambdaTarget :: Maybe LambdaTarget
instanceTarget :: Maybe InstanceTarget
ecsTarget :: Maybe ECSTarget
deploymentTargetType :: Maybe DeploymentTargetType
cloudFormationTarget :: Maybe CloudFormationTarget
$sel:lambdaTarget:DeploymentTarget' :: DeploymentTarget -> Maybe LambdaTarget
$sel:instanceTarget:DeploymentTarget' :: DeploymentTarget -> Maybe InstanceTarget
$sel:ecsTarget:DeploymentTarget' :: DeploymentTarget -> Maybe ECSTarget
$sel:deploymentTargetType:DeploymentTarget' :: DeploymentTarget -> Maybe DeploymentTargetType
$sel:cloudFormationTarget:DeploymentTarget' :: DeploymentTarget -> Maybe CloudFormationTarget
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe CloudFormationTarget
cloudFormationTarget
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DeploymentTargetType
deploymentTargetType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ECSTarget
ecsTarget
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceTarget
instanceTarget
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LambdaTarget
lambdaTarget