module Stratosphere.Cassandra.Table.BillingModeProperty (
        module Exports, BillingModeProperty(..), mkBillingModeProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Cassandra.Table.ProvisionedThroughputProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data BillingModeProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-billingmode.html>
    BillingModeProperty {BillingModeProperty -> ()
haddock_workaround_ :: (),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-billingmode.html#cfn-cassandra-table-billingmode-mode>
                         BillingModeProperty -> Value Text
mode :: (Value Prelude.Text),
                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-billingmode.html#cfn-cassandra-table-billingmode-provisionedthroughput>
                         BillingModeProperty -> Maybe ProvisionedThroughputProperty
provisionedThroughput :: (Prelude.Maybe ProvisionedThroughputProperty)}
  deriving stock (BillingModeProperty -> BillingModeProperty -> Bool
(BillingModeProperty -> BillingModeProperty -> Bool)
-> (BillingModeProperty -> BillingModeProperty -> Bool)
-> Eq BillingModeProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BillingModeProperty -> BillingModeProperty -> Bool
== :: BillingModeProperty -> BillingModeProperty -> Bool
$c/= :: BillingModeProperty -> BillingModeProperty -> Bool
/= :: BillingModeProperty -> BillingModeProperty -> Bool
Prelude.Eq, Int -> BillingModeProperty -> ShowS
[BillingModeProperty] -> ShowS
BillingModeProperty -> String
(Int -> BillingModeProperty -> ShowS)
-> (BillingModeProperty -> String)
-> ([BillingModeProperty] -> ShowS)
-> Show BillingModeProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> BillingModeProperty -> ShowS
showsPrec :: Int -> BillingModeProperty -> ShowS
$cshow :: BillingModeProperty -> String
show :: BillingModeProperty -> String
$cshowList :: [BillingModeProperty] -> ShowS
showList :: [BillingModeProperty] -> ShowS
Prelude.Show)
mkBillingModeProperty :: Value Prelude.Text -> BillingModeProperty
mkBillingModeProperty :: Value Text -> BillingModeProperty
mkBillingModeProperty Value Text
mode
  = BillingModeProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), mode :: Value Text
mode = Value Text
mode,
       provisionedThroughput :: Maybe ProvisionedThroughputProperty
provisionedThroughput = Maybe ProvisionedThroughputProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties BillingModeProperty where
  toResourceProperties :: BillingModeProperty -> ResourceProperties
toResourceProperties BillingModeProperty {Maybe ProvisionedThroughputProperty
()
Value Text
haddock_workaround_ :: BillingModeProperty -> ()
mode :: BillingModeProperty -> Value Text
provisionedThroughput :: BillingModeProperty -> Maybe ProvisionedThroughputProperty
haddock_workaround_ :: ()
mode :: Value Text
provisionedThroughput :: Maybe ProvisionedThroughputProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::Cassandra::Table.BillingMode",
         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
"Mode" 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
mode]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ProvisionedThroughputProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ProvisionedThroughput"
                                 (ProvisionedThroughputProperty -> (Key, Value))
-> Maybe ProvisionedThroughputProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProvisionedThroughputProperty
provisionedThroughput]))}
instance JSON.ToJSON BillingModeProperty where
  toJSON :: BillingModeProperty -> Value
toJSON BillingModeProperty {Maybe ProvisionedThroughputProperty
()
Value Text
haddock_workaround_ :: BillingModeProperty -> ()
mode :: BillingModeProperty -> Value Text
provisionedThroughput :: BillingModeProperty -> Maybe ProvisionedThroughputProperty
haddock_workaround_ :: ()
mode :: Value Text
provisionedThroughput :: Maybe ProvisionedThroughputProperty
..}
    = [(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
"Mode" 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
mode]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ProvisionedThroughputProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ProvisionedThroughput"
                    (ProvisionedThroughputProperty -> (Key, Value))
-> Maybe ProvisionedThroughputProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProvisionedThroughputProperty
provisionedThroughput])))
instance Property "Mode" BillingModeProperty where
  type PropertyType "Mode" BillingModeProperty = Value Prelude.Text
  set :: PropertyType "Mode" BillingModeProperty
-> BillingModeProperty -> BillingModeProperty
set PropertyType "Mode" BillingModeProperty
newValue BillingModeProperty {Maybe ProvisionedThroughputProperty
()
Value Text
haddock_workaround_ :: BillingModeProperty -> ()
mode :: BillingModeProperty -> Value Text
provisionedThroughput :: BillingModeProperty -> Maybe ProvisionedThroughputProperty
haddock_workaround_ :: ()
mode :: Value Text
provisionedThroughput :: Maybe ProvisionedThroughputProperty
..}
    = BillingModeProperty {mode :: Value Text
mode = PropertyType "Mode" BillingModeProperty
Value Text
newValue, Maybe ProvisionedThroughputProperty
()
haddock_workaround_ :: ()
provisionedThroughput :: Maybe ProvisionedThroughputProperty
haddock_workaround_ :: ()
provisionedThroughput :: Maybe ProvisionedThroughputProperty
..}
instance Property "ProvisionedThroughput" BillingModeProperty where
  type PropertyType "ProvisionedThroughput" BillingModeProperty = ProvisionedThroughputProperty
  set :: PropertyType "ProvisionedThroughput" BillingModeProperty
-> BillingModeProperty -> BillingModeProperty
set PropertyType "ProvisionedThroughput" BillingModeProperty
newValue BillingModeProperty {Maybe ProvisionedThroughputProperty
()
Value Text
haddock_workaround_ :: BillingModeProperty -> ()
mode :: BillingModeProperty -> Value Text
provisionedThroughput :: BillingModeProperty -> Maybe ProvisionedThroughputProperty
haddock_workaround_ :: ()
mode :: Value Text
provisionedThroughput :: Maybe ProvisionedThroughputProperty
..}
    = BillingModeProperty
        {provisionedThroughput :: Maybe ProvisionedThroughputProperty
provisionedThroughput = ProvisionedThroughputProperty
-> Maybe ProvisionedThroughputProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ProvisionedThroughput" BillingModeProperty
ProvisionedThroughputProperty
newValue, ()
Value Text
haddock_workaround_ :: ()
mode :: Value Text
haddock_workaround_ :: ()
mode :: Value Text
..}