{-# 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.ActionTypeUrls where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ActionTypeUrls = ActionTypeUrls'
{
ActionTypeUrls -> Maybe Text
executionUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeUrls -> Maybe Text
revisionUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeUrls -> Maybe Text
entityUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeUrls -> Maybe Text
configurationUrl :: Prelude.Maybe Prelude.Text
}
deriving (ActionTypeUrls -> ActionTypeUrls -> Bool
(ActionTypeUrls -> ActionTypeUrls -> Bool)
-> (ActionTypeUrls -> ActionTypeUrls -> Bool) -> Eq ActionTypeUrls
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionTypeUrls -> ActionTypeUrls -> Bool
$c/= :: ActionTypeUrls -> ActionTypeUrls -> Bool
== :: ActionTypeUrls -> ActionTypeUrls -> Bool
$c== :: ActionTypeUrls -> ActionTypeUrls -> Bool
Prelude.Eq, ReadPrec [ActionTypeUrls]
ReadPrec ActionTypeUrls
Int -> ReadS ActionTypeUrls
ReadS [ActionTypeUrls]
(Int -> ReadS ActionTypeUrls)
-> ReadS [ActionTypeUrls]
-> ReadPrec ActionTypeUrls
-> ReadPrec [ActionTypeUrls]
-> Read ActionTypeUrls
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionTypeUrls]
$creadListPrec :: ReadPrec [ActionTypeUrls]
readPrec :: ReadPrec ActionTypeUrls
$creadPrec :: ReadPrec ActionTypeUrls
readList :: ReadS [ActionTypeUrls]
$creadList :: ReadS [ActionTypeUrls]
readsPrec :: Int -> ReadS ActionTypeUrls
$creadsPrec :: Int -> ReadS ActionTypeUrls
Prelude.Read, Int -> ActionTypeUrls -> ShowS
[ActionTypeUrls] -> ShowS
ActionTypeUrls -> String
(Int -> ActionTypeUrls -> ShowS)
-> (ActionTypeUrls -> String)
-> ([ActionTypeUrls] -> ShowS)
-> Show ActionTypeUrls
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionTypeUrls] -> ShowS
$cshowList :: [ActionTypeUrls] -> ShowS
show :: ActionTypeUrls -> String
$cshow :: ActionTypeUrls -> String
showsPrec :: Int -> ActionTypeUrls -> ShowS
$cshowsPrec :: Int -> ActionTypeUrls -> ShowS
Prelude.Show, (forall x. ActionTypeUrls -> Rep ActionTypeUrls x)
-> (forall x. Rep ActionTypeUrls x -> ActionTypeUrls)
-> Generic ActionTypeUrls
forall x. Rep ActionTypeUrls x -> ActionTypeUrls
forall x. ActionTypeUrls -> Rep ActionTypeUrls x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActionTypeUrls x -> ActionTypeUrls
$cfrom :: forall x. ActionTypeUrls -> Rep ActionTypeUrls x
Prelude.Generic)
newActionTypeUrls ::
ActionTypeUrls
newActionTypeUrls :: ActionTypeUrls
newActionTypeUrls =
ActionTypeUrls' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeUrls
ActionTypeUrls'
{ $sel:executionUrlTemplate:ActionTypeUrls' :: Maybe Text
executionUrlTemplate =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:revisionUrlTemplate:ActionTypeUrls' :: Maybe Text
revisionUrlTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:entityUrlTemplate:ActionTypeUrls' :: Maybe Text
entityUrlTemplate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:configurationUrl:ActionTypeUrls' :: Maybe Text
configurationUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
actionTypeUrls_executionUrlTemplate :: Lens.Lens' ActionTypeUrls (Prelude.Maybe Prelude.Text)
actionTypeUrls_executionUrlTemplate :: (Maybe Text -> f (Maybe Text))
-> ActionTypeUrls -> f ActionTypeUrls
actionTypeUrls_executionUrlTemplate = (ActionTypeUrls -> Maybe Text)
-> (ActionTypeUrls -> Maybe Text -> ActionTypeUrls)
-> Lens ActionTypeUrls ActionTypeUrls (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeUrls' {Maybe Text
executionUrlTemplate :: Maybe Text
$sel:executionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
executionUrlTemplate} -> Maybe Text
executionUrlTemplate) (\s :: ActionTypeUrls
s@ActionTypeUrls' {} Maybe Text
a -> ActionTypeUrls
s {$sel:executionUrlTemplate:ActionTypeUrls' :: Maybe Text
executionUrlTemplate = Maybe Text
a} :: ActionTypeUrls)
actionTypeUrls_revisionUrlTemplate :: Lens.Lens' ActionTypeUrls (Prelude.Maybe Prelude.Text)
actionTypeUrls_revisionUrlTemplate :: (Maybe Text -> f (Maybe Text))
-> ActionTypeUrls -> f ActionTypeUrls
actionTypeUrls_revisionUrlTemplate = (ActionTypeUrls -> Maybe Text)
-> (ActionTypeUrls -> Maybe Text -> ActionTypeUrls)
-> Lens ActionTypeUrls ActionTypeUrls (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeUrls' {Maybe Text
revisionUrlTemplate :: Maybe Text
$sel:revisionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
revisionUrlTemplate} -> Maybe Text
revisionUrlTemplate) (\s :: ActionTypeUrls
s@ActionTypeUrls' {} Maybe Text
a -> ActionTypeUrls
s {$sel:revisionUrlTemplate:ActionTypeUrls' :: Maybe Text
revisionUrlTemplate = Maybe Text
a} :: ActionTypeUrls)
actionTypeUrls_entityUrlTemplate :: Lens.Lens' ActionTypeUrls (Prelude.Maybe Prelude.Text)
actionTypeUrls_entityUrlTemplate :: (Maybe Text -> f (Maybe Text))
-> ActionTypeUrls -> f ActionTypeUrls
actionTypeUrls_entityUrlTemplate = (ActionTypeUrls -> Maybe Text)
-> (ActionTypeUrls -> Maybe Text -> ActionTypeUrls)
-> Lens ActionTypeUrls ActionTypeUrls (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeUrls' {Maybe Text
entityUrlTemplate :: Maybe Text
$sel:entityUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
entityUrlTemplate} -> Maybe Text
entityUrlTemplate) (\s :: ActionTypeUrls
s@ActionTypeUrls' {} Maybe Text
a -> ActionTypeUrls
s {$sel:entityUrlTemplate:ActionTypeUrls' :: Maybe Text
entityUrlTemplate = Maybe Text
a} :: ActionTypeUrls)
actionTypeUrls_configurationUrl :: Lens.Lens' ActionTypeUrls (Prelude.Maybe Prelude.Text)
actionTypeUrls_configurationUrl :: (Maybe Text -> f (Maybe Text))
-> ActionTypeUrls -> f ActionTypeUrls
actionTypeUrls_configurationUrl = (ActionTypeUrls -> Maybe Text)
-> (ActionTypeUrls -> Maybe Text -> ActionTypeUrls)
-> Lens ActionTypeUrls ActionTypeUrls (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeUrls' {Maybe Text
configurationUrl :: Maybe Text
$sel:configurationUrl:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
configurationUrl} -> Maybe Text
configurationUrl) (\s :: ActionTypeUrls
s@ActionTypeUrls' {} Maybe Text
a -> ActionTypeUrls
s {$sel:configurationUrl:ActionTypeUrls' :: Maybe Text
configurationUrl = Maybe Text
a} :: ActionTypeUrls)
instance Core.FromJSON ActionTypeUrls where
parseJSON :: Value -> Parser ActionTypeUrls
parseJSON =
String
-> (Object -> Parser ActionTypeUrls)
-> Value
-> Parser ActionTypeUrls
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ActionTypeUrls"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeUrls
ActionTypeUrls'
(Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeUrls)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeUrls)
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
"executionUrlTemplate")
Parser (Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeUrls)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ActionTypeUrls)
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 -> Maybe Text -> ActionTypeUrls)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ActionTypeUrls)
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")
Parser (Maybe Text -> ActionTypeUrls)
-> Parser (Maybe Text) -> Parser ActionTypeUrls
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
"configurationUrl")
)
instance Prelude.Hashable ActionTypeUrls
instance Prelude.NFData ActionTypeUrls
instance Core.ToJSON ActionTypeUrls where
toJSON :: ActionTypeUrls -> Value
toJSON ActionTypeUrls' {Maybe Text
configurationUrl :: Maybe Text
entityUrlTemplate :: Maybe Text
revisionUrlTemplate :: Maybe Text
executionUrlTemplate :: Maybe Text
$sel:configurationUrl:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:entityUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:revisionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:executionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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,
(Text
"configurationUrl" 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
configurationUrl
]
)