{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ActionTypeUrls = ActionTypeUrls'
{
ActionTypeUrls -> Maybe Text
configurationUrl :: Prelude.Maybe Prelude.Text,
ActionTypeUrls -> Maybe Text
entityUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeUrls -> Maybe Text
executionUrlTemplate :: Prelude.Maybe Prelude.Text,
ActionTypeUrls -> Maybe Text
revisionUrlTemplate :: Prelude.Maybe Prelude.Text
}
deriving (ActionTypeUrls -> ActionTypeUrls -> Bool
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]
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
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. 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'
{ $sel:configurationUrl:ActionTypeUrls' :: Maybe Text
configurationUrl = forall a. Maybe a
Prelude.Nothing,
$sel:entityUrlTemplate:ActionTypeUrls' :: Maybe Text
entityUrlTemplate = forall a. Maybe a
Prelude.Nothing,
$sel:executionUrlTemplate:ActionTypeUrls' :: Maybe Text
executionUrlTemplate = forall a. Maybe a
Prelude.Nothing,
$sel:revisionUrlTemplate:ActionTypeUrls' :: Maybe Text
revisionUrlTemplate = forall a. Maybe a
Prelude.Nothing
}
actionTypeUrls_configurationUrl :: Lens.Lens' ActionTypeUrls (Prelude.Maybe Prelude.Text)
actionTypeUrls_configurationUrl :: Lens' ActionTypeUrls (Maybe Text)
actionTypeUrls_configurationUrl = 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)
actionTypeUrls_entityUrlTemplate :: Lens.Lens' ActionTypeUrls (Prelude.Maybe Prelude.Text)
actionTypeUrls_entityUrlTemplate :: Lens' ActionTypeUrls (Maybe Text)
actionTypeUrls_entityUrlTemplate = 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_executionUrlTemplate :: Lens.Lens' ActionTypeUrls (Prelude.Maybe Prelude.Text)
actionTypeUrls_executionUrlTemplate :: Lens' ActionTypeUrls (Maybe Text)
actionTypeUrls_executionUrlTemplate = 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 :: Lens' ActionTypeUrls (Maybe Text)
actionTypeUrls_revisionUrlTemplate = 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)
instance Data.FromJSON ActionTypeUrls where
parseJSON :: Value -> Parser ActionTypeUrls
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActionTypeUrls"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Maybe Text -> ActionTypeUrls
ActionTypeUrls'
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
"configurationUrl")
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
"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")
)
instance Prelude.Hashable ActionTypeUrls where
hashWithSalt :: Int -> ActionTypeUrls -> Int
hashWithSalt Int
_salt ActionTypeUrls' {Maybe Text
revisionUrlTemplate :: Maybe Text
executionUrlTemplate :: Maybe Text
entityUrlTemplate :: Maybe Text
configurationUrl :: Maybe Text
$sel:revisionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:executionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:entityUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:configurationUrl:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
configurationUrl
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
instance Prelude.NFData ActionTypeUrls where
rnf :: ActionTypeUrls -> ()
rnf ActionTypeUrls' {Maybe Text
revisionUrlTemplate :: Maybe Text
executionUrlTemplate :: Maybe Text
entityUrlTemplate :: Maybe Text
configurationUrl :: Maybe Text
$sel:revisionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:executionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:entityUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:configurationUrl:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
configurationUrl
seq :: forall a b. a -> b -> b
`Prelude.seq` 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
instance Data.ToJSON ActionTypeUrls where
toJSON :: ActionTypeUrls -> Value
toJSON ActionTypeUrls' {Maybe Text
revisionUrlTemplate :: Maybe Text
executionUrlTemplate :: Maybe Text
entityUrlTemplate :: Maybe Text
configurationUrl :: Maybe Text
$sel:revisionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:executionUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:entityUrlTemplate:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
$sel:configurationUrl:ActionTypeUrls' :: ActionTypeUrls -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"configurationUrl" 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
configurationUrl,
(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
]
)