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