module Stratosphere.DataBrew.Job.ColumnSelectorProperty (
        ColumnSelectorProperty(..), mkColumnSelectorProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ColumnSelectorProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-columnselector.html>
    ColumnSelectorProperty {ColumnSelectorProperty -> ()
haddock_workaround_ :: (),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-columnselector.html#cfn-databrew-job-columnselector-name>
                            ColumnSelectorProperty -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                            -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-databrew-job-columnselector.html#cfn-databrew-job-columnselector-regex>
                            ColumnSelectorProperty -> Maybe (Value Text)
regex :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ColumnSelectorProperty -> ColumnSelectorProperty -> Bool
(ColumnSelectorProperty -> ColumnSelectorProperty -> Bool)
-> (ColumnSelectorProperty -> ColumnSelectorProperty -> Bool)
-> Eq ColumnSelectorProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ColumnSelectorProperty -> ColumnSelectorProperty -> Bool
== :: ColumnSelectorProperty -> ColumnSelectorProperty -> Bool
$c/= :: ColumnSelectorProperty -> ColumnSelectorProperty -> Bool
/= :: ColumnSelectorProperty -> ColumnSelectorProperty -> Bool
Prelude.Eq, Int -> ColumnSelectorProperty -> ShowS
[ColumnSelectorProperty] -> ShowS
ColumnSelectorProperty -> String
(Int -> ColumnSelectorProperty -> ShowS)
-> (ColumnSelectorProperty -> String)
-> ([ColumnSelectorProperty] -> ShowS)
-> Show ColumnSelectorProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ColumnSelectorProperty -> ShowS
showsPrec :: Int -> ColumnSelectorProperty -> ShowS
$cshow :: ColumnSelectorProperty -> String
show :: ColumnSelectorProperty -> String
$cshowList :: [ColumnSelectorProperty] -> ShowS
showList :: [ColumnSelectorProperty] -> ShowS
Prelude.Show)
mkColumnSelectorProperty :: ColumnSelectorProperty
mkColumnSelectorProperty :: ColumnSelectorProperty
mkColumnSelectorProperty
  = ColumnSelectorProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       regex :: Maybe (Value Text)
regex = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ColumnSelectorProperty where
  toResourceProperties :: ColumnSelectorProperty -> ResourceProperties
toResourceProperties ColumnSelectorProperty {Maybe (Value Text)
()
haddock_workaround_ :: ColumnSelectorProperty -> ()
name :: ColumnSelectorProperty -> Maybe (Value Text)
regex :: ColumnSelectorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regex :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::DataBrew::Job.ColumnSelector",
         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
"Name" (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)
name,
                            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
"Regex" (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)
regex])}
instance JSON.ToJSON ColumnSelectorProperty where
  toJSON :: ColumnSelectorProperty -> Value
toJSON ColumnSelectorProperty {Maybe (Value Text)
()
haddock_workaround_ :: ColumnSelectorProperty -> ()
name :: ColumnSelectorProperty -> Maybe (Value Text)
regex :: ColumnSelectorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regex :: 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
"Name" (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)
name,
               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
"Regex" (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)
regex]))
instance Property "Name" ColumnSelectorProperty where
  type PropertyType "Name" ColumnSelectorProperty = Value Prelude.Text
  set :: PropertyType "Name" ColumnSelectorProperty
-> ColumnSelectorProperty -> ColumnSelectorProperty
set PropertyType "Name" ColumnSelectorProperty
newValue ColumnSelectorProperty {Maybe (Value Text)
()
haddock_workaround_ :: ColumnSelectorProperty -> ()
name :: ColumnSelectorProperty -> Maybe (Value Text)
regex :: ColumnSelectorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regex :: Maybe (Value Text)
..}
    = ColumnSelectorProperty {name :: Maybe (Value Text)
name = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Name" ColumnSelectorProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
regex :: Maybe (Value Text)
haddock_workaround_ :: ()
regex :: Maybe (Value Text)
..}
instance Property "Regex" ColumnSelectorProperty where
  type PropertyType "Regex" ColumnSelectorProperty = Value Prelude.Text
  set :: PropertyType "Regex" ColumnSelectorProperty
-> ColumnSelectorProperty -> ColumnSelectorProperty
set PropertyType "Regex" ColumnSelectorProperty
newValue ColumnSelectorProperty {Maybe (Value Text)
()
haddock_workaround_ :: ColumnSelectorProperty -> ()
name :: ColumnSelectorProperty -> Maybe (Value Text)
regex :: ColumnSelectorProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
regex :: Maybe (Value Text)
..}
    = ColumnSelectorProperty {regex :: Maybe (Value Text)
regex = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Regex" ColumnSelectorProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
name :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Maybe (Value Text)
..}