module Stratosphere.QBusiness.Index.IndexCapacityConfigurationProperty (
        IndexCapacityConfigurationProperty(..),
        mkIndexCapacityConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IndexCapacityConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-index-indexcapacityconfiguration.html>
    IndexCapacityConfigurationProperty {IndexCapacityConfigurationProperty -> ()
haddock_workaround_ :: (),
                                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-qbusiness-index-indexcapacityconfiguration.html#cfn-qbusiness-index-indexcapacityconfiguration-units>
                                        IndexCapacityConfigurationProperty -> Maybe (Value Double)
units :: (Prelude.Maybe (Value Prelude.Double))}
  deriving stock (IndexCapacityConfigurationProperty
-> IndexCapacityConfigurationProperty -> Bool
(IndexCapacityConfigurationProperty
 -> IndexCapacityConfigurationProperty -> Bool)
-> (IndexCapacityConfigurationProperty
    -> IndexCapacityConfigurationProperty -> Bool)
-> Eq IndexCapacityConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IndexCapacityConfigurationProperty
-> IndexCapacityConfigurationProperty -> Bool
== :: IndexCapacityConfigurationProperty
-> IndexCapacityConfigurationProperty -> Bool
$c/= :: IndexCapacityConfigurationProperty
-> IndexCapacityConfigurationProperty -> Bool
/= :: IndexCapacityConfigurationProperty
-> IndexCapacityConfigurationProperty -> Bool
Prelude.Eq, Int -> IndexCapacityConfigurationProperty -> ShowS
[IndexCapacityConfigurationProperty] -> ShowS
IndexCapacityConfigurationProperty -> String
(Int -> IndexCapacityConfigurationProperty -> ShowS)
-> (IndexCapacityConfigurationProperty -> String)
-> ([IndexCapacityConfigurationProperty] -> ShowS)
-> Show IndexCapacityConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IndexCapacityConfigurationProperty -> ShowS
showsPrec :: Int -> IndexCapacityConfigurationProperty -> ShowS
$cshow :: IndexCapacityConfigurationProperty -> String
show :: IndexCapacityConfigurationProperty -> String
$cshowList :: [IndexCapacityConfigurationProperty] -> ShowS
showList :: [IndexCapacityConfigurationProperty] -> ShowS
Prelude.Show)
mkIndexCapacityConfigurationProperty ::
  IndexCapacityConfigurationProperty
mkIndexCapacityConfigurationProperty :: IndexCapacityConfigurationProperty
mkIndexCapacityConfigurationProperty
  = IndexCapacityConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), units :: Maybe (Value Double)
units = Maybe (Value Double)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IndexCapacityConfigurationProperty where
  toResourceProperties :: IndexCapacityConfigurationProperty -> ResourceProperties
toResourceProperties IndexCapacityConfigurationProperty {Maybe (Value Double)
()
haddock_workaround_ :: IndexCapacityConfigurationProperty -> ()
units :: IndexCapacityConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
units :: Maybe (Value Double)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::QBusiness::Index.IndexCapacityConfiguration",
         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 -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Units" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
units])}
instance JSON.ToJSON IndexCapacityConfigurationProperty where
  toJSON :: IndexCapacityConfigurationProperty -> Value
toJSON IndexCapacityConfigurationProperty {Maybe (Value Double)
()
haddock_workaround_ :: IndexCapacityConfigurationProperty -> ()
units :: IndexCapacityConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
units :: Maybe (Value Double)
..}
    = [(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 -> Value Double -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Units" (Value Double -> (Key, Value))
-> Maybe (Value Double) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Value Double)
units]))
instance Property "Units" IndexCapacityConfigurationProperty where
  type PropertyType "Units" IndexCapacityConfigurationProperty = Value Prelude.Double
  set :: PropertyType "Units" IndexCapacityConfigurationProperty
-> IndexCapacityConfigurationProperty
-> IndexCapacityConfigurationProperty
set PropertyType "Units" IndexCapacityConfigurationProperty
newValue IndexCapacityConfigurationProperty {Maybe (Value Double)
()
haddock_workaround_ :: IndexCapacityConfigurationProperty -> ()
units :: IndexCapacityConfigurationProperty -> Maybe (Value Double)
haddock_workaround_ :: ()
units :: Maybe (Value Double)
..}
    = IndexCapacityConfigurationProperty
        {units :: Maybe (Value Double)
units = Value Double -> Maybe (Value Double)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Units" IndexCapacityConfigurationProperty
Value Double
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}