{-# 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.ServiceActionSummary where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.ServiceCatalog.Types.ServiceActionDefinitionType
data ServiceActionSummary = ServiceActionSummary'
{
ServiceActionSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
ServiceActionSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ServiceActionSummary -> Maybe ServiceActionDefinitionType
definitionType :: Prelude.Maybe ServiceActionDefinitionType,
ServiceActionSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (ServiceActionSummary -> ServiceActionSummary -> Bool
(ServiceActionSummary -> ServiceActionSummary -> Bool)
-> (ServiceActionSummary -> ServiceActionSummary -> Bool)
-> Eq ServiceActionSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceActionSummary -> ServiceActionSummary -> Bool
$c/= :: ServiceActionSummary -> ServiceActionSummary -> Bool
== :: ServiceActionSummary -> ServiceActionSummary -> Bool
$c== :: ServiceActionSummary -> ServiceActionSummary -> Bool
Prelude.Eq, ReadPrec [ServiceActionSummary]
ReadPrec ServiceActionSummary
Int -> ReadS ServiceActionSummary
ReadS [ServiceActionSummary]
(Int -> ReadS ServiceActionSummary)
-> ReadS [ServiceActionSummary]
-> ReadPrec ServiceActionSummary
-> ReadPrec [ServiceActionSummary]
-> Read ServiceActionSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceActionSummary]
$creadListPrec :: ReadPrec [ServiceActionSummary]
readPrec :: ReadPrec ServiceActionSummary
$creadPrec :: ReadPrec ServiceActionSummary
readList :: ReadS [ServiceActionSummary]
$creadList :: ReadS [ServiceActionSummary]
readsPrec :: Int -> ReadS ServiceActionSummary
$creadsPrec :: Int -> ReadS ServiceActionSummary
Prelude.Read, Int -> ServiceActionSummary -> ShowS
[ServiceActionSummary] -> ShowS
ServiceActionSummary -> String
(Int -> ServiceActionSummary -> ShowS)
-> (ServiceActionSummary -> String)
-> ([ServiceActionSummary] -> ShowS)
-> Show ServiceActionSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceActionSummary] -> ShowS
$cshowList :: [ServiceActionSummary] -> ShowS
show :: ServiceActionSummary -> String
$cshow :: ServiceActionSummary -> String
showsPrec :: Int -> ServiceActionSummary -> ShowS
$cshowsPrec :: Int -> ServiceActionSummary -> ShowS
Prelude.Show, (forall x. ServiceActionSummary -> Rep ServiceActionSummary x)
-> (forall x. Rep ServiceActionSummary x -> ServiceActionSummary)
-> Generic ServiceActionSummary
forall x. Rep ServiceActionSummary x -> ServiceActionSummary
forall x. ServiceActionSummary -> Rep ServiceActionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceActionSummary x -> ServiceActionSummary
$cfrom :: forall x. ServiceActionSummary -> Rep ServiceActionSummary x
Prelude.Generic)
newServiceActionSummary ::
ServiceActionSummary
newServiceActionSummary :: ServiceActionSummary
newServiceActionSummary =
ServiceActionSummary' :: Maybe Text
-> Maybe Text
-> Maybe ServiceActionDefinitionType
-> Maybe Text
-> ServiceActionSummary
ServiceActionSummary'
{ $sel:name:ServiceActionSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:ServiceActionSummary' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:definitionType:ServiceActionSummary' :: Maybe ServiceActionDefinitionType
definitionType = Maybe ServiceActionDefinitionType
forall a. Maybe a
Prelude.Nothing,
$sel:description:ServiceActionSummary' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
serviceActionSummary_name :: Lens.Lens' ServiceActionSummary (Prelude.Maybe Prelude.Text)
serviceActionSummary_name :: (Maybe Text -> f (Maybe Text))
-> ServiceActionSummary -> f ServiceActionSummary
serviceActionSummary_name = (ServiceActionSummary -> Maybe Text)
-> (ServiceActionSummary -> Maybe Text -> ServiceActionSummary)
-> Lens
ServiceActionSummary ServiceActionSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceActionSummary' {Maybe Text
name :: Maybe Text
$sel:name:ServiceActionSummary' :: ServiceActionSummary -> Maybe Text
name} -> Maybe Text
name) (\s :: ServiceActionSummary
s@ServiceActionSummary' {} Maybe Text
a -> ServiceActionSummary
s {$sel:name:ServiceActionSummary' :: Maybe Text
name = Maybe Text
a} :: ServiceActionSummary)
serviceActionSummary_id :: Lens.Lens' ServiceActionSummary (Prelude.Maybe Prelude.Text)
serviceActionSummary_id :: (Maybe Text -> f (Maybe Text))
-> ServiceActionSummary -> f ServiceActionSummary
serviceActionSummary_id = (ServiceActionSummary -> Maybe Text)
-> (ServiceActionSummary -> Maybe Text -> ServiceActionSummary)
-> Lens
ServiceActionSummary ServiceActionSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceActionSummary' {Maybe Text
id :: Maybe Text
$sel:id:ServiceActionSummary' :: ServiceActionSummary -> Maybe Text
id} -> Maybe Text
id) (\s :: ServiceActionSummary
s@ServiceActionSummary' {} Maybe Text
a -> ServiceActionSummary
s {$sel:id:ServiceActionSummary' :: Maybe Text
id = Maybe Text
a} :: ServiceActionSummary)
serviceActionSummary_definitionType :: Lens.Lens' ServiceActionSummary (Prelude.Maybe ServiceActionDefinitionType)
serviceActionSummary_definitionType :: (Maybe ServiceActionDefinitionType
-> f (Maybe ServiceActionDefinitionType))
-> ServiceActionSummary -> f ServiceActionSummary
serviceActionSummary_definitionType = (ServiceActionSummary -> Maybe ServiceActionDefinitionType)
-> (ServiceActionSummary
-> Maybe ServiceActionDefinitionType -> ServiceActionSummary)
-> Lens
ServiceActionSummary
ServiceActionSummary
(Maybe ServiceActionDefinitionType)
(Maybe ServiceActionDefinitionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceActionSummary' {Maybe ServiceActionDefinitionType
definitionType :: Maybe ServiceActionDefinitionType
$sel:definitionType:ServiceActionSummary' :: ServiceActionSummary -> Maybe ServiceActionDefinitionType
definitionType} -> Maybe ServiceActionDefinitionType
definitionType) (\s :: ServiceActionSummary
s@ServiceActionSummary' {} Maybe ServiceActionDefinitionType
a -> ServiceActionSummary
s {$sel:definitionType:ServiceActionSummary' :: Maybe ServiceActionDefinitionType
definitionType = Maybe ServiceActionDefinitionType
a} :: ServiceActionSummary)
serviceActionSummary_description :: Lens.Lens' ServiceActionSummary (Prelude.Maybe Prelude.Text)
serviceActionSummary_description :: (Maybe Text -> f (Maybe Text))
-> ServiceActionSummary -> f ServiceActionSummary
serviceActionSummary_description = (ServiceActionSummary -> Maybe Text)
-> (ServiceActionSummary -> Maybe Text -> ServiceActionSummary)
-> Lens
ServiceActionSummary ServiceActionSummary (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceActionSummary' {Maybe Text
description :: Maybe Text
$sel:description:ServiceActionSummary' :: ServiceActionSummary -> Maybe Text
description} -> Maybe Text
description) (\s :: ServiceActionSummary
s@ServiceActionSummary' {} Maybe Text
a -> ServiceActionSummary
s {$sel:description:ServiceActionSummary' :: Maybe Text
description = Maybe Text
a} :: ServiceActionSummary)
instance Core.FromJSON ServiceActionSummary where
parseJSON :: Value -> Parser ServiceActionSummary
parseJSON =
String
-> (Object -> Parser ServiceActionSummary)
-> Value
-> Parser ServiceActionSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ServiceActionSummary"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe ServiceActionDefinitionType
-> Maybe Text
-> ServiceActionSummary
ServiceActionSummary'
(Maybe Text
-> Maybe Text
-> Maybe ServiceActionDefinitionType
-> Maybe Text
-> ServiceActionSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ServiceActionDefinitionType
-> Maybe Text
-> ServiceActionSummary)
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
"Name")
Parser
(Maybe Text
-> Maybe ServiceActionDefinitionType
-> Maybe Text
-> ServiceActionSummary)
-> Parser (Maybe Text)
-> Parser
(Maybe ServiceActionDefinitionType
-> Maybe Text -> ServiceActionSummary)
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
"Id")
Parser
(Maybe ServiceActionDefinitionType
-> Maybe Text -> ServiceActionSummary)
-> Parser (Maybe ServiceActionDefinitionType)
-> Parser (Maybe Text -> ServiceActionSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ServiceActionDefinitionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefinitionType")
Parser (Maybe Text -> ServiceActionSummary)
-> Parser (Maybe Text) -> Parser ServiceActionSummary
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
"Description")
)
instance Prelude.Hashable ServiceActionSummary
instance Prelude.NFData ServiceActionSummary