{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.ServiceCatalog.Types.ServiceActionDefinitionType
data ServiceActionSummary = ServiceActionSummary'
{
ServiceActionSummary -> Maybe ServiceActionDefinitionType
definitionType :: Prelude.Maybe ServiceActionDefinitionType,
ServiceActionSummary -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ServiceActionSummary -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
ServiceActionSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (ServiceActionSummary -> ServiceActionSummary -> Bool
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]
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
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. 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'
{ $sel:definitionType:ServiceActionSummary' :: Maybe ServiceActionDefinitionType
definitionType =
forall a. Maybe a
Prelude.Nothing,
$sel:description:ServiceActionSummary' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:id:ServiceActionSummary' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:name:ServiceActionSummary' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing
}
serviceActionSummary_definitionType :: Lens.Lens' ServiceActionSummary (Prelude.Maybe ServiceActionDefinitionType)
serviceActionSummary_definitionType :: Lens' ServiceActionSummary (Maybe ServiceActionDefinitionType)
serviceActionSummary_definitionType = 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 :: Lens' ServiceActionSummary (Maybe Text)
serviceActionSummary_description = 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)
serviceActionSummary_id :: Lens.Lens' ServiceActionSummary (Prelude.Maybe Prelude.Text)
serviceActionSummary_id :: Lens' ServiceActionSummary (Maybe Text)
serviceActionSummary_id = 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_name :: Lens.Lens' ServiceActionSummary (Prelude.Maybe Prelude.Text)
serviceActionSummary_name :: Lens' ServiceActionSummary (Maybe Text)
serviceActionSummary_name = 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)
instance Data.FromJSON ServiceActionSummary where
parseJSON :: Value -> Parser ServiceActionSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ServiceActionSummary"
( \Object
x ->
Maybe ServiceActionDefinitionType
-> Maybe Text -> Maybe Text -> Maybe Text -> ServiceActionSummary
ServiceActionSummary'
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
"DefinitionType")
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
"Description")
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
"Id")
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
"Name")
)
instance Prelude.Hashable ServiceActionSummary where
hashWithSalt :: Int -> ServiceActionSummary -> Int
hashWithSalt Int
_salt ServiceActionSummary' {Maybe Text
Maybe ServiceActionDefinitionType
name :: Maybe Text
id :: Maybe Text
description :: Maybe Text
definitionType :: Maybe ServiceActionDefinitionType
$sel:name:ServiceActionSummary' :: ServiceActionSummary -> Maybe Text
$sel:id:ServiceActionSummary' :: ServiceActionSummary -> Maybe Text
$sel:description:ServiceActionSummary' :: ServiceActionSummary -> Maybe Text
$sel:definitionType:ServiceActionSummary' :: ServiceActionSummary -> Maybe ServiceActionDefinitionType
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceActionDefinitionType
definitionType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
id
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
instance Prelude.NFData ServiceActionSummary where
rnf :: ServiceActionSummary -> ()
rnf ServiceActionSummary' {Maybe Text
Maybe ServiceActionDefinitionType
name :: Maybe Text
id :: Maybe Text
description :: Maybe Text
definitionType :: Maybe ServiceActionDefinitionType
$sel:name:ServiceActionSummary' :: ServiceActionSummary -> Maybe Text
$sel:id:ServiceActionSummary' :: ServiceActionSummary -> Maybe Text
$sel:description:ServiceActionSummary' :: ServiceActionSummary -> Maybe Text
$sel:definitionType:ServiceActionSummary' :: ServiceActionSummary -> Maybe ServiceActionDefinitionType
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceActionDefinitionType
definitionType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name