module Stratosphere.SageMaker.ModelCard.ObjectiveFunctionProperty (
        module Exports, ObjectiveFunctionProperty(..),
        mkObjectiveFunctionProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.SageMaker.ModelCard.FunctionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ObjectiveFunctionProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-objectivefunction.html>
    ObjectiveFunctionProperty {ObjectiveFunctionProperty -> ()
haddock_workaround_ :: (),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-objectivefunction.html#cfn-sagemaker-modelcard-objectivefunction-function>
                               ObjectiveFunctionProperty -> Maybe FunctionProperty
function :: (Prelude.Maybe FunctionProperty),
                               -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-objectivefunction.html#cfn-sagemaker-modelcard-objectivefunction-notes>
                               ObjectiveFunctionProperty -> Maybe (Value Text)
notes :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ObjectiveFunctionProperty -> ObjectiveFunctionProperty -> Bool
(ObjectiveFunctionProperty -> ObjectiveFunctionProperty -> Bool)
-> (ObjectiveFunctionProperty -> ObjectiveFunctionProperty -> Bool)
-> Eq ObjectiveFunctionProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ObjectiveFunctionProperty -> ObjectiveFunctionProperty -> Bool
== :: ObjectiveFunctionProperty -> ObjectiveFunctionProperty -> Bool
$c/= :: ObjectiveFunctionProperty -> ObjectiveFunctionProperty -> Bool
/= :: ObjectiveFunctionProperty -> ObjectiveFunctionProperty -> Bool
Prelude.Eq, Int -> ObjectiveFunctionProperty -> ShowS
[ObjectiveFunctionProperty] -> ShowS
ObjectiveFunctionProperty -> String
(Int -> ObjectiveFunctionProperty -> ShowS)
-> (ObjectiveFunctionProperty -> String)
-> ([ObjectiveFunctionProperty] -> ShowS)
-> Show ObjectiveFunctionProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ObjectiveFunctionProperty -> ShowS
showsPrec :: Int -> ObjectiveFunctionProperty -> ShowS
$cshow :: ObjectiveFunctionProperty -> String
show :: ObjectiveFunctionProperty -> String
$cshowList :: [ObjectiveFunctionProperty] -> ShowS
showList :: [ObjectiveFunctionProperty] -> ShowS
Prelude.Show)
mkObjectiveFunctionProperty :: ObjectiveFunctionProperty
mkObjectiveFunctionProperty :: ObjectiveFunctionProperty
mkObjectiveFunctionProperty
  = ObjectiveFunctionProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), function :: Maybe FunctionProperty
function = Maybe FunctionProperty
forall a. Maybe a
Prelude.Nothing,
       notes :: Maybe (Value Text)
notes = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ObjectiveFunctionProperty where
  toResourceProperties :: ObjectiveFunctionProperty -> ResourceProperties
toResourceProperties ObjectiveFunctionProperty {Maybe (Value Text)
Maybe FunctionProperty
()
haddock_workaround_ :: ObjectiveFunctionProperty -> ()
function :: ObjectiveFunctionProperty -> Maybe FunctionProperty
notes :: ObjectiveFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
function :: Maybe FunctionProperty
notes :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::SageMaker::ModelCard.ObjectiveFunction",
         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 -> FunctionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Function" (FunctionProperty -> (Key, Value))
-> Maybe FunctionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FunctionProperty
function,
                            Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Notes" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
notes])}
instance JSON.ToJSON ObjectiveFunctionProperty where
  toJSON :: ObjectiveFunctionProperty -> Value
toJSON ObjectiveFunctionProperty {Maybe (Value Text)
Maybe FunctionProperty
()
haddock_workaround_ :: ObjectiveFunctionProperty -> ()
function :: ObjectiveFunctionProperty -> Maybe FunctionProperty
notes :: ObjectiveFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
function :: Maybe FunctionProperty
notes :: Maybe (Value Text)
..}
    = [(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 -> FunctionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Function" (FunctionProperty -> (Key, Value))
-> Maybe FunctionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FunctionProperty
function,
               Key -> Value Text -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Notes" (Value Text -> (Key, Value))
-> Maybe (Value Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Text)
notes]))
instance Property "Function" ObjectiveFunctionProperty where
  type PropertyType "Function" ObjectiveFunctionProperty = FunctionProperty
  set :: PropertyType "Function" ObjectiveFunctionProperty
-> ObjectiveFunctionProperty -> ObjectiveFunctionProperty
set PropertyType "Function" ObjectiveFunctionProperty
newValue ObjectiveFunctionProperty {Maybe (Value Text)
Maybe FunctionProperty
()
haddock_workaround_ :: ObjectiveFunctionProperty -> ()
function :: ObjectiveFunctionProperty -> Maybe FunctionProperty
notes :: ObjectiveFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
function :: Maybe FunctionProperty
notes :: Maybe (Value Text)
..}
    = ObjectiveFunctionProperty {function :: Maybe FunctionProperty
function = FunctionProperty -> Maybe FunctionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Function" ObjectiveFunctionProperty
FunctionProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
notes :: Maybe (Value Text)
haddock_workaround_ :: ()
notes :: Maybe (Value Text)
..}
instance Property "Notes" ObjectiveFunctionProperty where
  type PropertyType "Notes" ObjectiveFunctionProperty = Value Prelude.Text
  set :: PropertyType "Notes" ObjectiveFunctionProperty
-> ObjectiveFunctionProperty -> ObjectiveFunctionProperty
set PropertyType "Notes" ObjectiveFunctionProperty
newValue ObjectiveFunctionProperty {Maybe (Value Text)
Maybe FunctionProperty
()
haddock_workaround_ :: ObjectiveFunctionProperty -> ()
function :: ObjectiveFunctionProperty -> Maybe FunctionProperty
notes :: ObjectiveFunctionProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
function :: Maybe FunctionProperty
notes :: Maybe (Value Text)
..}
    = ObjectiveFunctionProperty {notes :: Maybe (Value Text)
notes = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Notes" ObjectiveFunctionProperty
Value Text
newValue, Maybe FunctionProperty
()
haddock_workaround_ :: ()
function :: Maybe FunctionProperty
haddock_workaround_ :: ()
function :: Maybe FunctionProperty
..}