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