{-# 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.CodePipeline.Types.ActionType where
import Amazonka.CodePipeline.Types.ActionConfigurationProperty
import Amazonka.CodePipeline.Types.ActionTypeId
import Amazonka.CodePipeline.Types.ActionTypeSettings
import Amazonka.CodePipeline.Types.ArtifactDetails
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 ActionType = ActionType'
{
ActionType -> Maybe [ActionConfigurationProperty]
actionConfigurationProperties :: Prelude.Maybe [ActionConfigurationProperty],
ActionType -> Maybe ActionTypeSettings
settings :: Prelude.Maybe ActionTypeSettings,
ActionType -> ActionTypeId
id :: ActionTypeId,
ActionType -> ArtifactDetails
inputArtifactDetails :: ArtifactDetails,
ActionType -> ArtifactDetails
outputArtifactDetails :: ArtifactDetails
}
deriving (ActionType -> ActionType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionType -> ActionType -> Bool
$c/= :: ActionType -> ActionType -> Bool
== :: ActionType -> ActionType -> Bool
$c== :: ActionType -> ActionType -> Bool
Prelude.Eq, ReadPrec [ActionType]
ReadPrec ActionType
Int -> ReadS ActionType
ReadS [ActionType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionType]
$creadListPrec :: ReadPrec [ActionType]
readPrec :: ReadPrec ActionType
$creadPrec :: ReadPrec ActionType
readList :: ReadS [ActionType]
$creadList :: ReadS [ActionType]
readsPrec :: Int -> ReadS ActionType
$creadsPrec :: Int -> ReadS ActionType
Prelude.Read, Int -> ActionType -> ShowS
[ActionType] -> ShowS
ActionType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionType] -> ShowS
$cshowList :: [ActionType] -> ShowS
show :: ActionType -> String
$cshow :: ActionType -> String
showsPrec :: Int -> ActionType -> ShowS
$cshowsPrec :: Int -> ActionType -> ShowS
Prelude.Show, forall x. Rep ActionType x -> ActionType
forall x. ActionType -> Rep ActionType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActionType x -> ActionType
$cfrom :: forall x. ActionType -> Rep ActionType x
Prelude.Generic)
newActionType ::
ActionTypeId ->
ArtifactDetails ->
ArtifactDetails ->
ActionType
newActionType :: ActionTypeId -> ArtifactDetails -> ArtifactDetails -> ActionType
newActionType
ActionTypeId
pId_
ArtifactDetails
pInputArtifactDetails_
ArtifactDetails
pOutputArtifactDetails_ =
ActionType'
{ $sel:actionConfigurationProperties:ActionType' :: Maybe [ActionConfigurationProperty]
actionConfigurationProperties =
forall a. Maybe a
Prelude.Nothing,
$sel:settings:ActionType' :: Maybe ActionTypeSettings
settings = forall a. Maybe a
Prelude.Nothing,
$sel:id:ActionType' :: ActionTypeId
id = ActionTypeId
pId_,
$sel:inputArtifactDetails:ActionType' :: ArtifactDetails
inputArtifactDetails = ArtifactDetails
pInputArtifactDetails_,
$sel:outputArtifactDetails:ActionType' :: ArtifactDetails
outputArtifactDetails = ArtifactDetails
pOutputArtifactDetails_
}
actionType_actionConfigurationProperties :: Lens.Lens' ActionType (Prelude.Maybe [ActionConfigurationProperty])
actionType_actionConfigurationProperties :: Lens' ActionType (Maybe [ActionConfigurationProperty])
actionType_actionConfigurationProperties = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionType' {Maybe [ActionConfigurationProperty]
actionConfigurationProperties :: Maybe [ActionConfigurationProperty]
$sel:actionConfigurationProperties:ActionType' :: ActionType -> Maybe [ActionConfigurationProperty]
actionConfigurationProperties} -> Maybe [ActionConfigurationProperty]
actionConfigurationProperties) (\s :: ActionType
s@ActionType' {} Maybe [ActionConfigurationProperty]
a -> ActionType
s {$sel:actionConfigurationProperties:ActionType' :: Maybe [ActionConfigurationProperty]
actionConfigurationProperties = Maybe [ActionConfigurationProperty]
a} :: ActionType) 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
actionType_settings :: Lens.Lens' ActionType (Prelude.Maybe ActionTypeSettings)
actionType_settings :: Lens' ActionType (Maybe ActionTypeSettings)
actionType_settings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionType' {Maybe ActionTypeSettings
settings :: Maybe ActionTypeSettings
$sel:settings:ActionType' :: ActionType -> Maybe ActionTypeSettings
settings} -> Maybe ActionTypeSettings
settings) (\s :: ActionType
s@ActionType' {} Maybe ActionTypeSettings
a -> ActionType
s {$sel:settings:ActionType' :: Maybe ActionTypeSettings
settings = Maybe ActionTypeSettings
a} :: ActionType)
actionType_id :: Lens.Lens' ActionType ActionTypeId
actionType_id :: Lens' ActionType ActionTypeId
actionType_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionType' {ActionTypeId
id :: ActionTypeId
$sel:id:ActionType' :: ActionType -> ActionTypeId
id} -> ActionTypeId
id) (\s :: ActionType
s@ActionType' {} ActionTypeId
a -> ActionType
s {$sel:id:ActionType' :: ActionTypeId
id = ActionTypeId
a} :: ActionType)
actionType_inputArtifactDetails :: Lens.Lens' ActionType ArtifactDetails
actionType_inputArtifactDetails :: Lens' ActionType ArtifactDetails
actionType_inputArtifactDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionType' {ArtifactDetails
inputArtifactDetails :: ArtifactDetails
$sel:inputArtifactDetails:ActionType' :: ActionType -> ArtifactDetails
inputArtifactDetails} -> ArtifactDetails
inputArtifactDetails) (\s :: ActionType
s@ActionType' {} ArtifactDetails
a -> ActionType
s {$sel:inputArtifactDetails:ActionType' :: ArtifactDetails
inputArtifactDetails = ArtifactDetails
a} :: ActionType)
actionType_outputArtifactDetails :: Lens.Lens' ActionType ArtifactDetails
actionType_outputArtifactDetails :: Lens' ActionType ArtifactDetails
actionType_outputArtifactDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionType' {ArtifactDetails
outputArtifactDetails :: ArtifactDetails
$sel:outputArtifactDetails:ActionType' :: ActionType -> ArtifactDetails
outputArtifactDetails} -> ArtifactDetails
outputArtifactDetails) (\s :: ActionType
s@ActionType' {} ArtifactDetails
a -> ActionType
s {$sel:outputArtifactDetails:ActionType' :: ArtifactDetails
outputArtifactDetails = ArtifactDetails
a} :: ActionType)
instance Data.FromJSON ActionType where
parseJSON :: Value -> Parser ActionType
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActionType"
( \Object
x ->
Maybe [ActionConfigurationProperty]
-> Maybe ActionTypeSettings
-> ActionTypeId
-> ArtifactDetails
-> ArtifactDetails
-> ActionType
ActionType'
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
"actionConfigurationProperties"
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
"settings")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"inputArtifactDetails")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"outputArtifactDetails")
)
instance Prelude.Hashable ActionType where
hashWithSalt :: Int -> ActionType -> Int
hashWithSalt Int
_salt ActionType' {Maybe [ActionConfigurationProperty]
Maybe ActionTypeSettings
ActionTypeId
ArtifactDetails
outputArtifactDetails :: ArtifactDetails
inputArtifactDetails :: ArtifactDetails
id :: ActionTypeId
settings :: Maybe ActionTypeSettings
actionConfigurationProperties :: Maybe [ActionConfigurationProperty]
$sel:outputArtifactDetails:ActionType' :: ActionType -> ArtifactDetails
$sel:inputArtifactDetails:ActionType' :: ActionType -> ArtifactDetails
$sel:id:ActionType' :: ActionType -> ActionTypeId
$sel:settings:ActionType' :: ActionType -> Maybe ActionTypeSettings
$sel:actionConfigurationProperties:ActionType' :: ActionType -> Maybe [ActionConfigurationProperty]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ActionConfigurationProperty]
actionConfigurationProperties
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ActionTypeSettings
settings
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ActionTypeId
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ArtifactDetails
inputArtifactDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ArtifactDetails
outputArtifactDetails
instance Prelude.NFData ActionType where
rnf :: ActionType -> ()
rnf ActionType' {Maybe [ActionConfigurationProperty]
Maybe ActionTypeSettings
ActionTypeId
ArtifactDetails
outputArtifactDetails :: ArtifactDetails
inputArtifactDetails :: ArtifactDetails
id :: ActionTypeId
settings :: Maybe ActionTypeSettings
actionConfigurationProperties :: Maybe [ActionConfigurationProperty]
$sel:outputArtifactDetails:ActionType' :: ActionType -> ArtifactDetails
$sel:inputArtifactDetails:ActionType' :: ActionType -> ArtifactDetails
$sel:id:ActionType' :: ActionType -> ActionTypeId
$sel:settings:ActionType' :: ActionType -> Maybe ActionTypeSettings
$sel:actionConfigurationProperties:ActionType' :: ActionType -> Maybe [ActionConfigurationProperty]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [ActionConfigurationProperty]
actionConfigurationProperties
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ActionTypeSettings
settings
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ActionTypeId
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ArtifactDetails
inputArtifactDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ArtifactDetails
outputArtifactDetails