{-# 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.SageMaker.Types.ModelDataQuality where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.MetricsSource
data ModelDataQuality = ModelDataQuality'
{
ModelDataQuality -> Maybe MetricsSource
constraints :: Prelude.Maybe MetricsSource,
ModelDataQuality -> Maybe MetricsSource
statistics :: Prelude.Maybe MetricsSource
}
deriving (ModelDataQuality -> ModelDataQuality -> Bool
(ModelDataQuality -> ModelDataQuality -> Bool)
-> (ModelDataQuality -> ModelDataQuality -> Bool)
-> Eq ModelDataQuality
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelDataQuality -> ModelDataQuality -> Bool
$c/= :: ModelDataQuality -> ModelDataQuality -> Bool
== :: ModelDataQuality -> ModelDataQuality -> Bool
$c== :: ModelDataQuality -> ModelDataQuality -> Bool
Prelude.Eq, ReadPrec [ModelDataQuality]
ReadPrec ModelDataQuality
Int -> ReadS ModelDataQuality
ReadS [ModelDataQuality]
(Int -> ReadS ModelDataQuality)
-> ReadS [ModelDataQuality]
-> ReadPrec ModelDataQuality
-> ReadPrec [ModelDataQuality]
-> Read ModelDataQuality
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelDataQuality]
$creadListPrec :: ReadPrec [ModelDataQuality]
readPrec :: ReadPrec ModelDataQuality
$creadPrec :: ReadPrec ModelDataQuality
readList :: ReadS [ModelDataQuality]
$creadList :: ReadS [ModelDataQuality]
readsPrec :: Int -> ReadS ModelDataQuality
$creadsPrec :: Int -> ReadS ModelDataQuality
Prelude.Read, Int -> ModelDataQuality -> ShowS
[ModelDataQuality] -> ShowS
ModelDataQuality -> String
(Int -> ModelDataQuality -> ShowS)
-> (ModelDataQuality -> String)
-> ([ModelDataQuality] -> ShowS)
-> Show ModelDataQuality
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelDataQuality] -> ShowS
$cshowList :: [ModelDataQuality] -> ShowS
show :: ModelDataQuality -> String
$cshow :: ModelDataQuality -> String
showsPrec :: Int -> ModelDataQuality -> ShowS
$cshowsPrec :: Int -> ModelDataQuality -> ShowS
Prelude.Show, (forall x. ModelDataQuality -> Rep ModelDataQuality x)
-> (forall x. Rep ModelDataQuality x -> ModelDataQuality)
-> Generic ModelDataQuality
forall x. Rep ModelDataQuality x -> ModelDataQuality
forall x. ModelDataQuality -> Rep ModelDataQuality x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelDataQuality x -> ModelDataQuality
$cfrom :: forall x. ModelDataQuality -> Rep ModelDataQuality x
Prelude.Generic)
newModelDataQuality ::
ModelDataQuality
newModelDataQuality :: ModelDataQuality
newModelDataQuality =
ModelDataQuality' :: Maybe MetricsSource -> Maybe MetricsSource -> ModelDataQuality
ModelDataQuality'
{ $sel:constraints:ModelDataQuality' :: Maybe MetricsSource
constraints = Maybe MetricsSource
forall a. Maybe a
Prelude.Nothing,
$sel:statistics:ModelDataQuality' :: Maybe MetricsSource
statistics = Maybe MetricsSource
forall a. Maybe a
Prelude.Nothing
}
modelDataQuality_constraints :: Lens.Lens' ModelDataQuality (Prelude.Maybe MetricsSource)
modelDataQuality_constraints :: (Maybe MetricsSource -> f (Maybe MetricsSource))
-> ModelDataQuality -> f ModelDataQuality
modelDataQuality_constraints = (ModelDataQuality -> Maybe MetricsSource)
-> (ModelDataQuality -> Maybe MetricsSource -> ModelDataQuality)
-> Lens
ModelDataQuality
ModelDataQuality
(Maybe MetricsSource)
(Maybe MetricsSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDataQuality' {Maybe MetricsSource
constraints :: Maybe MetricsSource
$sel:constraints:ModelDataQuality' :: ModelDataQuality -> Maybe MetricsSource
constraints} -> Maybe MetricsSource
constraints) (\s :: ModelDataQuality
s@ModelDataQuality' {} Maybe MetricsSource
a -> ModelDataQuality
s {$sel:constraints:ModelDataQuality' :: Maybe MetricsSource
constraints = Maybe MetricsSource
a} :: ModelDataQuality)
modelDataQuality_statistics :: Lens.Lens' ModelDataQuality (Prelude.Maybe MetricsSource)
modelDataQuality_statistics :: (Maybe MetricsSource -> f (Maybe MetricsSource))
-> ModelDataQuality -> f ModelDataQuality
modelDataQuality_statistics = (ModelDataQuality -> Maybe MetricsSource)
-> (ModelDataQuality -> Maybe MetricsSource -> ModelDataQuality)
-> Lens
ModelDataQuality
ModelDataQuality
(Maybe MetricsSource)
(Maybe MetricsSource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelDataQuality' {Maybe MetricsSource
statistics :: Maybe MetricsSource
$sel:statistics:ModelDataQuality' :: ModelDataQuality -> Maybe MetricsSource
statistics} -> Maybe MetricsSource
statistics) (\s :: ModelDataQuality
s@ModelDataQuality' {} Maybe MetricsSource
a -> ModelDataQuality
s {$sel:statistics:ModelDataQuality' :: Maybe MetricsSource
statistics = Maybe MetricsSource
a} :: ModelDataQuality)
instance Core.FromJSON ModelDataQuality where
parseJSON :: Value -> Parser ModelDataQuality
parseJSON =
String
-> (Object -> Parser ModelDataQuality)
-> Value
-> Parser ModelDataQuality
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ModelDataQuality"
( \Object
x ->
Maybe MetricsSource -> Maybe MetricsSource -> ModelDataQuality
ModelDataQuality'
(Maybe MetricsSource -> Maybe MetricsSource -> ModelDataQuality)
-> Parser (Maybe MetricsSource)
-> Parser (Maybe MetricsSource -> ModelDataQuality)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MetricsSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Constraints")
Parser (Maybe MetricsSource -> ModelDataQuality)
-> Parser (Maybe MetricsSource) -> Parser ModelDataQuality
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe MetricsSource)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Statistics")
)
instance Prelude.Hashable ModelDataQuality
instance Prelude.NFData ModelDataQuality
instance Core.ToJSON ModelDataQuality where
toJSON :: ModelDataQuality -> Value
toJSON ModelDataQuality' {Maybe MetricsSource
statistics :: Maybe MetricsSource
constraints :: Maybe MetricsSource
$sel:statistics:ModelDataQuality' :: ModelDataQuality -> Maybe MetricsSource
$sel:constraints:ModelDataQuality' :: ModelDataQuality -> Maybe MetricsSource
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Constraints" Text -> MetricsSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MetricsSource -> Pair) -> Maybe MetricsSource -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricsSource
constraints,
(Text
"Statistics" Text -> MetricsSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (MetricsSource -> Pair) -> Maybe MetricsSource -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricsSource
statistics
]
)