{-# 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.CustomerProfiles.Types.WorkflowMetrics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import Amazonka.CustomerProfiles.Types.AppflowIntegrationWorkflowMetrics
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data WorkflowMetrics = WorkflowMetrics'
{
WorkflowMetrics -> Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration :: Prelude.Maybe AppflowIntegrationWorkflowMetrics
}
deriving (WorkflowMetrics -> WorkflowMetrics -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkflowMetrics -> WorkflowMetrics -> Bool
$c/= :: WorkflowMetrics -> WorkflowMetrics -> Bool
== :: WorkflowMetrics -> WorkflowMetrics -> Bool
$c== :: WorkflowMetrics -> WorkflowMetrics -> Bool
Prelude.Eq, ReadPrec [WorkflowMetrics]
ReadPrec WorkflowMetrics
Int -> ReadS WorkflowMetrics
ReadS [WorkflowMetrics]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkflowMetrics]
$creadListPrec :: ReadPrec [WorkflowMetrics]
readPrec :: ReadPrec WorkflowMetrics
$creadPrec :: ReadPrec WorkflowMetrics
readList :: ReadS [WorkflowMetrics]
$creadList :: ReadS [WorkflowMetrics]
readsPrec :: Int -> ReadS WorkflowMetrics
$creadsPrec :: Int -> ReadS WorkflowMetrics
Prelude.Read, Int -> WorkflowMetrics -> ShowS
[WorkflowMetrics] -> ShowS
WorkflowMetrics -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkflowMetrics] -> ShowS
$cshowList :: [WorkflowMetrics] -> ShowS
show :: WorkflowMetrics -> String
$cshow :: WorkflowMetrics -> String
showsPrec :: Int -> WorkflowMetrics -> ShowS
$cshowsPrec :: Int -> WorkflowMetrics -> ShowS
Prelude.Show, forall x. Rep WorkflowMetrics x -> WorkflowMetrics
forall x. WorkflowMetrics -> Rep WorkflowMetrics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep WorkflowMetrics x -> WorkflowMetrics
$cfrom :: forall x. WorkflowMetrics -> Rep WorkflowMetrics x
Prelude.Generic)
newWorkflowMetrics ::
WorkflowMetrics
newWorkflowMetrics :: WorkflowMetrics
newWorkflowMetrics =
WorkflowMetrics'
{ $sel:appflowIntegration:WorkflowMetrics' :: Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration =
forall a. Maybe a
Prelude.Nothing
}
workflowMetrics_appflowIntegration :: Lens.Lens' WorkflowMetrics (Prelude.Maybe AppflowIntegrationWorkflowMetrics)
workflowMetrics_appflowIntegration :: Lens' WorkflowMetrics (Maybe AppflowIntegrationWorkflowMetrics)
workflowMetrics_appflowIntegration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkflowMetrics' {Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration :: Maybe AppflowIntegrationWorkflowMetrics
$sel:appflowIntegration:WorkflowMetrics' :: WorkflowMetrics -> Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration} -> Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration) (\s :: WorkflowMetrics
s@WorkflowMetrics' {} Maybe AppflowIntegrationWorkflowMetrics
a -> WorkflowMetrics
s {$sel:appflowIntegration:WorkflowMetrics' :: Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration = Maybe AppflowIntegrationWorkflowMetrics
a} :: WorkflowMetrics)
instance Data.FromJSON WorkflowMetrics where
parseJSON :: Value -> Parser WorkflowMetrics
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"WorkflowMetrics"
( \Object
x ->
Maybe AppflowIntegrationWorkflowMetrics -> WorkflowMetrics
WorkflowMetrics'
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
"AppflowIntegration")
)
instance Prelude.Hashable WorkflowMetrics where
hashWithSalt :: Int -> WorkflowMetrics -> Int
hashWithSalt Int
_salt WorkflowMetrics' {Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration :: Maybe AppflowIntegrationWorkflowMetrics
$sel:appflowIntegration:WorkflowMetrics' :: WorkflowMetrics -> Maybe AppflowIntegrationWorkflowMetrics
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration
instance Prelude.NFData WorkflowMetrics where
rnf :: WorkflowMetrics -> ()
rnf WorkflowMetrics' {Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration :: Maybe AppflowIntegrationWorkflowMetrics
$sel:appflowIntegration:WorkflowMetrics' :: WorkflowMetrics -> Maybe AppflowIntegrationWorkflowMetrics
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe AppflowIntegrationWorkflowMetrics
appflowIntegration