module Stratosphere.SageMaker.ModelPackage.ExplainabilityProperty (
        module Exports, ExplainabilityProperty(..),
        mkExplainabilityProperty
    ) 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 ExplainabilityProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-explainability.html>
    ExplainabilityProperty {ExplainabilityProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelpackage-explainability.html#cfn-sagemaker-modelpackage-explainability-report>
                            ExplainabilityProperty -> Maybe MetricsSourceProperty
report :: (Prelude.Maybe MetricsSourceProperty)}
  deriving stock (ExplainabilityProperty -> ExplainabilityProperty -> Bool
(ExplainabilityProperty -> ExplainabilityProperty -> Bool)
-> (ExplainabilityProperty -> ExplainabilityProperty -> Bool)
-> Eq ExplainabilityProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ExplainabilityProperty -> ExplainabilityProperty -> Bool
== :: ExplainabilityProperty -> ExplainabilityProperty -> Bool
$c/= :: ExplainabilityProperty -> ExplainabilityProperty -> Bool
/= :: ExplainabilityProperty -> ExplainabilityProperty -> Bool
Prelude.Eq, Int -> ExplainabilityProperty -> ShowS
[ExplainabilityProperty] -> ShowS
ExplainabilityProperty -> String
(Int -> ExplainabilityProperty -> ShowS)
-> (ExplainabilityProperty -> String)
-> ([ExplainabilityProperty] -> ShowS)
-> Show ExplainabilityProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ExplainabilityProperty -> ShowS
showsPrec :: Int -> ExplainabilityProperty -> ShowS
$cshow :: ExplainabilityProperty -> String
show :: ExplainabilityProperty -> String
$cshowList :: [ExplainabilityProperty] -> ShowS
showList :: [ExplainabilityProperty] -> ShowS
Prelude.Show)
mkExplainabilityProperty :: ExplainabilityProperty
mkExplainabilityProperty :: ExplainabilityProperty
mkExplainabilityProperty
  = ExplainabilityProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), report :: Maybe MetricsSourceProperty
report = Maybe MetricsSourceProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ExplainabilityProperty where
  toResourceProperties :: ExplainabilityProperty -> ResourceProperties
toResourceProperties ExplainabilityProperty {Maybe MetricsSourceProperty
()
haddock_workaround_ :: ExplainabilityProperty -> ()
report :: ExplainabilityProperty -> Maybe MetricsSourceProperty
haddock_workaround_ :: ()
report :: Maybe MetricsSourceProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::ModelPackage.Explainability",
         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
"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 ExplainabilityProperty where
  toJSON :: ExplainabilityProperty -> Value
toJSON ExplainabilityProperty {Maybe MetricsSourceProperty
()
haddock_workaround_ :: ExplainabilityProperty -> ()
report :: ExplainabilityProperty -> Maybe MetricsSourceProperty
haddock_workaround_ :: ()
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
"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 "Report" ExplainabilityProperty where
  type PropertyType "Report" ExplainabilityProperty = MetricsSourceProperty
  set :: PropertyType "Report" ExplainabilityProperty
-> ExplainabilityProperty -> ExplainabilityProperty
set PropertyType "Report" ExplainabilityProperty
newValue ExplainabilityProperty {Maybe MetricsSourceProperty
()
haddock_workaround_ :: ExplainabilityProperty -> ()
report :: ExplainabilityProperty -> Maybe MetricsSourceProperty
haddock_workaround_ :: ()
report :: Maybe MetricsSourceProperty
..}
    = ExplainabilityProperty {report :: Maybe MetricsSourceProperty
report = MetricsSourceProperty -> Maybe MetricsSourceProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Report" ExplainabilityProperty
MetricsSourceProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}