{-# 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.ActionTypeSettings where
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 ActionTypeSettings = ActionTypeSettings'
{
ActionTypeSettings -> Maybe Text
entityUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeSettings -> Maybe Text
executionUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeSettings -> Maybe Text
revisionUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeSettings -> Maybe Text
thirdPartyConfigurationUrl :: Prelude.Maybe Prelude.Text
}
deriving (ActionTypeSettings -> ActionTypeSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionTypeSettings -> ActionTypeSettings -> Bool
$c/= :: ActionTypeSettings -> ActionTypeSettings -> Bool
== :: ActionTypeSettings -> ActionTypeSettings -> Bool
$c== :: ActionTypeSettings -> ActionTypeSettings -> Bool
Prelude.Eq, ReadPrec [ActionTypeSettings]
ReadPrec ActionTypeSettings
Int -> ReadS ActionTypeSettings
ReadS [ActionTypeSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionTypeSettings]
$creadListPrec :: ReadPrec [ActionTypeSettings]
readPrec :: ReadPrec ActionTypeSettings
$creadPrec :: ReadPrec ActionTypeSettings
readList :: ReadS [ActionTypeSettings]
$creadList :: ReadS [ActionTypeSettings]
readsPrec :: Int -> ReadS ActionTypeSettings
$creadsPrec :: Int -> ReadS ActionTypeSettings
Prelude.Read, Int -> ActionTypeSettings -> ShowS
[ActionTypeSettings] -> ShowS
ActionTypeSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionTypeSettings] -> ShowS
$cshowList :: [ActionTypeSettings] -> ShowS
show :: ActionTypeSettings -> String
$cshow :: ActionTypeSettings -> String
showsPrec :: Int -> ActionTypeSettings -> ShowS
$cshowsPrec :: Int -> ActionTypeSettings -> ShowS
Prelude.Show, forall x. Rep ActionTypeSettings x -> ActionTypeSettings
forall x. ActionTypeSettings -> Rep ActionTypeSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActionTypeSettings x -> ActionTypeSettings
$cfrom :: forall x. ActionTypeSettings -> Rep ActionTypeSettings x
Prelude.Generic)
newActionTypeSettings ::
ActionTypeSettings
newActionTypeSettings :: ActionTypeSettings
newActionTypeSettings =
ActionTypeSettings'
{ $sel:entityUrlTemplate:ActionTypeSettings' :: Maybe Text
entityUrlTemplate =
forall a. Maybe a
Prelude.Nothing,
$sel:executionUrlTemplate:ActionTypeSettings' :: Maybe Text
executionUrlTemplate = forall a. Maybe a
Prelude.Nothing,
$sel:revisionUrlTemplate:ActionTypeSettings' :: Maybe Text
revisionUrlTemplate = forall a. Maybe a
Prelude.Nothing,
$sel:thirdPartyConfigurationUrl:ActionTypeSettings' :: Maybe Text
thirdPartyConfigurationUrl = forall a. Maybe a
Prelude.Nothing
}
actionTypeSettings_entityUrlTemplate :: Lens.Lens' ActionTypeSettings (Prelude.Maybe Prelude.Text)
actionTypeSettings_entityUrlTemplate :: Lens' ActionTypeSettings (Maybe Text)
actionTypeSettings_entityUrlTemplate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeSettings' {Maybe Text
entityUrlTemplate :: Maybe Text
$sel:entityUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
entityUrlTemplate} -> Maybe Text
entityUrlTemplate) (\s :: ActionTypeSettings
s@ActionTypeSettings' {} Maybe Text
a -> ActionTypeSettings
s {$sel:entityUrlTemplate:ActionTypeSettings' :: Maybe Text
entityUrlTemplate = Maybe Text
a} :: ActionTypeSettings)
actionTypeSettings_executionUrlTemplate :: Lens.Lens' ActionTypeSettings (Prelude.Maybe Prelude.Text)
actionTypeSettings_executionUrlTemplate :: Lens' ActionTypeSettings (Maybe Text)
actionTypeSettings_executionUrlTemplate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeSettings' {Maybe Text
executionUrlTemplate :: Maybe Text
$sel:executionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
executionUrlTemplate} -> Maybe Text
executionUrlTemplate) (\s :: ActionTypeSettings
s@ActionTypeSettings' {} Maybe Text
a -> ActionTypeSettings
s {$sel:executionUrlTemplate:ActionTypeSettings' :: Maybe Text
executionUrlTemplate = Maybe Text
a} :: ActionTypeSettings)
actionTypeSettings_revisionUrlTemplate :: Lens.Lens' ActionTypeSettings (Prelude.Maybe Prelude.Text)
actionTypeSettings_revisionUrlTemplate :: Lens' ActionTypeSettings (Maybe Text)
actionTypeSettings_revisionUrlTemplate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeSettings' {Maybe Text
revisionUrlTemplate :: Maybe Text
$sel:revisionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
revisionUrlTemplate} -> Maybe Text
revisionUrlTemplate) (\s :: ActionTypeSettings
s@ActionTypeSettings' {} Maybe Text
a -> ActionTypeSettings
s {$sel:revisionUrlTemplate:ActionTypeSettings' :: Maybe Text
revisionUrlTemplate = Maybe Text
a} :: ActionTypeSettings)
actionTypeSettings_thirdPartyConfigurationUrl :: Lens.Lens' ActionTypeSettings (Prelude.Maybe Prelude.Text)
actionTypeSettings_thirdPartyConfigurationUrl :: Lens' ActionTypeSettings (Maybe Text)
actionTypeSettings_thirdPartyConfigurationUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeSettings' {Maybe Text
thirdPartyConfigurationUrl :: Maybe Text
$sel:thirdPartyConfigurationUrl:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
thirdPartyConfigurationUrl} -> Maybe Text
thirdPartyConfigurationUrl) (\s :: ActionTypeSettings
s@ActionTypeSettings' {} Maybe Text
a -> ActionTypeSettings
s {$sel:thirdPartyConfigurationUrl:ActionTypeSettings' :: Maybe Text
thirdPartyConfigurationUrl = Maybe Text
a} :: ActionTypeSettings)
instance Data.FromJSON ActionTypeSettings where
parseJSON :: Value -> Parser ActionTypeSettings
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActionTypeSettings"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeSettings
ActionTypeSettings'
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
"entityUrlTemplate")
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
"executionUrlTemplate")
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
"revisionUrlTemplate")
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
"thirdPartyConfigurationUrl")
)
instance Prelude.Hashable ActionTypeSettings where
hashWithSalt :: Int -> ActionTypeSettings -> Int
hashWithSalt Int
_salt ActionTypeSettings' {Maybe Text
thirdPartyConfigurationUrl :: Maybe Text
revisionUrlTemplate :: Maybe Text
executionUrlTemplate :: Maybe Text
entityUrlTemplate :: Maybe Text
$sel:thirdPartyConfigurationUrl:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:revisionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:executionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:entityUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
entityUrlTemplate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
executionUrlTemplate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
revisionUrlTemplate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
thirdPartyConfigurationUrl
instance Prelude.NFData ActionTypeSettings where
rnf :: ActionTypeSettings -> ()
rnf ActionTypeSettings' {Maybe Text
thirdPartyConfigurationUrl :: Maybe Text
revisionUrlTemplate :: Maybe Text
executionUrlTemplate :: Maybe Text
entityUrlTemplate :: Maybe Text
$sel:thirdPartyConfigurationUrl:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:revisionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:executionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:entityUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
entityUrlTemplate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
executionUrlTemplate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
revisionUrlTemplate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
thirdPartyConfigurationUrl
instance Data.ToJSON ActionTypeSettings where
toJSON :: ActionTypeSettings -> Value
toJSON ActionTypeSettings' {Maybe Text
thirdPartyConfigurationUrl :: Maybe Text
revisionUrlTemplate :: Maybe Text
executionUrlTemplate :: Maybe Text
entityUrlTemplate :: Maybe Text
$sel:thirdPartyConfigurationUrl:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:revisionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:executionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:entityUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"entityUrlTemplate" 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
entityUrlTemplate,
(Key
"executionUrlTemplate" 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
executionUrlTemplate,
(Key
"revisionUrlTemplate" 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
revisionUrlTemplate,
(Key
"thirdPartyConfigurationUrl" 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
thirdPartyConfigurationUrl
]
)