{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ActionTypeSettings = ActionTypeSettings'
{
ActionTypeSettings -> Maybe Text
thirdPartyConfigurationUrl :: Prelude.Maybe Prelude.Text,
ActionTypeSettings -> Maybe Text
executionUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeSettings -> Maybe Text
revisionUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeSettings -> Maybe Text
entityUrlTemplate :: Prelude.Maybe Prelude.Text
}
deriving (ActionTypeSettings -> ActionTypeSettings -> Bool
(ActionTypeSettings -> ActionTypeSettings -> Bool)
-> (ActionTypeSettings -> ActionTypeSettings -> Bool)
-> Eq ActionTypeSettings
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]
(Int -> ReadS ActionTypeSettings)
-> ReadS [ActionTypeSettings]
-> ReadPrec ActionTypeSettings
-> ReadPrec [ActionTypeSettings]
-> Read 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
(Int -> ActionTypeSettings -> ShowS)
-> (ActionTypeSettings -> String)
-> ([ActionTypeSettings] -> ShowS)
-> Show ActionTypeSettings
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. ActionTypeSettings -> Rep ActionTypeSettings x)
-> (forall x. Rep ActionTypeSettings x -> ActionTypeSettings)
-> Generic ActionTypeSettings
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' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeSettings
ActionTypeSettings'
{ $sel:thirdPartyConfigurationUrl:ActionTypeSettings' :: Maybe Text
thirdPartyConfigurationUrl =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:executionUrlTemplate:ActionTypeSettings' :: Maybe Text
executionUrlTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revisionUrlTemplate:ActionTypeSettings' :: Maybe Text
revisionUrlTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:entityUrlTemplate:ActionTypeSettings' :: Maybe Text
entityUrlTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
actionTypeSettings_thirdPartyConfigurationUrl :: Lens.Lens' ActionTypeSettings (Prelude.Maybe Prelude.Text)
actionTypeSettings_thirdPartyConfigurationUrl :: (Maybe Text -> f (Maybe Text))
-> ActionTypeSettings -> f ActionTypeSettings
actionTypeSettings_thirdPartyConfigurationUrl = (ActionTypeSettings -> Maybe Text)
-> (ActionTypeSettings -> Maybe Text -> ActionTypeSettings)
-> Lens
ActionTypeSettings ActionTypeSettings (Maybe Text) (Maybe Text)
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)
actionTypeSettings_executionUrlTemplate :: Lens.Lens' ActionTypeSettings (Prelude.Maybe Prelude.Text)
actionTypeSettings_executionUrlTemplate :: (Maybe Text -> f (Maybe Text))
-> ActionTypeSettings -> f ActionTypeSettings
actionTypeSettings_executionUrlTemplate = (ActionTypeSettings -> Maybe Text)
-> (ActionTypeSettings -> Maybe Text -> ActionTypeSettings)
-> Lens
ActionTypeSettings ActionTypeSettings (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> ActionTypeSettings -> f ActionTypeSettings
actionTypeSettings_revisionUrlTemplate = (ActionTypeSettings -> Maybe Text)
-> (ActionTypeSettings -> Maybe Text -> ActionTypeSettings)
-> Lens
ActionTypeSettings ActionTypeSettings (Maybe Text) (Maybe Text)
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_entityUrlTemplate :: Lens.Lens' ActionTypeSettings (Prelude.Maybe Prelude.Text)
actionTypeSettings_entityUrlTemplate :: (Maybe Text -> f (Maybe Text))
-> ActionTypeSettings -> f ActionTypeSettings
actionTypeSettings_entityUrlTemplate = (ActionTypeSettings -> Maybe Text)
-> (ActionTypeSettings -> Maybe Text -> ActionTypeSettings)
-> Lens
ActionTypeSettings ActionTypeSettings (Maybe Text) (Maybe Text)
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)
instance Core.FromJSON ActionTypeSettings where
parseJSON :: Value -> Parser ActionTypeSettings
parseJSON =
String
-> (Object -> Parser ActionTypeSettings)
-> Value
-> Parser ActionTypeSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActionTypeSettings"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeSettings
ActionTypeSettings'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeSettings)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"thirdPartyConfigurationUrl")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeSettings)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ActionTypeSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"executionUrlTemplate")
Parser (Maybe Text -> Maybe Text -> ActionTypeSettings)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ActionTypeSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"revisionUrlTemplate")
Parser (Maybe Text -> ActionTypeSettings)
-> Parser (Maybe Text) -> Parser ActionTypeSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"entityUrlTemplate")
)
instance Prelude.Hashable ActionTypeSettings
instance Prelude.NFData ActionTypeSettings
instance Core.ToJSON ActionTypeSettings where
toJSON :: ActionTypeSettings -> Value
toJSON ActionTypeSettings' {Maybe Text
entityUrlTemplate :: Maybe Text
revisionUrlTemplate :: Maybe Text
executionUrlTemplate :: Maybe Text
thirdPartyConfigurationUrl :: Maybe Text
$sel:entityUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:revisionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:executionUrlTemplate:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
$sel:thirdPartyConfigurationUrl:ActionTypeSettings' :: ActionTypeSettings -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"thirdPartyConfigurationUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
thirdPartyConfigurationUrl,
(Text
"executionUrlTemplate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
executionUrlTemplate,
(Text
"revisionUrlTemplate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
revisionUrlTemplate,
(Text
"entityUrlTemplate" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
entityUrlTemplate
]
)