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