module Stratosphere.SageMaker.ModelPackage.BiasProperty (
        module Exports, BiasProperty(..), mkBiasProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SageMaker.ModelPackage.MetricsSourceProperty as Exports
import Stratosphere.ResourceProperties
data BiasProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-bias.html>
    BiasProperty {BiasProperty -> ()
haddock_workaround_ :: (),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-bias.html#cfn-sagemaker-modelpackage-bias-posttrainingreport>
                  BiasProperty -> Maybe MetricsSourceProperty
postTrainingReport :: (Prelude.Maybe MetricsSourceProperty),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-bias.html#cfn-sagemaker-modelpackage-bias-pretrainingreport>
                  BiasProperty -> Maybe MetricsSourceProperty
preTrainingReport :: (Prelude.Maybe MetricsSourceProperty),
                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-bias.html#cfn-sagemaker-modelpackage-bias-report>
                  BiasProperty -> Maybe MetricsSourceProperty
report :: (Prelude.Maybe MetricsSourceProperty)}
  deriving stock (BiasProperty -> BiasProperty -> Bool
(BiasProperty -> BiasProperty -> Bool)
-> (BiasProperty -> BiasProperty -> Bool) -> Eq BiasProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BiasProperty -> BiasProperty -> Bool
== :: BiasProperty -> BiasProperty -> Bool
$c/= :: BiasProperty -> BiasProperty -> Bool
/= :: BiasProperty -> BiasProperty -> Bool
Prelude.Eq, Int -> BiasProperty -> ShowS
[BiasProperty] -> ShowS
BiasProperty -> String
(Int -> BiasProperty -> ShowS)
-> (BiasProperty -> String)
-> ([BiasProperty] -> ShowS)
-> Show BiasProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BiasProperty -> ShowS
showsPrec :: Int -> BiasProperty -> ShowS
$cshow :: BiasProperty -> String
show :: BiasProperty -> String
$cshowList :: [BiasProperty] -> ShowS
showList :: [BiasProperty] -> ShowS
Prelude.Show)
mkBiasProperty :: BiasProperty
mkBiasProperty :: BiasProperty
mkBiasProperty
  = BiasProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), postTrainingReport :: Maybe MetricsSourceProperty
postTrainingReport = Maybe MetricsSourceProperty
forall a. Maybe a
Prelude.Nothing,
       preTrainingReport :: Maybe MetricsSourceProperty
preTrainingReport = Maybe MetricsSourceProperty
forall a. Maybe a
Prelude.Nothing, report :: Maybe MetricsSourceProperty
report = Maybe MetricsSourceProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BiasProperty where
  toResourceProperties :: BiasProperty -> ResourceProperties
toResourceProperties BiasProperty {Maybe MetricsSourceProperty
()
haddock_workaround_ :: BiasProperty -> ()
postTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
preTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
report :: BiasProperty -> Maybe MetricsSourceProperty
haddock_workaround_ :: ()
postTrainingReport :: Maybe MetricsSourceProperty
preTrainingReport :: Maybe MetricsSourceProperty
report :: Maybe MetricsSourceProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::ModelPackage.Bias",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
                        ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                           [Key -> MetricsSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PostTrainingReport" (MetricsSourceProperty -> (Key, Value))
-> Maybe MetricsSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricsSourceProperty
postTrainingReport,
                            Key -> MetricsSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PreTrainingReport" (MetricsSourceProperty -> (Key, Value))
-> Maybe MetricsSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricsSourceProperty
preTrainingReport,
                            Key -> MetricsSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Report" (MetricsSourceProperty -> (Key, Value))
-> Maybe MetricsSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricsSourceProperty
report])}
instance JSON.ToJSON BiasProperty where
  toJSON :: BiasProperty -> Value
toJSON BiasProperty {Maybe MetricsSourceProperty
()
haddock_workaround_ :: BiasProperty -> ()
postTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
preTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
report :: BiasProperty -> Maybe MetricsSourceProperty
haddock_workaround_ :: ()
postTrainingReport :: Maybe MetricsSourceProperty
preTrainingReport :: Maybe MetricsSourceProperty
report :: Maybe MetricsSourceProperty
..}
    = [(Key, Value)] -> Value
