module Stratosphere.EntityResolution.SchemaMapping (
module Exports, SchemaMapping(..), mkSchemaMapping
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.EntityResolution.SchemaMapping.SchemaInputAttributeProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data SchemaMapping
=
SchemaMapping {SchemaMapping -> ()
haddock_workaround_ :: (),
SchemaMapping -> Maybe (Value Text)
description :: (Prelude.Maybe (Value Prelude.Text)),
SchemaMapping -> [SchemaInputAttributeProperty]
mappedInputFields :: [SchemaInputAttributeProperty],
SchemaMapping -> Value Text
schemaName :: (Value Prelude.Text),
SchemaMapping -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
deriving stock (SchemaMapping -> SchemaMapping -> Bool
(SchemaMapping -> SchemaMapping -> Bool)
-> (SchemaMapping -> SchemaMapping -> Bool) -> Eq SchemaMapping
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SchemaMapping -> SchemaMapping -> Bool
== :: SchemaMapping -> SchemaMapping -> Bool
$c/= :: SchemaMapping -> SchemaMapping -> Bool
/= :: SchemaMapping -> SchemaMapping -> Bool
Prelude.Eq, Int -> SchemaMapping -> ShowS
[SchemaMapping] -> ShowS
SchemaMapping -> String
(Int -> SchemaMapping -> ShowS)
-> (SchemaMapping -> String)
-> ([SchemaMapping] -> ShowS)
-> Show SchemaMapping
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SchemaMapping -> ShowS
showsPrec :: Int -> SchemaMapping -> ShowS
$cshow :: SchemaMapping -> String
show :: SchemaMapping -> String
$cshowList :: [SchemaMapping] -> ShowS
showList :: [SchemaMapping] -> ShowS
Prelude.Show)
mkSchemaMapping ::
[SchemaInputAttributeProperty]
-> Value Prelude.Text -> SchemaMapping
mkSchemaMapping :: [SchemaInputAttributeProperty] -> Value Text -> SchemaMapping
mkSchemaMapping [SchemaInputAttributeProperty]
mappedInputFields Value Text
schemaName
= SchemaMapping
{haddock_workaround_ :: ()
haddock_workaround_ = (), mappedInputFields :: [SchemaInputAttributeProperty]
mappedInputFields = [SchemaInputAttributeProperty]
mappedInputFields,
schemaName :: Value Text
schemaName = Value Text
schemaName, description :: Maybe (Value Text)
description = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SchemaMapping where
toResourceProperties :: SchemaMapping -> ResourceProperties
toResourceProperties SchemaMapping {[SchemaInputAttributeProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SchemaMapping -> ()
description :: SchemaMapping -> Maybe (Value Text)
mappedInputFields :: SchemaMapping -> [SchemaInputAttributeProperty]
schemaName :: SchemaMapping -> Value Text
tags :: SchemaMapping -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
tags :: Maybe [Tag]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::EntityResolution::SchemaMapping",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
properties :: Object
properties = [Item Object] -> Object
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"MappedInputFields" Key -> [SchemaInputAttributeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [SchemaInputAttributeProperty]
mappedInputFields,
Key
"SchemaName" 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..= Value Text
schemaName]
([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
"Description" (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)
description,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON SchemaMapping where
toJSON :: SchemaMapping -> Value
toJSON SchemaMapping {[SchemaInputAttributeProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SchemaMapping -> ()
description :: SchemaMapping -> Maybe (Value Text)
mappedInputFields :: SchemaMapping -> [SchemaInputAttributeProperty]
schemaName :: SchemaMapping -> Value Text
tags :: SchemaMapping -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
tags :: Maybe [Tag]
..}
= [(Key, Value)] -> Value
JSON.object
([Item [(Key, Value)]] -> [(Key, Value)]
forall l. IsList l => [Item l] -> l
Prelude.fromList
([(Key, Value)] -> [(Key, Value)] -> [(Key, Value)]
forall a. Semigroup a => a -> a -> a
(Prelude.<>)
[Key
"MappedInputFields" Key -> [SchemaInputAttributeProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [SchemaInputAttributeProperty]
mappedInputFields,
Key
"SchemaName" 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..= Value Text
schemaName]
([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
"Description" (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)
description,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "Description" SchemaMapping where
type PropertyType "Description" SchemaMapping = Value Prelude.Text
set :: PropertyType "Description" SchemaMapping
-> SchemaMapping -> SchemaMapping
set PropertyType "Description" SchemaMapping
newValue SchemaMapping {[SchemaInputAttributeProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SchemaMapping -> ()
description :: SchemaMapping -> Maybe (Value Text)
mappedInputFields :: SchemaMapping -> [SchemaInputAttributeProperty]
schemaName :: SchemaMapping -> Value Text
tags :: SchemaMapping -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
tags :: Maybe [Tag]
..}
= SchemaMapping {description :: Maybe (Value Text)
description = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Description" SchemaMapping
Value Text
newValue, [SchemaInputAttributeProperty]
Maybe [Tag]
()
Value Text
haddock_workaround_ :: ()
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "MappedInputFields" SchemaMapping where
type PropertyType "MappedInputFields" SchemaMapping = [SchemaInputAttributeProperty]
set :: PropertyType "MappedInputFields" SchemaMapping
-> SchemaMapping -> SchemaMapping
set PropertyType "MappedInputFields" SchemaMapping
newValue SchemaMapping {[SchemaInputAttributeProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SchemaMapping -> ()
description :: SchemaMapping -> Maybe (Value Text)
mappedInputFields :: SchemaMapping -> [SchemaInputAttributeProperty]
schemaName :: SchemaMapping -> Value Text
tags :: SchemaMapping -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
tags :: Maybe [Tag]
..}
= SchemaMapping {mappedInputFields :: [SchemaInputAttributeProperty]
mappedInputFields = [SchemaInputAttributeProperty]
PropertyType "MappedInputFields" SchemaMapping
newValue, Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
schemaName :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
schemaName :: Value Text
tags :: Maybe [Tag]
..}
instance Property "SchemaName" SchemaMapping where
type PropertyType "SchemaName" SchemaMapping = Value Prelude.Text
set :: PropertyType "SchemaName" SchemaMapping
-> SchemaMapping -> SchemaMapping
set PropertyType "SchemaName" SchemaMapping
newValue SchemaMapping {[SchemaInputAttributeProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SchemaMapping -> ()
description :: SchemaMapping -> Maybe (Value Text)
mappedInputFields :: SchemaMapping -> [SchemaInputAttributeProperty]
schemaName :: SchemaMapping -> Value Text
tags :: SchemaMapping -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
tags :: Maybe [Tag]
..}
= SchemaMapping {schemaName :: Value Text
schemaName = PropertyType "SchemaName" SchemaMapping
Value Text
newValue, [SchemaInputAttributeProperty]
Maybe [Tag]
Maybe (Value Text)
()
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
tags :: Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
tags :: Maybe [Tag]
..}
instance Property "Tags" SchemaMapping where
type PropertyType "Tags" SchemaMapping = [Tag]
set :: PropertyType "Tags" SchemaMapping -> SchemaMapping -> SchemaMapping
set PropertyType "Tags" SchemaMapping
newValue SchemaMapping {[SchemaInputAttributeProperty]
Maybe [Tag]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SchemaMapping -> ()
description :: SchemaMapping -> Maybe (Value Text)
mappedInputFields :: SchemaMapping -> [SchemaInputAttributeProperty]
schemaName :: SchemaMapping -> Value Text
tags :: SchemaMapping -> Maybe [Tag]
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
tags :: Maybe [Tag]
..}
= SchemaMapping {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" SchemaMapping
newValue, [SchemaInputAttributeProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
haddock_workaround_ :: ()
description :: Maybe (Value Text)
mappedInputFields :: [SchemaInputAttributeProperty]
schemaName :: Value Text
..}