{-# 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.ServiceCatalog.Types.ServiceActionAssociation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ServiceActionAssociation = ServiceActionAssociation'
{
ServiceActionAssociation -> Text
serviceActionId :: Prelude.Text,
ServiceActionAssociation -> Text
productId :: Prelude.Text,
ServiceActionAssociation -> Text
provisioningArtifactId :: Prelude.Text
}
deriving (ServiceActionAssociation -> ServiceActionAssociation -> Bool
(ServiceActionAssociation -> ServiceActionAssociation -> Bool)
-> (ServiceActionAssociation -> ServiceActionAssociation -> Bool)
-> Eq ServiceActionAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceActionAssociation -> ServiceActionAssociation -> Bool
$c/= :: ServiceActionAssociation -> ServiceActionAssociation -> Bool
== :: ServiceActionAssociation -> ServiceActionAssociation -> Bool
$c== :: ServiceActionAssociation -> ServiceActionAssociation -> Bool
Prelude.Eq, ReadPrec [ServiceActionAssociation]
ReadPrec ServiceActionAssociation
Int -> ReadS ServiceActionAssociation
ReadS [ServiceActionAssociation]
(Int -> ReadS ServiceActionAssociation)
-> ReadS [ServiceActionAssociation]
-> ReadPrec ServiceActionAssociation
-> ReadPrec [ServiceActionAssociation]
-> Read ServiceActionAssociation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceActionAssociation]
$creadListPrec :: ReadPrec [ServiceActionAssociation]
readPrec :: ReadPrec ServiceActionAssociation
$creadPrec :: ReadPrec ServiceActionAssociation
readList :: ReadS [ServiceActionAssociation]
$creadList :: ReadS [ServiceActionAssociation]
readsPrec :: Int -> ReadS ServiceActionAssociation
$creadsPrec :: Int -> ReadS ServiceActionAssociation
Prelude.Read, Int -> ServiceActionAssociation -> ShowS
[ServiceActionAssociation] -> ShowS
ServiceActionAssociation -> String
(Int -> ServiceActionAssociation -> ShowS)
-> (ServiceActionAssociation -> String)
-> ([ServiceActionAssociation] -> ShowS)
-> Show ServiceActionAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceActionAssociation] -> ShowS
$cshowList :: [ServiceActionAssociation] -> ShowS
show :: ServiceActionAssociation -> String
$cshow :: ServiceActionAssociation -> String
showsPrec :: Int -> ServiceActionAssociation -> ShowS
$cshowsPrec :: Int -> ServiceActionAssociation -> ShowS
Prelude.Show, (forall x.
ServiceActionAssociation -> Rep ServiceActionAssociation x)
-> (forall x.
Rep ServiceActionAssociation x -> ServiceActionAssociation)
-> Generic ServiceActionAssociation
forall x.
Rep ServiceActionAssociation x -> ServiceActionAssociation
forall x.
ServiceActionAssociation -> Rep ServiceActionAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ServiceActionAssociation x -> ServiceActionAssociation
$cfrom :: forall x.
ServiceActionAssociation -> Rep ServiceActionAssociation x
Prelude.Generic)
newServiceActionAssociation ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
ServiceActionAssociation
newServiceActionAssociation :: Text -> Text -> Text -> ServiceActionAssociation
newServiceActionAssociation
Text
pServiceActionId_
Text
pProductId_
Text
pProvisioningArtifactId_ =
ServiceActionAssociation' :: Text -> Text -> Text -> ServiceActionAssociation
ServiceActionAssociation'
{ $sel:serviceActionId:ServiceActionAssociation' :: Text
serviceActionId =
Text
pServiceActionId_,
$sel:productId:ServiceActionAssociation' :: Text
productId = Text
pProductId_,
$sel:provisioningArtifactId:ServiceActionAssociation' :: Text
provisioningArtifactId = Text
pProvisioningArtifactId_
}
serviceActionAssociation_serviceActionId :: Lens.Lens' ServiceActionAssociation Prelude.Text
serviceActionAssociation_serviceActionId :: (Text -> f Text)
-> ServiceActionAssociation -> f ServiceActionAssociation
serviceActionAssociation_serviceActionId = (ServiceActionAssociation -> Text)
-> (ServiceActionAssociation -> Text -> ServiceActionAssociation)
-> Lens ServiceActionAssociation ServiceActionAssociation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceActionAssociation' {Text
serviceActionId :: Text
$sel:serviceActionId:ServiceActionAssociation' :: ServiceActionAssociation -> Text
serviceActionId} -> Text
serviceActionId) (\s :: ServiceActionAssociation
s@ServiceActionAssociation' {} Text
a -> ServiceActionAssociation
s {$sel:serviceActionId:ServiceActionAssociation' :: Text
serviceActionId = Text
a} :: ServiceActionAssociation)
serviceActionAssociation_productId :: Lens.Lens' ServiceActionAssociation Prelude.Text
serviceActionAssociation_productId :: (Text -> f Text)
-> ServiceActionAssociation -> f ServiceActionAssociation
serviceActionAssociation_productId = (ServiceActionAssociation -> Text)
-> (ServiceActionAssociation -> Text -> ServiceActionAssociation)
-> Lens ServiceActionAssociation ServiceActionAssociation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceActionAssociation' {Text
productId :: Text
$sel:productId:ServiceActionAssociation' :: ServiceActionAssociation -> Text
productId} -> Text
productId) (\s :: ServiceActionAssociation
s@ServiceActionAssociation' {} Text
a -> ServiceActionAssociation
s {$sel:productId:ServiceActionAssociation' :: Text
productId = Text
a} :: ServiceActionAssociation)
serviceActionAssociation_provisioningArtifactId :: Lens.Lens' ServiceActionAssociation Prelude.Text
serviceActionAssociation_provisioningArtifactId :: (Text -> f Text)
-> ServiceActionAssociation -> f ServiceActionAssociation
serviceActionAssociation_provisioningArtifactId = (ServiceActionAssociation -> Text)
-> (ServiceActionAssociation -> Text -> ServiceActionAssociation)
-> Lens ServiceActionAssociation ServiceActionAssociation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceActionAssociation' {Text
provisioningArtifactId :: Text
$sel:provisioningArtifactId:ServiceActionAssociation' :: ServiceActionAssociation -> Text
provisioningArtifactId} -> Text
provisioningArtifactId) (\s :: ServiceActionAssociation
s@ServiceActionAssociation' {} Text
a -> ServiceActionAssociation
s {$sel:provisioningArtifactId:ServiceActionAssociation' :: Text
provisioningArtifactId = Text
a} :: ServiceActionAssociation)
instance Prelude.Hashable ServiceActionAssociation
instance Prelude.NFData ServiceActionAssociation
instance Core.ToJSON ServiceActionAssociation where
toJSON :: ServiceActionAssociation -> Value
toJSON ServiceActionAssociation' {Text
provisioningArtifactId :: Text
productId :: Text
serviceActionId :: Text
$sel:provisioningArtifactId:ServiceActionAssociation' :: ServiceActionAssociation -> Text
$sel:productId:ServiceActionAssociation' :: ServiceActionAssociation -> Text
$sel:serviceActionId:ServiceActionAssociation' :: ServiceActionAssociation -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ServiceActionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceActionId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ProductId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
productId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ProvisioningArtifactId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
provisioningArtifactId
)
]
)