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