{-# 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.MachineLearning.Types.PerformanceMetrics where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PerformanceMetrics = PerformanceMetrics'
{ PerformanceMetrics -> Maybe (HashMap Text Text)
properties :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text)
}
deriving (PerformanceMetrics -> PerformanceMetrics -> Bool
(PerformanceMetrics -> PerformanceMetrics -> Bool)
-> (PerformanceMetrics -> PerformanceMetrics -> Bool)
-> Eq PerformanceMetrics
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PerformanceMetrics -> PerformanceMetrics -> Bool
$c/= :: PerformanceMetrics -> PerformanceMetrics -> Bool
== :: PerformanceMetrics -> PerformanceMetrics -> Bool
$c== :: PerformanceMetrics -> PerformanceMetrics -> Bool
Prelude.Eq, ReadPrec [PerformanceMetrics]
ReadPrec PerformanceMetrics
Int -> ReadS PerformanceMetrics
ReadS [PerformanceMetrics]
(Int -> ReadS PerformanceMetrics)
-> ReadS [PerformanceMetrics]
-> ReadPrec PerformanceMetrics
-> ReadPrec [PerformanceMetrics]
-> Read PerformanceMetrics
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PerformanceMetrics]
$creadListPrec :: ReadPrec [PerformanceMetrics]
readPrec :: ReadPrec PerformanceMetrics
$creadPrec :: ReadPrec PerformanceMetrics
readList :: ReadS [PerformanceMetrics]
$creadList :: ReadS [PerformanceMetrics]
readsPrec :: Int -> ReadS PerformanceMetrics
$creadsPrec :: Int -> ReadS PerformanceMetrics
Prelude.Read, Int -> PerformanceMetrics -> ShowS
[PerformanceMetrics] -> ShowS
PerformanceMetrics -> String
(Int -> PerformanceMetrics -> ShowS)
-> (PerformanceMetrics -> String)
-> ([PerformanceMetrics] -> ShowS)
-> Show PerformanceMetrics
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PerformanceMetrics] -> ShowS
$cshowList :: [PerformanceMetrics] -> ShowS
show :: PerformanceMetrics -> String
$cshow :: PerformanceMetrics -> String
showsPrec :: Int -> PerformanceMetrics -> ShowS
$cshowsPrec :: Int -> PerformanceMetrics -> ShowS
Prelude.Show, (forall x. PerformanceMetrics -> Rep PerformanceMetrics x)
-> (forall x. Rep PerformanceMetrics x -> PerformanceMetrics)
-> Generic PerformanceMetrics
forall x. Rep PerformanceMetrics x -> PerformanceMetrics
forall x. PerformanceMetrics -> Rep PerformanceMetrics x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PerformanceMetrics x -> PerformanceMetrics
$cfrom :: forall x. PerformanceMetrics -> Rep PerformanceMetrics x
Prelude.Generic)
newPerformanceMetrics ::
PerformanceMetrics
newPerformanceMetrics :: PerformanceMetrics
newPerformanceMetrics =
PerformanceMetrics' :: Maybe (HashMap Text Text) -> PerformanceMetrics
PerformanceMetrics' {$sel:properties:PerformanceMetrics' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing}
performanceMetrics_properties :: Lens.Lens' PerformanceMetrics (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
performanceMetrics_properties :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PerformanceMetrics -> f PerformanceMetrics
performanceMetrics_properties = (PerformanceMetrics -> Maybe (HashMap Text Text))
-> (PerformanceMetrics
-> Maybe (HashMap Text Text) -> PerformanceMetrics)
-> Lens
PerformanceMetrics
PerformanceMetrics
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PerformanceMetrics' {Maybe (HashMap Text Text)
properties :: Maybe (HashMap Text Text)
$sel:properties:PerformanceMetrics' :: PerformanceMetrics -> Maybe (HashMap Text Text)
properties} -> Maybe (HashMap Text Text)
properties) (\s :: PerformanceMetrics
s@PerformanceMetrics' {} Maybe (HashMap Text Text)
a -> PerformanceMetrics
s {$sel:properties:PerformanceMetrics' :: Maybe (HashMap Text Text)
properties = Maybe (HashMap Text Text)
a} :: PerformanceMetrics) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PerformanceMetrics -> f PerformanceMetrics)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PerformanceMetrics
-> f PerformanceMetrics
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.FromJSON PerformanceMetrics where
parseJSON :: Value -> Parser PerformanceMetrics
parseJSON =
String
-> (Object -> Parser PerformanceMetrics)
-> Value
-> Parser PerformanceMetrics
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"PerformanceMetrics"
( \Object
x ->
Maybe (HashMap Text Text) -> PerformanceMetrics
PerformanceMetrics'
(Maybe (HashMap Text Text) -> PerformanceMetrics)
-> Parser (Maybe (HashMap Text Text)) -> Parser PerformanceMetrics
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Properties" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
)
instance Prelude.Hashable PerformanceMetrics
instance Prelude.NFData PerformanceMetrics