module Stratosphere.DataZone.DataSource.RelationalFilterConfigurationProperty (
        module Exports, RelationalFilterConfigurationProperty(..),
        mkRelationalFilterConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.DataZone.DataSource.FilterExpressionProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data RelationalFilterConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-datasource-relationalfilterconfiguration.html>
    RelationalFilterConfigurationProperty {RelationalFilterConfigurationProperty -> ()
haddock_workaround_ :: (),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-datasource-relationalfilterconfiguration.html#cfn-datazone-datasource-relationalfilterconfiguration-databasename>
                                           RelationalFilterConfigurationProperty -> Value Text
databaseName :: (Value Prelude.Text),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-datasource-relationalfilterconfiguration.html#cfn-datazone-datasource-relationalfilterconfiguration-filterexpressions>
                                           RelationalFilterConfigurationProperty
-> Maybe [FilterExpressionProperty]
filterExpressions :: (Prelude.Maybe [FilterExpressionProperty]),
                                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-datazone-datasource-relationalfilterconfiguration.html#cfn-datazone-datasource-relationalfilterconfiguration-schemaname>
                                           RelationalFilterConfigurationProperty -> Maybe (Value Text)
schemaName :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty -> Bool
(RelationalFilterConfigurationProperty
 -> RelationalFilterConfigurationProperty -> Bool)
-> (RelationalFilterConfigurationProperty
    -> RelationalFilterConfigurationProperty -> Bool)
-> Eq RelationalFilterConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty -> Bool
== :: RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty -> Bool
$c/= :: RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty -> Bool
/= :: RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty -> Bool
Prelude.Eq, Int -> RelationalFilterConfigurationProperty -> ShowS
[RelationalFilterConfigurationProperty] -> ShowS
RelationalFilterConfigurationProperty -> String
(Int -> RelationalFilterConfigurationProperty -> ShowS)
-> (RelationalFilterConfigurationProperty -> String)
-> ([RelationalFilterConfigurationProperty] -> ShowS)
-> Show RelationalFilterConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RelationalFilterConfigurationProperty -> ShowS
showsPrec :: Int -> RelationalFilterConfigurationProperty -> ShowS
$cshow :: RelationalFilterConfigurationProperty -> String
show :: RelationalFilterConfigurationProperty -> String
$cshowList :: [RelationalFilterConfigurationProperty] -> ShowS
showList :: [RelationalFilterConfigurationProperty] -> ShowS
Prelude.Show)
mkRelationalFilterConfigurationProperty ::
  Value Prelude.Text -> RelationalFilterConfigurationProperty
mkRelationalFilterConfigurationProperty :: Value Text -> RelationalFilterConfigurationProperty
mkRelationalFilterConfigurationProperty Value Text
databaseName
  = RelationalFilterConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), databaseName :: Value Text
databaseName = Value Text
databaseName,
       filterExpressions :: Maybe [FilterExpressionProperty]
filterExpressions = Maybe [FilterExpressionProperty]
forall a. Maybe a
Prelude.Nothing, schemaName :: Maybe (Value Text)
schemaName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties RelationalFilterConfigurationProperty where
  toResourceProperties :: RelationalFilterConfigurationProperty -> ResourceProperties
toResourceProperties RelationalFilterConfigurationProperty {Maybe [FilterExpressionProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RelationalFilterConfigurationProperty -> ()
databaseName :: RelationalFilterConfigurationProperty -> Value Text
filterExpressions :: RelationalFilterConfigurationProperty
-> Maybe [FilterExpressionProperty]
schemaName :: RelationalFilterConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
databaseName :: Value Text
filterExpressions :: Maybe [FilterExpressionProperty]
schemaName :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataZone::DataSource.RelationalFilterConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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
"DatabaseName" 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
databaseName]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> [FilterExpressionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FilterExpressions" ([FilterExpressionProperty] -> (Key, Value))
-> Maybe [FilterExpressionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FilterExpressionProperty]
filterExpressions,
                               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
"SchemaName" (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)
schemaName]))}
instance JSON.ToJSON RelationalFilterConfigurationProperty where
  toJSON :: RelationalFilterConfigurationProperty -> Value
