module Stratosphere.Glue.Partition (
module Exports, Partition(..), mkPartition
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Glue.Partition.PartitionInputProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Partition
=
Partition {Partition -> ()
haddock_workaround_ :: (),
Partition -> Value Text
catalogId :: (Value Prelude.Text),
Partition -> Value Text
databaseName :: (Value Prelude.Text),
Partition -> PartitionInputProperty
partitionInput :: PartitionInputProperty,
Partition -> Value Text
tableName :: (Value Prelude.Text)}
deriving stock (Partition -> Partition -> Bool
(Partition -> Partition -> Bool)
-> (Partition -> Partition -> Bool) -> Eq Partition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Partition -> Partition -> Bool
== :: Partition -> Partition -> Bool
$c/= :: Partition -> Partition -> Bool
/= :: Partition -> Partition -> Bool
Prelude.Eq, Int -> Partition -> ShowS
[Partition] -> ShowS
Partition -> String
(Int -> Partition -> ShowS)
-> (Partition -> String)
-> ([Partition] -> ShowS)
-> Show Partition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Partition -> ShowS
showsPrec :: Int -> Partition -> ShowS
$cshow :: Partition -> String
show :: Partition -> String
$cshowList :: [Partition] -> ShowS
showList :: [Partition] -> ShowS
Prelude.Show)
mkPartition ::
Value Prelude.Text
-> Value Prelude.Text
-> PartitionInputProperty -> Value Prelude.Text -> Partition
mkPartition :: Value Text
-> Value Text -> PartitionInputProperty -> Value Text -> Partition
mkPartition Value Text
catalogId Value Text
databaseName PartitionInputProperty
partitionInput Value Text
tableName
= Partition
{haddock_workaround_ :: ()
haddock_workaround_ = (), catalogId :: Value Text
catalogId = Value Text
catalogId,
databaseName :: Value Text
databaseName = Value Text
databaseName, partitionInput :: PartitionInputProperty
partitionInput = PartitionInputProperty
partitionInput,
tableName :: Value Text
tableName = Value Text
tableName}
instance ToResourceProperties Partition where
toResourceProperties :: Partition -> ResourceProperties
toResourceProperties Partition {()
Value Text
PartitionInputProperty
haddock_workaround_ :: Partition -> ()
catalogId :: Partition -> Value Text
databaseName :: Partition -> Value Text
partitionInput :: Partition -> PartitionInputProperty
tableName :: Partition -> Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Glue::Partition", supportsTags :: Bool
supportsTags = Bool
Prelude.False,
properties :: Object
properties = [Key
"CatalogId" 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
catalogId,
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,
Key
"PartitionInput" Key -> PartitionInputProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= PartitionInputProperty
partitionInput,
Key
"TableName" 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
tableName]}
instance JSON.ToJSON Partition where
toJSON :: Partition -> Value
toJSON Partition {()
Value Text
PartitionInputProperty
haddock_workaround_ :: Partition -> ()
catalogId :: Partition -> Value Text
databaseName :: Partition -> Value Text
partitionInput :: Partition -> PartitionInputProperty
tableName :: Partition -> Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
..}
= [(Key, Value)] -> Value
JSON.object
[Key
"CatalogId" 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
catalogId,
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,
Key
"PartitionInput" Key -> PartitionInputProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= PartitionInputProperty
partitionInput,
Key
"TableName" 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
tableName]
instance Property "CatalogId" Partition where
type PropertyType "CatalogId" Partition = Value Prelude.Text
set :: PropertyType "CatalogId" Partition -> Partition -> Partition
set PropertyType "CatalogId" Partition
newValue Partition {()
Value Text
PartitionInputProperty
haddock_workaround_ :: Partition -> ()
catalogId :: Partition -> Value Text
databaseName :: Partition -> Value Text
partitionInput :: Partition -> PartitionInputProperty
tableName :: Partition -> Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
..} = Partition {catalogId :: Value Text
catalogId = PropertyType "CatalogId" Partition
Value Text
newValue, ()
Value Text
PartitionInputProperty
haddock_workaround_ :: ()
databaseName :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
haddock_workaround_ :: ()
databaseName :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
..}
instance Property "DatabaseName" Partition where
type PropertyType "DatabaseName" Partition = Value Prelude.Text
set :: PropertyType "DatabaseName" Partition -> Partition -> Partition
set PropertyType "DatabaseName" Partition
newValue Partition {()
Value Text
PartitionInputProperty
haddock_workaround_ :: Partition -> ()
catalogId :: Partition -> Value Text
databaseName :: Partition -> Value Text
partitionInput :: Partition -> PartitionInputProperty
tableName :: Partition -> Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
..}
= Partition {databaseName :: Value Text
databaseName = PropertyType "DatabaseName" Partition
Value Text
newValue, ()
Value Text
PartitionInputProperty
haddock_workaround_ :: ()
catalogId :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
..}
instance Property "PartitionInput" Partition where
type PropertyType "PartitionInput" Partition = PartitionInputProperty
set :: PropertyType "PartitionInput" Partition -> Partition -> Partition
set PropertyType "PartitionInput" Partition
newValue Partition {()
Value Text
PartitionInputProperty
haddock_workaround_ :: Partition -> ()
catalogId :: Partition -> Value Text
databaseName :: Partition -> Value Text
partitionInput :: Partition -> PartitionInputProperty
tableName :: Partition -> Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
..}
= Partition {partitionInput :: PartitionInputProperty
partitionInput = PropertyType "PartitionInput" Partition
PartitionInputProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
tableName :: Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
tableName :: Value Text
..}
instance Property "TableName" Partition where
type PropertyType "TableName" Partition = Value Prelude.Text
set :: PropertyType "TableName" Partition -> Partition -> Partition
set PropertyType "TableName" Partition
newValue Partition {()
Value Text
PartitionInputProperty
haddock_workaround_ :: Partition -> ()
catalogId :: Partition -> Value Text
databaseName :: Partition -> Value Text
partitionInput :: Partition -> PartitionInputProperty
tableName :: Partition -> Value Text
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
partitionInput :: PartitionInputProperty
tableName :: Value Text
..} = Partition {tableName :: Value Text
tableName = PropertyType "TableName" Partition
Value Text
newValue, ()
Value Text
PartitionInputProperty
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
partitionInput :: PartitionInputProperty
haddock_workaround_ :: ()
catalogId :: Value Text
databaseName :: Value Text
partitionInput :: PartitionInputProperty
..}