{-# 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.ModelBiasBaselineConfig 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 ModelBiasBaselineConfig = ModelBiasBaselineConfig'
{ ModelBiasBaselineConfig -> Maybe MonitoringConstraintsResource
constraintsResource :: Prelude.Maybe MonitoringConstraintsResource,
ModelBiasBaselineConfig -> Maybe Text
baseliningJobName :: Prelude.Maybe Prelude.Text
}
deriving (ModelBiasBaselineConfig -> ModelBiasBaselineConfig -> Bool
(ModelBiasBaselineConfig -> ModelBiasBaselineConfig -> Bool)
-> (ModelBiasBaselineConfig -> ModelBiasBaselineConfig -> Bool)
-> Eq ModelBiasBaselineConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModelBiasBaselineConfig -> ModelBiasBaselineConfig -> Bool
$c/= :: ModelBiasBaselineConfig -> ModelBiasBaselineConfig -> Bool
== :: ModelBiasBaselineConfig -> ModelBiasBaselineConfig -> Bool
$c== :: ModelBiasBaselineConfig -> ModelBiasBaselineConfig -> Bool
Prelude.Eq, ReadPrec [ModelBiasBaselineConfig]
ReadPrec ModelBiasBaselineConfig
Int -> ReadS ModelBiasBaselineConfig
ReadS [ModelBiasBaselineConfig]
(Int -> ReadS ModelBiasBaselineConfig)
-> ReadS [ModelBiasBaselineConfig]
-> ReadPrec ModelBiasBaselineConfig
-> ReadPrec [ModelBiasBaselineConfig]
-> Read ModelBiasBaselineConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModelBiasBaselineConfig]
$creadListPrec :: ReadPrec [ModelBiasBaselineConfig]
readPrec :: ReadPrec ModelBiasBaselineConfig
$creadPrec :: ReadPrec ModelBiasBaselineConfig
readList :: ReadS [ModelBiasBaselineConfig]
$creadList :: ReadS [ModelBiasBaselineConfig]
readsPrec :: Int -> ReadS ModelBiasBaselineConfig
$creadsPrec :: Int -> ReadS ModelBiasBaselineConfig
Prelude.Read, Int -> ModelBiasBaselineConfig -> ShowS
[ModelBiasBaselineConfig] -> ShowS
ModelBiasBaselineConfig -> String
(Int -> ModelBiasBaselineConfig -> ShowS)
-> (ModelBiasBaselineConfig -> String)
-> ([ModelBiasBaselineConfig] -> ShowS)
-> Show ModelBiasBaselineConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModelBiasBaselineConfig] -> ShowS
$cshowList :: [ModelBiasBaselineConfig] -> ShowS
show :: ModelBiasBaselineConfig -> String
$cshow :: ModelBiasBaselineConfig -> String
showsPrec :: Int -> ModelBiasBaselineConfig -> ShowS
$cshowsPrec :: Int -> ModelBiasBaselineConfig -> ShowS
Prelude.Show, (forall x.
ModelBiasBaselineConfig -> Rep ModelBiasBaselineConfig x)
-> (forall x.
Rep ModelBiasBaselineConfig x -> ModelBiasBaselineConfig)
-> Generic ModelBiasBaselineConfig
forall x. Rep ModelBiasBaselineConfig x -> ModelBiasBaselineConfig
forall x. ModelBiasBaselineConfig -> Rep ModelBiasBaselineConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModelBiasBaselineConfig x -> ModelBiasBaselineConfig
$cfrom :: forall x. ModelBiasBaselineConfig -> Rep ModelBiasBaselineConfig x
Prelude.Generic)
newModelBiasBaselineConfig ::
ModelBiasBaselineConfig
newModelBiasBaselineConfig :: ModelBiasBaselineConfig
newModelBiasBaselineConfig =
ModelBiasBaselineConfig' :: Maybe MonitoringConstraintsResource
-> Maybe Text -> ModelBiasBaselineConfig
ModelBiasBaselineConfig'
{ $sel:constraintsResource:ModelBiasBaselineConfig' :: Maybe MonitoringConstraintsResource
constraintsResource =
Maybe MonitoringConstraintsResource
forall a. Maybe a
Prelude.Nothing,
$sel:baseliningJobName:ModelBiasBaselineConfig' :: Maybe Text
baseliningJobName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
modelBiasBaselineConfig_constraintsResource :: Lens.Lens' ModelBiasBaselineConfig (Prelude.Maybe MonitoringConstraintsResource)
modelBiasBaselineConfig_constraintsResource :: (Maybe MonitoringConstraintsResource
-> f (Maybe MonitoringConstraintsResource))
-> ModelBiasBaselineConfig -> f ModelBiasBaselineConfig
modelBiasBaselineConfig_constraintsResource = (ModelBiasBaselineConfig -> Maybe MonitoringConstraintsResource)
-> (ModelBiasBaselineConfig
-> Maybe MonitoringConstraintsResource -> ModelBiasBaselineConfig)
-> Lens
ModelBiasBaselineConfig
ModelBiasBaselineConfig
(Maybe MonitoringConstraintsResource)
(Maybe MonitoringConstraintsResource)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelBiasBaselineConfig' {Maybe MonitoringConstraintsResource
constraintsResource :: Maybe MonitoringConstraintsResource
$sel:constraintsResource:ModelBiasBaselineConfig' :: ModelBiasBaselineConfig -> Maybe MonitoringConstraintsResource
constraintsResource} -> Maybe MonitoringConstraintsResource
constraintsResource) (\s :: ModelBiasBaselineConfig
s@ModelBiasBaselineConfig' {} Maybe MonitoringConstraintsResource
a -> ModelBiasBaselineConfig
s {$sel:constraintsResource:ModelBiasBaselineConfig' :: Maybe MonitoringConstraintsResource
constraintsResource = Maybe MonitoringConstraintsResource
a} :: ModelBiasBaselineConfig)
modelBiasBaselineConfig_baseliningJobName :: Lens.Lens' ModelBiasBaselineConfig (Prelude.Maybe Prelude.Text)
modelBiasBaselineConfig_baseliningJobName :: (Maybe Text -> f (Maybe Text))
-> ModelBiasBaselineConfig -> f ModelBiasBaselineConfig
modelBiasBaselineConfig_baseliningJobName = (ModelBiasBaselineConfig -> Maybe Text)
-> (ModelBiasBaselineConfig
-> Maybe Text -> ModelBiasBaselineConfig)
-> Lens
ModelBiasBaselineConfig
ModelBiasBaselineConfig
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModelBiasBaselineConfig' {Maybe Text
baseliningJobName :: Maybe Text
$sel:baseliningJobName:ModelBiasBaselineConfig' :: ModelBiasBaselineConfig -> Maybe Text
baseliningJobName} -> Maybe Text
baseliningJobName) (\s :: ModelBiasBaselineConfig
s@ModelBiasBaselineConfig' {} Maybe Text
a -> ModelBiasBaselineConfig
s {$sel:baseliningJobName:ModelBiasBaselineConfig' :: Maybe Text
baseliningJobName = Maybe Text
a} :: ModelBiasBaselineConfig)
instance Core.FromJSON ModelBiasBaselineConfig where
parseJSON :: Value -> Parser ModelBiasBaselineConfig
parseJSON =
String
-> (Object -> Parser ModelBiasBaselineConfig)
-> Value
-> Parser ModelBiasBaselineConfig
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ModelBiasBaselineConfig"
( \Object
x ->
Maybe MonitoringConstraintsResource
-> Maybe Text -> ModelBiasBaselineConfig
ModelBiasBaselineConfig'
(Maybe MonitoringConstraintsResource
-> Maybe Text -> ModelBiasBaselineConfig)
-> Parser (Maybe MonitoringConstraintsResource)
-> Parser (Maybe Text -> ModelBiasBaselineConfig)
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 -> ModelBiasBaselineConfig)
-> Parser (Maybe Text) -> Parser ModelBiasBaselineConfig
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 ModelBiasBaselineConfig
instance Prelude.NFData ModelBiasBaselineConfig
instance Core.ToJSON ModelBiasBaselineConfig where
toJSON :: ModelBiasBaselineConfig -> Value
toJSON ModelBiasBaselineConfig' {Maybe Text
Maybe MonitoringConstraintsResource
baseliningJobName :: Maybe Text
constraintsResource :: Maybe MonitoringConstraintsResource
$sel:baseliningJobName:ModelBiasBaselineConfig' :: ModelBiasBaselineConfig -> Maybe Text
$sel:constraintsResource:ModelBiasBaselineConfig' :: ModelBiasBaselineConfig -> 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
]
)