toJSON RelationalFilterConfigurationProperty {Maybe [FilterExpressionProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RelationalFilterConfigurationProperty -> ()
databaseName :: RelationalFilterConfigurationProperty -> Value Text
filterExpressions :: RelationalFilterConfigurationProperty
-> Maybe [FilterExpressionProperty]
schemaName :: RelationalFilterConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
databaseName :: Value Text
filterExpressions :: Maybe [FilterExpressionProperty]
schemaName :: Maybe (Value Text)
..}
    = [(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
"DatabaseName" 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
databaseName]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> [FilterExpressionProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"FilterExpressions" ([FilterExpressionProperty] -> (Key, Value))
-> Maybe [FilterExpressionProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [FilterExpressionProperty]
filterExpressions,
                  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
"SchemaName" (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)
schemaName])))
instance Property "DatabaseName" RelationalFilterConfigurationProperty where
  type PropertyType "DatabaseName" RelationalFilterConfigurationProperty = Value Prelude.Text
  set :: PropertyType "DatabaseName" RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty
set PropertyType "DatabaseName" RelationalFilterConfigurationProperty
newValue RelationalFilterConfigurationProperty {Maybe [FilterExpressionProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RelationalFilterConfigurationProperty -> ()
databaseName :: RelationalFilterConfigurationProperty -> Value Text
filterExpressions :: RelationalFilterConfigurationProperty
-> Maybe [FilterExpressionProperty]
schemaName :: RelationalFilterConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
databaseName :: Value Text
filterExpressions :: Maybe [FilterExpressionProperty]
schemaName :: Maybe (Value Text)
..}
    = RelationalFilterConfigurationProperty
        {databaseName :: Value Text
databaseName = PropertyType "DatabaseName" RelationalFilterConfigurationProperty
Value Text
newValue, Maybe [FilterExpressionProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ()
filterExpressions :: Maybe [FilterExpressionProperty]
schemaName :: Maybe (Value Text)
haddock_workaround_ :: ()
filterExpressions :: Maybe [FilterExpressionProperty]
schemaName :: Maybe (Value Text)
..}
instance Property "FilterExpressions" RelationalFilterConfigurationProperty where
  type PropertyType "FilterExpressions" RelationalFilterConfigurationProperty = [FilterExpressionProperty]
  set :: PropertyType
  "FilterExpressions" RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty
set PropertyType
  "FilterExpressions" RelationalFilterConfigurationProperty
newValue RelationalFilterConfigurationProperty {Maybe [FilterExpressionProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RelationalFilterConfigurationProperty -> ()
databaseName :: RelationalFilterConfigurationProperty -> Value Text
filterExpressions :: RelationalFilterConfigurationProperty
-> Maybe [FilterExpressionProperty]
schemaName :: RelationalFilterConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
databaseName :: Value Text
filterExpressions :: Maybe [FilterExpressionProperty]
schemaName :: Maybe (Value Text)
..}
    = RelationalFilterConfigurationProperty
        {filterExpressions :: Maybe [FilterExpressionProperty]
filterExpressions = [FilterExpressionProperty] -> Maybe [FilterExpressionProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [FilterExpressionProperty]
PropertyType
  "FilterExpressions" RelationalFilterConfigurationProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
databaseName :: Value Text
schemaName :: Maybe (Value Text)
haddock_workaround_ :: ()
databaseName :: Value Text
schemaName :: Maybe (Value Text)
..}
instance Property "SchemaName" RelationalFilterConfigurationProperty where
  type PropertyType "SchemaName" RelationalFilterConfigurationProperty = Value Prelude.Text
  set :: PropertyType "SchemaName" RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty
-> RelationalFilterConfigurationProperty
set PropertyType "SchemaName" RelationalFilterConfigurationProperty
newValue RelationalFilterConfigurationProperty {Maybe [FilterExpressionProperty]
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: RelationalFilterConfigurationProperty -> ()
databaseName :: RelationalFilterConfigurationProperty -> Value Text
filterExpressions :: RelationalFilterConfigurationProperty
-> Maybe [FilterExpressionProperty]
schemaName :: RelationalFilterConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
databaseName :: Value Text
filterExpressions :: Maybe [FilterExpressionProperty]
schemaName :: Maybe (Value Text)
..}
    = RelationalFilterConfigurationProperty
        {schemaName :: Maybe (Value Text)
schemaName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SchemaName" RelationalFilterConfigurationProperty
Value Text
newValue, Maybe [FilterExpressionProperty]
()
Value Text
haddock_workaround_ :: ()
databaseName :: Value Text
filterExpressions :: Maybe [FilterExpressionProperty]
haddock_workaround_ :: ()
databaseName :: Value Text
filterExpressions :: Maybe [FilterExpressionProperty]
..}