{-# 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.ActionTypeIdentifier where
import Amazonka.CodePipeline.Types.ActionCategory
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 ActionTypeIdentifier = ActionTypeIdentifier'
{
ActionTypeIdentifier -> ActionCategory
category :: ActionCategory,
ActionTypeIdentifier -> Text
owner :: Prelude.Text,
ActionTypeIdentifier -> Text
provider :: Prelude.Text,
ActionTypeIdentifier -> Text
version :: Prelude.Text
}
deriving (ActionTypeIdentifier -> ActionTypeIdentifier -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActionTypeIdentifier -> ActionTypeIdentifier -> Bool
$c/= :: ActionTypeIdentifier -> ActionTypeIdentifier -> Bool
== :: ActionTypeIdentifier -> ActionTypeIdentifier -> Bool
$c== :: ActionTypeIdentifier -> ActionTypeIdentifier -> Bool
Prelude.Eq, ReadPrec [ActionTypeIdentifier]
ReadPrec ActionTypeIdentifier
Int -> ReadS ActionTypeIdentifier
ReadS [ActionTypeIdentifier]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActionTypeIdentifier]
$creadListPrec :: ReadPrec [ActionTypeIdentifier]
readPrec :: ReadPrec ActionTypeIdentifier
$creadPrec :: ReadPrec ActionTypeIdentifier
readList :: ReadS [ActionTypeIdentifier]
$creadList :: ReadS [ActionTypeIdentifier]
readsPrec :: Int -> ReadS ActionTypeIdentifier
$creadsPrec :: Int -> ReadS ActionTypeIdentifier
Prelude.Read, Int -> ActionTypeIdentifier -> ShowS
[ActionTypeIdentifier] -> ShowS
ActionTypeIdentifier -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActionTypeIdentifier] -> ShowS
$cshowList :: [ActionTypeIdentifier] -> ShowS
show :: ActionTypeIdentifier -> String
$cshow :: ActionTypeIdentifier -> String
showsPrec :: Int -> ActionTypeIdentifier -> ShowS
$cshowsPrec :: Int -> ActionTypeIdentifier -> ShowS
Prelude.Show, forall x. Rep ActionTypeIdentifier x -> ActionTypeIdentifier
forall x. ActionTypeIdentifier -> Rep ActionTypeIdentifier x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ActionTypeIdentifier x -> ActionTypeIdentifier
$cfrom :: forall x. ActionTypeIdentifier -> Rep ActionTypeIdentifier x
Prelude.Generic)
newActionTypeIdentifier ::
ActionCategory ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ActionTypeIdentifier
newActionTypeIdentifier :: ActionCategory -> Text -> Text -> Text -> ActionTypeIdentifier
newActionTypeIdentifier
ActionCategory
pCategory_
Text
pOwner_
Text
pProvider_
Text
pVersion_ =
ActionTypeIdentifier'
{ $sel:category:ActionTypeIdentifier' :: ActionCategory
category = ActionCategory
pCategory_,
$sel:owner:ActionTypeIdentifier' :: Text
owner = Text
pOwner_,
$sel:provider:ActionTypeIdentifier' :: Text
provider = Text
pProvider_,
$sel:version:ActionTypeIdentifier' :: Text
version = Text
pVersion_
}
actionTypeIdentifier_category :: Lens.Lens' ActionTypeIdentifier ActionCategory
actionTypeIdentifier_category :: Lens' ActionTypeIdentifier ActionCategory
actionTypeIdentifier_category = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeIdentifier' {ActionCategory
category :: ActionCategory
$sel:category:ActionTypeIdentifier' :: ActionTypeIdentifier -> ActionCategory
category} -> ActionCategory
category) (\s :: ActionTypeIdentifier
s@ActionTypeIdentifier' {} ActionCategory
a -> ActionTypeIdentifier
s {$sel:category:ActionTypeIdentifier' :: ActionCategory
category = ActionCategory
a} :: ActionTypeIdentifier)
actionTypeIdentifier_owner :: Lens.Lens' ActionTypeIdentifier Prelude.Text
actionTypeIdentifier_owner :: Lens' ActionTypeIdentifier Text
actionTypeIdentifier_owner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeIdentifier' {Text
owner :: Text
$sel:owner:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
owner} -> Text
owner) (\s :: ActionTypeIdentifier
s@ActionTypeIdentifier' {} Text
a -> ActionTypeIdentifier
s {$sel:owner:ActionTypeIdentifier' :: Text
owner = Text
a} :: ActionTypeIdentifier)
actionTypeIdentifier_provider :: Lens.Lens' ActionTypeIdentifier Prelude.Text
actionTypeIdentifier_provider :: Lens' ActionTypeIdentifier Text
actionTypeIdentifier_provider = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeIdentifier' {Text
provider :: Text
$sel:provider:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
provider} -> Text
provider) (\s :: ActionTypeIdentifier
s@ActionTypeIdentifier' {} Text
a -> ActionTypeIdentifier
s {$sel:provider:ActionTypeIdentifier' :: Text
provider = Text
a} :: ActionTypeIdentifier)
actionTypeIdentifier_version :: Lens.Lens' ActionTypeIdentifier Prelude.Text
actionTypeIdentifier_version :: Lens' ActionTypeIdentifier Text
actionTypeIdentifier_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActionTypeIdentifier' {Text
version :: Text
$sel:version:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
version} -> Text
version) (\s :: ActionTypeIdentifier
s@ActionTypeIdentifier' {} Text
a -> ActionTypeIdentifier
s {$sel:version:ActionTypeIdentifier' :: Text
version = Text
a} :: ActionTypeIdentifier)
instance Data.FromJSON ActionTypeIdentifier where
parseJSON :: Value -> Parser ActionTypeIdentifier
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ActionTypeIdentifier"
( \Object
x ->
ActionCategory -> Text -> Text -> Text -> ActionTypeIdentifier
ActionTypeIdentifier'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"category")
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
"owner")
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
"provider")
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
"version")
)
instance Prelude.Hashable ActionTypeIdentifier where
hashWithSalt :: Int -> ActionTypeIdentifier -> Int
hashWithSalt Int
_salt ActionTypeIdentifier' {Text
ActionCategory
version :: Text
provider :: Text
owner :: Text
category :: ActionCategory
$sel:version:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
$sel:provider:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
$sel:owner:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
$sel:category:ActionTypeIdentifier' :: ActionTypeIdentifier -> ActionCategory
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ActionCategory
category
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
owner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
provider
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
version
instance Prelude.NFData ActionTypeIdentifier where
rnf :: ActionTypeIdentifier -> ()
rnf ActionTypeIdentifier' {Text
ActionCategory
version :: Text
provider :: Text
owner :: Text
category :: ActionCategory
$sel:version:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
$sel:provider:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
$sel:owner:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
$sel:category:ActionTypeIdentifier' :: ActionTypeIdentifier -> ActionCategory
..} =
forall a. NFData a => a -> ()
Prelude.rnf ActionCategory
category
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
owner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
provider
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
version
instance Data.ToJSON ActionTypeIdentifier where
toJSON :: ActionTypeIdentifier -> Value
toJSON ActionTypeIdentifier' {Text
ActionCategory
version :: Text
provider :: Text
owner :: Text
category :: ActionCategory
$sel:version:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
$sel:provider:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
$sel:owner:ActionTypeIdentifier' :: ActionTypeIdentifier -> Text
$sel:category:ActionTypeIdentifier' :: ActionTypeIdentifier -> ActionCategory
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"category" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ActionCategory
category),
forall a. a -> Maybe a
Prelude.Just (Key
"owner" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
owner),
forall a. a -> Maybe a
Prelude.Just (Key
"provider" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
provider),
forall a. a -> Maybe a
Prelude.Just (Key
"version" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
version)
]
)