{-# 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.ServiceActionDetail 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.ServiceActionDefinitionKey
import Amazonka.ServiceCatalog.Types.ServiceActionSummary
data ServiceActionDetail = ServiceActionDetail'
{
ServiceActionDetail
-> Maybe (HashMap ServiceActionDefinitionKey Text)
definition :: Prelude.Maybe (Prelude.HashMap ServiceActionDefinitionKey Prelude.Text),
ServiceActionDetail -> Maybe ServiceActionSummary
serviceActionSummary :: Prelude.Maybe ServiceActionSummary
}
deriving (ServiceActionDetail -> ServiceActionDetail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ServiceActionDetail -> ServiceActionDetail -> Bool
$c/= :: ServiceActionDetail -> ServiceActionDetail -> Bool
== :: ServiceActionDetail -> ServiceActionDetail -> Bool
$c== :: ServiceActionDetail -> ServiceActionDetail -> Bool
Prelude.Eq, ReadPrec [ServiceActionDetail]
ReadPrec ServiceActionDetail
Int -> ReadS ServiceActionDetail
ReadS [ServiceActionDetail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ServiceActionDetail]
$creadListPrec :: ReadPrec [ServiceActionDetail]
readPrec :: ReadPrec ServiceActionDetail
$creadPrec :: ReadPrec ServiceActionDetail
readList :: ReadS [ServiceActionDetail]
$creadList :: ReadS [ServiceActionDetail]
readsPrec :: Int -> ReadS ServiceActionDetail
$creadsPrec :: Int -> ReadS ServiceActionDetail
Prelude.Read, Int -> ServiceActionDetail -> ShowS
[ServiceActionDetail] -> ShowS
ServiceActionDetail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ServiceActionDetail] -> ShowS
$cshowList :: [ServiceActionDetail] -> ShowS
show :: ServiceActionDetail -> String
$cshow :: ServiceActionDetail -> String
showsPrec :: Int -> ServiceActionDetail -> ShowS
$cshowsPrec :: Int -> ServiceActionDetail -> ShowS
Prelude.Show, forall x. Rep ServiceActionDetail x -> ServiceActionDetail
forall x. ServiceActionDetail -> Rep ServiceActionDetail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ServiceActionDetail x -> ServiceActionDetail
$cfrom :: forall x. ServiceActionDetail -> Rep ServiceActionDetail x
Prelude.Generic)
newServiceActionDetail ::
ServiceActionDetail
newServiceActionDetail :: ServiceActionDetail
newServiceActionDetail =
ServiceActionDetail'
{ $sel:definition:ServiceActionDetail' :: Maybe (HashMap ServiceActionDefinitionKey Text)
definition = forall a. Maybe a
Prelude.Nothing,
$sel:serviceActionSummary:ServiceActionDetail' :: Maybe ServiceActionSummary
serviceActionSummary = forall a. Maybe a
Prelude.Nothing
}
serviceActionDetail_definition :: Lens.Lens' ServiceActionDetail (Prelude.Maybe (Prelude.HashMap ServiceActionDefinitionKey Prelude.Text))
serviceActionDetail_definition :: Lens'
ServiceActionDetail
(Maybe (HashMap ServiceActionDefinitionKey Text))
serviceActionDetail_definition = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceActionDetail' {Maybe (HashMap ServiceActionDefinitionKey Text)
definition :: Maybe (HashMap ServiceActionDefinitionKey Text)
$sel:definition:ServiceActionDetail' :: ServiceActionDetail
-> Maybe (HashMap ServiceActionDefinitionKey Text)
definition} -> Maybe (HashMap ServiceActionDefinitionKey Text)
definition) (\s :: ServiceActionDetail
s@ServiceActionDetail' {} Maybe (HashMap ServiceActionDefinitionKey Text)
a -> ServiceActionDetail
s {$sel:definition:ServiceActionDetail' :: Maybe (HashMap ServiceActionDefinitionKey Text)
definition = Maybe (HashMap ServiceActionDefinitionKey Text)
a} :: ServiceActionDetail) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
serviceActionDetail_serviceActionSummary :: Lens.Lens' ServiceActionDetail (Prelude.Maybe ServiceActionSummary)
serviceActionDetail_serviceActionSummary :: Lens' ServiceActionDetail (Maybe ServiceActionSummary)
serviceActionDetail_serviceActionSummary = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ServiceActionDetail' {Maybe ServiceActionSummary
serviceActionSummary :: Maybe ServiceActionSummary
$sel:serviceActionSummary:ServiceActionDetail' :: ServiceActionDetail -> Maybe ServiceActionSummary
serviceActionSummary} -> Maybe ServiceActionSummary
serviceActionSummary) (\s :: ServiceActionDetail
s@ServiceActionDetail' {} Maybe ServiceActionSummary
a -> ServiceActionDetail
s {$sel:serviceActionSummary:ServiceActionDetail' :: Maybe ServiceActionSummary
serviceActionSummary = Maybe ServiceActionSummary
a} :: ServiceActionDetail)
instance Data.FromJSON ServiceActionDetail where
parseJSON :: Value -> Parser ServiceActionDetail
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ServiceActionDetail"
( \Object
x ->
Maybe (HashMap ServiceActionDefinitionKey Text)
-> Maybe ServiceActionSummary -> ServiceActionDetail
ServiceActionDetail'
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
"Definition" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
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
"ServiceActionSummary")
)
instance Prelude.Hashable ServiceActionDetail where
hashWithSalt :: Int -> ServiceActionDetail -> Int
hashWithSalt Int
_salt ServiceActionDetail' {Maybe (HashMap ServiceActionDefinitionKey Text)
Maybe ServiceActionSummary
serviceActionSummary :: Maybe ServiceActionSummary
definition :: Maybe (HashMap ServiceActionDefinitionKey Text)
$sel:serviceActionSummary:ServiceActionDetail' :: ServiceActionDetail -> Maybe ServiceActionSummary
$sel:definition:ServiceActionDetail' :: ServiceActionDetail
-> Maybe (HashMap ServiceActionDefinitionKey Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap ServiceActionDefinitionKey Text)
definition
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ServiceActionSummary
serviceActionSummary
instance Prelude.NFData ServiceActionDetail where
rnf :: ServiceActionDetail -> ()
rnf ServiceActionDetail' {Maybe (HashMap ServiceActionDefinitionKey Text)
Maybe ServiceActionSummary
serviceActionSummary :: Maybe ServiceActionSummary
definition :: Maybe (HashMap ServiceActionDefinitionKey Text)
$sel:serviceActionSummary:ServiceActionDetail' :: ServiceActionDetail -> Maybe ServiceActionSummary
$sel:definition:ServiceActionDetail' :: ServiceActionDetail
-> Maybe (HashMap ServiceActionDefinitionKey Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap ServiceActionDefinitionKey Text)
definition
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ServiceActionSummary
serviceActionSummary