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