module Stratosphere.IoTAnalytics.Datastore.ParquetConfigurationProperty (
        module Exports, ParquetConfigurationProperty(..),
        mkParquetConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTAnalytics.Datastore.SchemaDefinitionProperty as Exports
import Stratosphere.ResourceProperties
data ParquetConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-datastore-parquetconfiguration.html>
    ParquetConfigurationProperty {ParquetConfigurationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-datastore-parquetconfiguration.html#cfn-iotanalytics-datastore-parquetconfiguration-schemadefinition>
                                  ParquetConfigurationProperty -> Maybe SchemaDefinitionProperty
schemaDefinition :: (Prelude.Maybe SchemaDefinitionProperty)}
  deriving stock (ParquetConfigurationProperty
-> ParquetConfigurationProperty -> Bool
(ParquetConfigurationProperty
 -> ParquetConfigurationProperty -> Bool)
-> (ParquetConfigurationProperty
    -> ParquetConfigurationProperty -> Bool)
-> Eq ParquetConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ParquetConfigurationProperty
-> ParquetConfigurationProperty -> Bool
== :: ParquetConfigurationProperty
-> ParquetConfigurationProperty -> Bool
$c/= :: ParquetConfigurationProperty
-> ParquetConfigurationProperty -> Bool
/= :: ParquetConfigurationProperty
-> ParquetConfigurationProperty -> Bool
Prelude.Eq, Int -> ParquetConfigurationProperty -> ShowS
[ParquetConfigurationProperty] -> ShowS
ParquetConfigurationProperty -> String
(Int -> ParquetConfigurationProperty -> ShowS)
-> (ParquetConfigurationProperty -> String)
-> ([ParquetConfigurationProperty] -> ShowS)
-> Show ParquetConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ParquetConfigurationProperty -> ShowS
showsPrec :: Int -> ParquetConfigurationProperty -> ShowS
$cshow :: ParquetConfigurationProperty -> String
show :: ParquetConfigurationProperty -> String
$cshowList :: [ParquetConfigurationProperty] -> ShowS
showList :: [ParquetConfigurationProperty] -> ShowS
Prelude.Show)
mkParquetConfigurationProperty :: ParquetConfigurationProperty
mkParquetConfigurationProperty :: ParquetConfigurationProperty
mkParquetConfigurationProperty
  = ParquetConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), schemaDefinition :: Maybe SchemaDefinitionProperty
schemaDefinition = Maybe SchemaDefinitionProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ParquetConfigurationProperty where
  toResourceProperties :: ParquetConfigurationProperty -> ResourceProperties
toResourceProperties ParquetConfigurationProperty {Maybe SchemaDefinitionProperty
()
haddock_workaround_ :: ParquetConfigurationProperty -> ()
schemaDefinition :: ParquetConfigurationProperty -> Maybe SchemaDefinitionProperty
haddock_workaround_ :: ()
schemaDefinition :: Maybe SchemaDefinitionProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTAnalytics::Datastore.ParquetConfiguration",
         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 -> SchemaDefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SchemaDefinition" (SchemaDefinitionProperty -> (Key, Value))
-> Maybe SchemaDefinitionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SchemaDefinitionProperty
schemaDefinition])}
instance JSON.ToJSON ParquetConfigurationProperty where
  toJSON :: ParquetConfigurationProperty -> Value
toJSON ParquetConfigurationProperty {Maybe SchemaDefinitionProperty
()
haddock_workaround_ :: ParquetConfigurationProperty -> ()
schemaDefinition :: ParquetConfigurationProperty -> Maybe SchemaDefinitionProperty
haddock_workaround_ :: ()
schemaDefinition :: Maybe SchemaDefinitionProperty
..}
    = [(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 -> SchemaDefinitionProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"SchemaDefinition" (SchemaDefinitionProperty -> (Key, Value))
-> Maybe SchemaDefinitionProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SchemaDefinitionProperty
schemaDefinition]))
instance Property "SchemaDefinition" ParquetConfigurationProperty where
  type PropertyType "SchemaDefinition" ParquetConfigurationProperty = SchemaDefinitionProperty
  set :: PropertyType "SchemaDefinition" ParquetConfigurationProperty
-> ParquetConfigurationProperty -> ParquetConfigurationProperty
set PropertyType "SchemaDefinition" ParquetConfigurationProperty
newValue ParquetConfigurationProperty {Maybe SchemaDefinitionProperty
()
haddock_workaround_ :: ParquetConfigurationProperty -> ()
schemaDefinition :: ParquetConfigurationProperty -> Maybe SchemaDefinitionProperty
haddock_workaround_ :: ()
schemaDefinition :: Maybe SchemaDefinitionProperty
..}
    = ParquetConfigurationProperty
        {schemaDefinition :: Maybe SchemaDefinitionProperty
schemaDefinition = SchemaDefinitionProperty -> Maybe SchemaDefinitionProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SchemaDefinition" ParquetConfigurationProperty
SchemaDefinitionProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}