module Stratosphere.DataZone.FormType.ModelProperty (
ModelProperty(..), mkModelProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ModelProperty
=
ModelProperty {ModelProperty -> ()
haddock_workaround_ :: (),
ModelProperty -> Maybe (Value Text)
smithy :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ModelProperty -> ModelProperty -> Bool
(ModelProperty -> ModelProperty -> Bool)
-> (ModelProperty -> ModelProperty -> Bool) -> Eq ModelProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ModelProperty -> ModelProperty -> Bool
== :: ModelProperty -> ModelProperty -> Bool
$c/= :: ModelProperty -> ModelProperty -> Bool
/= :: ModelProperty -> ModelProperty -> Bool
Prelude.Eq, Int -> ModelProperty -> ShowS
[ModelProperty] -> ShowS
ModelProperty -> String
(Int -> ModelProperty -> ShowS)
-> (ModelProperty -> String)
-> ([ModelProperty] -> ShowS)
-> Show ModelProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ModelProperty -> ShowS
showsPrec :: Int -> ModelProperty -> ShowS
$cshow :: ModelProperty -> String
show :: ModelProperty -> String
$cshowList :: [ModelProperty] -> ShowS
showList :: [ModelProperty] -> ShowS
Prelude.Show)
mkModelProperty :: ModelProperty
mkModelProperty :: ModelProperty
mkModelProperty
= ModelProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), smithy :: Maybe (Value Text)
smithy = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ModelProperty where
toResourceProperties :: ModelProperty -> ResourceProperties
toResourceProperties ModelProperty {Maybe (Value Text)
()
haddock_workaround_ :: ModelProperty -> ()
smithy :: ModelProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
smithy :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::DataZone::FormType.Model",
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 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
"Smithy" (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)
smithy])}
instance JSON.ToJSON ModelProperty where
toJSON :: ModelProperty -> Value
toJSON ModelProperty {Maybe (Value Text)
()
haddock_workaround_ :: ModelProperty -> ()
smithy :: ModelProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
smithy :: 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 -> 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
"Smithy" (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)
smithy]))
instance Property "Smithy" ModelProperty where
type PropertyType "Smithy" ModelProperty = Value Prelude.Text
set :: PropertyType "Smithy" ModelProperty
-> ModelProperty -> ModelProperty
set PropertyType "Smithy" ModelProperty
newValue ModelProperty {Maybe (Value Text)
()
haddock_workaround_ :: ModelProperty -> ()
smithy :: ModelProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
smithy :: Maybe (Value Text)
..}
= ModelProperty {smithy :: Maybe (Value Text)
smithy = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Smithy" ModelProperty
Value Text
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}