JSON.object
        ([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
              [Key -> MetricsSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PostTrainingReport" (MetricsSourceProperty -> (Key, Value))
-> Maybe MetricsSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricsSourceProperty
postTrainingReport,
               Key -> MetricsSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"PreTrainingReport" (MetricsSourceProperty -> (Key, Value))
-> Maybe MetricsSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricsSourceProperty
preTrainingReport,
               Key -> MetricsSourceProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Report" (MetricsSourceProperty -> (Key, Value))
-> Maybe MetricsSourceProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MetricsSourceProperty
report]))
instance Property "PostTrainingReport" BiasProperty where
  type PropertyType "PostTrainingReport" BiasProperty = MetricsSourceProperty
  set :: PropertyType "PostTrainingReport" BiasProperty
-> BiasProperty -> BiasProperty
set PropertyType "PostTrainingReport" BiasProperty
newValue BiasProperty {Maybe MetricsSourceProperty
()
haddock_workaround_ :: BiasProperty -> ()
postTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
preTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
report :: BiasProperty -> Maybe MetricsSourceProperty
haddock_workaround_ :: ()
postTrainingReport :: Maybe MetricsSourceProperty
preTrainingReport :: Maybe MetricsSourceProperty
report :: Maybe MetricsSourceProperty
..}
    = BiasProperty {postTrainingReport :: Maybe MetricsSourceProperty
postTrainingReport = MetricsSourceProperty -> Maybe MetricsSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PostTrainingReport" BiasProperty
MetricsSourceProperty
newValue, Maybe MetricsSourceProperty
()
haddock_workaround_ :: ()
preTrainingReport :: Maybe MetricsSourceProperty
report :: Maybe MetricsSourceProperty
haddock_workaround_ :: ()
preTrainingReport :: Maybe MetricsSourceProperty
report :: Maybe MetricsSourceProperty
..}
instance Property "PreTrainingReport" BiasProperty where
  type PropertyType "PreTrainingReport" BiasProperty = MetricsSourceProperty
  set :: PropertyType "PreTrainingReport" BiasProperty
-> BiasProperty -> BiasProperty
set PropertyType "PreTrainingReport" BiasProperty
newValue BiasProperty {Maybe MetricsSourceProperty
()
haddock_workaround_ :: BiasProperty -> ()
postTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
preTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
report :: BiasProperty -> Maybe MetricsSourceProperty
haddock_workaround_ :: ()
postTrainingReport :: Maybe MetricsSourceProperty
preTrainingReport :: Maybe MetricsSourceProperty
report :: Maybe MetricsSourceProperty
..}
    = BiasProperty {preTrainingReport :: Maybe MetricsSourceProperty
preTrainingReport = MetricsSourceProperty -> Maybe MetricsSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PreTrainingReport" BiasProperty
MetricsSourceProperty
newValue, Maybe MetricsSourceProperty
()
haddock_workaround_ :: ()
postTrainingReport :: Maybe MetricsSourceProperty
report :: Maybe MetricsSourceProperty
haddock_workaround_ :: ()
postTrainingReport :: Maybe MetricsSourceProperty
report :: Maybe MetricsSourceProperty
..}
instance Property "Report" BiasProperty where
  type PropertyType "Report" BiasProperty = MetricsSourceProperty
  set :: PropertyType "Report" BiasProperty -> BiasProperty -> BiasProperty
set PropertyType "Report" BiasProperty
newValue BiasProperty {Maybe MetricsSourceProperty
()
haddock_workaround_ :: BiasProperty -> ()
postTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
preTrainingReport :: BiasProperty -> Maybe MetricsSourceProperty
report :: BiasProperty -> Maybe MetricsSourceProperty
haddock_workaround_ :: ()
postTrainingReport :: Maybe MetricsSourceProperty
preTrainingReport :: Maybe MetricsSourceProperty
report :: Maybe MetricsSourceProperty
..}
    = BiasProperty {report :: Maybe MetricsSourceProperty
report = MetricsSourceProperty -> Maybe MetricsSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Report" BiasProperty
MetricsSourceProperty
newValue, Maybe MetricsSourceProperty
()
haddock_workaround_ :: ()
postTrainingReport :: Maybe MetricsSourceProperty
preTrainingReport :: Maybe MetricsSourceProperty
haddock_workaround_ :: ()
postTrainingReport :: Maybe MetricsSourceProperty
preTrainingReport :: Maybe MetricsSourceProperty
..}