{-# 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.ActionTypeExecutor where
import Amazonka.CodePipeline.Types.ExecutorConfiguration
import Amazonka.CodePipeline.Types.ExecutorType
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 ActionTypeExecutor = ActionTypeExecutor'
{
ActionTypeExecutor -> Maybe Natural
jobTimeout :: Prelude.Maybe Prelude.Natural,
ActionTypeExecutor -> Maybe Text
policyStatementsTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeExecutor -> ExecutorConfiguration
configuration :: ExecutorConfiguration,
ActionTypeExecutor -> ExecutorType
type' :: ExecutorType
}
deriving (ActionTypeExecutor -> ActionTypeExecutor -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionTypeExecutor -> ActionTypeExecutor -> Bool
$c/= :: ActionTypeExecutor -> ActionTypeExecutor -> Bool
== :: ActionTypeExecutor -> ActionTypeExecutor -> Bool
$c== :: ActionTypeExecutor -> ActionTypeExecutor -> Bool
Prelude.Eq, ReadPrec [ActionTypeExecutor]
ReadPrec ActionTypeExecutor
Int -> ReadS ActionTypeExecutor
ReadS [ActionTypeExecutor]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionTypeExecutor]
$creadListPrec :: ReadPrec [ActionTypeExecutor]
readPrec :: ReadPrec ActionTypeExecutor
$creadPrec :: ReadPrec ActionTypeExecutor
readList :: ReadS [ActionTypeExecutor]
$creadList :: ReadS [ActionTypeExecutor]
readsPrec :: Int -> ReadS ActionTypeExecutor
$creadsPrec :: Int -> ReadS ActionTypeExecutor
Prelude.Read, Int -> ActionTypeExecutor -> ShowS
[ActionTypeExecutor] -> ShowS
ActionTypeExecutor -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionTypeExecutor] -> ShowS
$cshowList :: [ActionTypeExecutor] -> ShowS
show :: ActionTypeExecutor -> String
$cshow :: ActionTypeExecutor -> String
showsPrec :: Int -> ActionTypeExecutor -> ShowS
$cshowsPrec :: Int -> ActionTypeExecutor -> ShowS
Prelude.Show, forall x. Rep ActionTypeExecutor x -> ActionTypeExecutor
forall x. ActionTypeExecutor -> Rep ActionTypeExecutor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActionTypeExecutor x -> ActionTypeExecutor
$cfrom :: forall x. ActionTypeExecutor -> Rep ActionTypeExecutor x
Prelude.Generic)
newActionTypeExecutor ::
ExecutorConfiguration ->
ExecutorType ->
ActionTypeExecutor
newActionTypeExecutor :: ExecutorConfiguration -> ExecutorType -> ActionTypeExecutor
newActionTypeExecutor ExecutorConfiguration
pConfiguration_ ExecutorType
pType_ =
ActionTypeExecutor'
{ $sel:jobTimeout:ActionTypeExecutor' :: Maybe Natural
jobTimeout = forall a. Maybe a
Prelude.Nothing,
$sel:policyStatementsTemplate:ActionTypeExecutor' :: Maybe Text
policyStatementsTemplate = forall a. Maybe a
Prelude.Nothing,
$sel:configuration:ActionTypeExecutor' :: ExecutorConfiguration
configuration = ExecutorConfiguration
pConfiguration_,
$sel:type':ActionTypeExecutor' :: ExecutorType
type' = ExecutorType
pType_
}
actionTypeExecutor_jobTimeout :: Lens.Lens' ActionTypeExecutor (Prelude.Maybe Prelude.Natural)
actionTypeExecutor_jobTimeout :: Lens' ActionTypeExecutor (Maybe Natural)
actionTypeExecutor_jobTimeout = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeExecutor' {Maybe Natural
jobTimeout :: Maybe Natural
$sel:jobTimeout:ActionTypeExecutor' :: ActionTypeExecutor -> Maybe Natural
jobTimeout} -> Maybe Natural
jobTimeout) (\s :: ActionTypeExecutor
s@ActionTypeExecutor' {} Maybe Natural
a -> ActionTypeExecutor
s {$sel:jobTimeout:ActionTypeExecutor' :: Maybe Natural
jobTimeout = Maybe Natural
a} :: ActionTypeExecutor)
actionTypeExecutor_policyStatementsTemplate :: Lens.Lens' ActionTypeExecutor (Prelude.Maybe Prelude.Text)
actionTypeExecutor_policyStatementsTemplate :: Lens' ActionTypeExecutor (Maybe Text)
actionTypeExecutor_policyStatementsTemplate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeExecutor' {Maybe Text
policyStatementsTemplate :: Maybe Text
$sel:policyStatementsTemplate:ActionTypeExecutor' :: ActionTypeExecutor -> Maybe Text
policyStatementsTemplate} -> Maybe Text
policyStatementsTemplate) (\s :: ActionTypeExecutor
s@ActionTypeExecutor' {} Maybe Text
a -> ActionTypeExecutor
s {$sel:policyStatementsTemplate:ActionTypeExecutor' :: Maybe Text
policyStatementsTemplate = Maybe Text
a} :: ActionTypeExecutor)
actionTypeExecutor_configuration :: Lens.Lens' ActionTypeExecutor ExecutorConfiguration
actionTypeExecutor_configuration :: Lens' ActionTypeExecutor ExecutorConfiguration
actionTypeExecutor_configuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeExecutor' {ExecutorConfiguration
configuration :: ExecutorConfiguration
$sel:configuration:ActionTypeExecutor' :: ActionTypeExecutor -> ExecutorConfiguration
configuration} -> ExecutorConfiguration
configuration) (\s :: ActionTypeExecutor
s@ActionTypeExecutor' {} ExecutorConfiguration
a -> ActionTypeExecutor
s {$sel:configuration:ActionTypeExecutor' :: ExecutorConfiguration
configuration = ExecutorConfiguration
a} :: ActionTypeExecutor)
actionTypeExecutor_type :: Lens.Lens' ActionTypeExecutor ExecutorType
actionTypeExecutor_type :: Lens' ActionTypeExecutor ExecutorType
actionTypeExecutor_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeExecutor' {ExecutorType
type' :: ExecutorType
$sel:type':ActionTypeExecutor' :: ActionTypeExecutor -> ExecutorType
type'} -> ExecutorType
type') (\s :: ActionTypeExecutor
s@ActionTypeExecutor' {} ExecutorType
a -> ActionTypeExecutor
s {$sel:type':ActionTypeExecutor' :: ExecutorType
type' = ExecutorType
a} :: ActionTypeExecutor)
instance Data.FromJSON ActionTypeExecutor where
parseJSON :: Value -> Parser ActionTypeExecutor
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActionTypeExecutor"
( \Object
x ->
Maybe Natural
-> Maybe Text
-> ExecutorConfiguration
-> ExecutorType
-> ActionTypeExecutor
ActionTypeExecutor'
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
"jobTimeout")
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
"policyStatementsTemplate")
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
"configuration")
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
"type")
)
instance Prelude.Hashable ActionTypeExecutor where
hashWithSalt :: Int -> ActionTypeExecutor -> Int
hashWithSalt Int
_salt ActionTypeExecutor' {Maybe Natural
Maybe Text
ExecutorType
ExecutorConfiguration
type' :: ExecutorType
configuration :: ExecutorConfiguration
policyStatementsTemplate :: Maybe Text
jobTimeout :: Maybe Natural
$sel:type':ActionTypeExecutor' :: ActionTypeExecutor -> ExecutorType
$sel:configuration:ActionTypeExecutor' :: ActionTypeExecutor -> ExecutorConfiguration
$sel:policyStatementsTemplate:ActionTypeExecutor' :: ActionTypeExecutor -> Maybe Text
$sel:jobTimeout:ActionTypeExecutor' :: ActionTypeExecutor -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
jobTimeout
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
policyStatementsTemplate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ExecutorConfiguration
configuration
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ExecutorType
type'
instance Prelude.NFData ActionTypeExecutor where
rnf :: ActionTypeExecutor -> ()
rnf ActionTypeExecutor' {Maybe Natural
Maybe Text
ExecutorType
ExecutorConfiguration
type' :: ExecutorType
configuration :: ExecutorConfiguration
policyStatementsTemplate :: Maybe Text
jobTimeout :: Maybe Natural
$sel:type':ActionTypeExecutor' :: ActionTypeExecutor -> ExecutorType
$sel:configuration:ActionTypeExecutor' :: ActionTypeExecutor -> ExecutorConfiguration
$sel:policyStatementsTemplate:ActionTypeExecutor' :: ActionTypeExecutor -> Maybe Text
$sel:jobTimeout:ActionTypeExecutor' :: ActionTypeExecutor -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
jobTimeout
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
policyStatementsTemplate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ExecutorConfiguration
configuration
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ExecutorType
type'
instance Data.ToJSON ActionTypeExecutor where
toJSON :: ActionTypeExecutor -> Value
toJSON ActionTypeExecutor' {Maybe Natural
Maybe Text
ExecutorType
ExecutorConfiguration
type' :: ExecutorType
configuration :: ExecutorConfiguration
policyStatementsTemplate :: Maybe Text
jobTimeout :: Maybe Natural
$sel:type':ActionTypeExecutor' :: ActionTypeExecutor -> ExecutorType
$sel:configuration:ActionTypeExecutor' :: ActionTypeExecutor -> ExecutorConfiguration
$sel:policyStatementsTemplate:ActionTypeExecutor' :: ActionTypeExecutor -> Maybe Text
$sel:jobTimeout:ActionTypeExecutor' :: ActionTypeExecutor -> Maybe Natural
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"jobTimeout" 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 Natural
jobTimeout,
(Key
"policyStatementsTemplate" 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
policyStatementsTemplate,
forall a. a -> Maybe a
Prelude.Just (Key
"configuration" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ExecutorConfiguration
configuration),
forall a. a -> Maybe a
Prelude.Just (Key
"type" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ExecutorType
type')
]
)