module Stratosphere.Glue.Partition.ColumnProperty (
        ColumnProperty(..), mkColumnProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ColumnProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-column.html>
    ColumnProperty {ColumnProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-column.html#cfn-glue-partition-column-comment>
                    ColumnProperty -> Maybe (Value Text)
comment :: (Prelude.Maybe (Value Prelude.Text)),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-column.html#cfn-glue-partition-column-name>
                    ColumnProperty -> Value Text
name :: (Value Prelude.Text),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-partition-column.html#cfn-glue-partition-column-type>
                    ColumnProperty -> Maybe (Value Text)
type' :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ColumnProperty -> ColumnProperty -> Bool
(ColumnProperty -> ColumnProperty -> Bool)
-> (ColumnProperty -> ColumnProperty -> Bool) -> Eq ColumnProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ColumnProperty -> ColumnProperty -> Bool
== :: ColumnProperty -> ColumnProperty -> Bool
$c/= :: ColumnProperty -> ColumnProperty -> Bool
/= :: ColumnProperty -> ColumnProperty -> Bool
Prelude.Eq, Int -> ColumnProperty -> ShowS
[ColumnProperty] -> ShowS
ColumnProperty -> String
(Int -> ColumnProperty -> ShowS)
-> (ColumnProperty -> String)
-> ([ColumnProperty] -> ShowS)
-> Show ColumnProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ColumnProperty -> ShowS
showsPrec :: Int -> ColumnProperty -> ShowS
$cshow :: ColumnProperty -> String
show :: ColumnProperty -> String
$cshowList :: [ColumnProperty] -> ShowS
showList :: [ColumnProperty] -> ShowS
Prelude.Show)
mkColumnProperty :: Value Prelude.Text -> ColumnProperty
mkColumnProperty :: Value Text -> ColumnProperty
mkColumnProperty Value Text
name
  = ColumnProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, comment :: Maybe (Value Text)
comment = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       type' :: Maybe (Value Text)
type' = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ColumnProperty where
  toResourceProperties :: ColumnProperty -> ResourceProperties
toResourceProperties ColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ColumnProperty -> ()
comment :: ColumnProperty -> Maybe (Value Text)
name :: ColumnProperty -> Value Text
type' :: ColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
name :: Value Text
type' :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Glue::Partition.Column",
         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
"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..= Value Text
name]
                           ([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
"Comment" (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)
comment,
                               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
"Type" (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)
type']))}
instance JSON.ToJSON ColumnProperty where
  toJSON :: ColumnProperty -> Value
toJSON ColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ColumnProperty -> ()
comment :: ColumnProperty -> Maybe (Value Text)
name :: ColumnProperty -> Value Text
type' :: ColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
name :: Value Text
type' :: 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
"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..= Value Text
name]
              ([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
"Comment" (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)
comment,
                  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
"Type" (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)
type'])))
instance Property "Comment" ColumnProperty where
  type PropertyType "Comment" ColumnProperty = Value Prelude.Text
  set :: PropertyType "Comment" ColumnProperty
-> ColumnProperty -> ColumnProperty
set PropertyType "Comment" ColumnProperty
newValue ColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ColumnProperty -> ()
comment :: ColumnProperty -> Maybe (Value Text)
name :: ColumnProperty -> Value Text
type' :: ColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
name :: Value Text
type' :: Maybe (Value Text)
..}
    = ColumnProperty {comment :: Maybe (Value Text)
comment = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Comment" ColumnProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
name :: Value Text
type' :: Maybe (Value Text)
..}
instance Property "Name" ColumnProperty where
  type PropertyType "Name" ColumnProperty = Value Prelude.Text
  set :: PropertyType "Name" ColumnProperty
-> ColumnProperty -> ColumnProperty
set PropertyType "Name" ColumnProperty
newValue ColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ColumnProperty -> ()
comment :: ColumnProperty -> Maybe (Value Text)
name :: ColumnProperty -> Value Text
type' :: ColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
name :: Value Text
type' :: Maybe (Value Text)
..}
    = ColumnProperty {name :: Value Text
name = PropertyType "Name" ColumnProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
type' :: Maybe (Value Text)
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
type' :: Maybe (Value Text)
..}
instance Property "Type" ColumnProperty where
  type PropertyType "Type" ColumnProperty = Value Prelude.Text
  set :: PropertyType "Type" ColumnProperty
-> ColumnProperty -> ColumnProperty
set PropertyType "Type" ColumnProperty
newValue ColumnProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ColumnProperty -> ()
comment :: ColumnProperty -> Maybe (Value Text)
name :: ColumnProperty -> Value Text
type' :: ColumnProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
name :: Value Text
type' :: Maybe (Value Text)
..}
    = ColumnProperty {type' :: Maybe (Value Text)
type' = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Type" ColumnProperty
Value Text
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
name :: Value Text
haddock_workaround_ :: ()
comment :: Maybe (Value Text)
name :: Value Text
..}