module Stratosphere.Athena.CapacityReservation (
module Exports, CapacityReservation(..), mkCapacityReservation
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Athena.CapacityReservation.CapacityAssignmentConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data CapacityReservation
=
CapacityReservation {CapacityReservation -> ()
haddock_workaround_ :: (),
CapacityReservation
-> Maybe CapacityAssignmentConfigurationProperty
capacityAssignmentConfiguration :: (Prelude.Maybe CapacityAssignmentConfigurationProperty),
CapacityReservation -> Value Text
name :: (Value Prelude.Text),
CapacityReservation -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag]),
CapacityReservation -> Value Integer
targetDpus :: (Value Prelude.Integer)}
deriving stock (CapacityReservation -> CapacityReservation -> Bool
(CapacityReservation -> CapacityReservation -> Bool)
-> (CapacityReservation -> CapacityReservation -> Bool)
-> Eq CapacityReservation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CapacityReservation -> CapacityReservation -> Bool
== :: CapacityReservation -> CapacityReservation -> Bool
$c/= :: CapacityReservation -> CapacityReservation -> Bool
/= :: CapacityReservation -> CapacityReservation -> Bool
Prelude.Eq, Int -> CapacityReservation -> ShowS
[CapacityReservation] -> ShowS
CapacityReservation -> String
(Int -> CapacityReservation -> ShowS)
-> (CapacityReservation -> String)
-> ([CapacityReservation] -> ShowS)
-> Show CapacityReservation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CapacityReservation -> ShowS
showsPrec :: Int -> CapacityReservation -> ShowS
$cshow :: CapacityReservation -> String
show :: CapacityReservation -> String
$cshowList :: [CapacityReservation] -> ShowS
showList :: [CapacityReservation] -> ShowS
Prelude.Show)
mkCapacityReservation ::
Value Prelude.Text -> Value Prelude.Integer -> CapacityReservation
mkCapacityReservation :: Value Text -> Value Integer -> CapacityReservation
mkCapacityReservation Value Text
name Value Integer
targetDpus
= CapacityReservation
{haddock_workaround_ :: ()
haddock_workaround_ = (), name :: Value Text
name = Value Text
name, targetDpus :: Value Integer
targetDpus = Value Integer
targetDpus,
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
capacityAssignmentConfiguration = Maybe CapacityAssignmentConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CapacityReservation where
toResourceProperties :: CapacityReservation -> ResourceProperties
toResourceProperties CapacityReservation {Maybe [Tag]
Maybe CapacityAssignmentConfigurationProperty
()
Value Integer
Value Text
haddock_workaround_ :: CapacityReservation -> ()
capacityAssignmentConfiguration :: CapacityReservation
-> Maybe CapacityAssignmentConfigurationProperty
name :: CapacityReservation -> Value Text
tags :: CapacityReservation -> Maybe [Tag]
targetDpus :: CapacityReservation -> Value Integer
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
targetDpus :: Value Integer
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::Athena::CapacityReservation",
supportsTags :: Bool
supportsTags = Bool
Prelude.True,
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, Key
"TargetDpus" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
targetDpus]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CapacityAssignmentConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityAssignmentConfiguration"
(CapacityAssignmentConfigurationProperty -> (Key, Value))
-> Maybe CapacityAssignmentConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityAssignmentConfigurationProperty
capacityAssignmentConfiguration,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags]))}
instance JSON.ToJSON CapacityReservation where
toJSON :: CapacityReservation -> Value
toJSON CapacityReservation {Maybe [Tag]
Maybe CapacityAssignmentConfigurationProperty
()
Value Integer
Value Text
haddock_workaround_ :: CapacityReservation -> ()
capacityAssignmentConfiguration :: CapacityReservation
-> Maybe CapacityAssignmentConfigurationProperty
name :: CapacityReservation -> Value Text
tags :: CapacityReservation -> Maybe [Tag]
targetDpus :: CapacityReservation -> Value Integer
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
targetDpus :: Value Integer
..}
= [(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, Key
"TargetDpus" Key -> Value Integer -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= Value Integer
targetDpus]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> CapacityAssignmentConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"CapacityAssignmentConfiguration"
(CapacityAssignmentConfigurationProperty -> (Key, Value))
-> Maybe CapacityAssignmentConfigurationProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CapacityAssignmentConfigurationProperty
capacityAssignmentConfiguration,
Key -> [Tag] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Tags" ([Tag] -> (Key, Value)) -> Maybe [Tag] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags])))
instance Property "CapacityAssignmentConfiguration" CapacityReservation where
type PropertyType "CapacityAssignmentConfiguration" CapacityReservation = CapacityAssignmentConfigurationProperty
set :: PropertyType "CapacityAssignmentConfiguration" CapacityReservation
-> CapacityReservation -> CapacityReservation
set PropertyType "CapacityAssignmentConfiguration" CapacityReservation
newValue CapacityReservation {Maybe [Tag]
Maybe CapacityAssignmentConfigurationProperty
()
Value Integer
Value Text
haddock_workaround_ :: CapacityReservation -> ()
capacityAssignmentConfiguration :: CapacityReservation
-> Maybe CapacityAssignmentConfigurationProperty
name :: CapacityReservation -> Value Text
tags :: CapacityReservation -> Maybe [Tag]
targetDpus :: CapacityReservation -> Value Integer
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
targetDpus :: Value Integer
..}
= CapacityReservation
{capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
capacityAssignmentConfiguration = CapacityAssignmentConfigurationProperty
-> Maybe CapacityAssignmentConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "CapacityAssignmentConfiguration" CapacityReservation
CapacityAssignmentConfigurationProperty
newValue, Maybe [Tag]
()
Value Integer
Value Text
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
targetDpus :: Value Integer
haddock_workaround_ :: ()
name :: Value Text
tags :: Maybe [Tag]
targetDpus :: Value Integer
..}
instance Property "Name" CapacityReservation where
type PropertyType "Name" CapacityReservation = Value Prelude.Text
set :: PropertyType "Name" CapacityReservation
-> CapacityReservation -> CapacityReservation
set PropertyType "Name" CapacityReservation
newValue CapacityReservation {Maybe [Tag]
Maybe CapacityAssignmentConfigurationProperty
()
Value Integer
Value Text
haddock_workaround_ :: CapacityReservation -> ()
capacityAssignmentConfiguration :: CapacityReservation
-> Maybe CapacityAssignmentConfigurationProperty
name :: CapacityReservation -> Value Text
tags :: CapacityReservation -> Maybe [Tag]
targetDpus :: CapacityReservation -> Value Integer
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
targetDpus :: Value Integer
..}
= CapacityReservation {name :: Value Text
name = PropertyType "Name" CapacityReservation
Value Text
newValue, Maybe [Tag]
Maybe CapacityAssignmentConfigurationProperty
()
Value Integer
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
tags :: Maybe [Tag]
targetDpus :: Value Integer
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
tags :: Maybe [Tag]
targetDpus :: Value Integer
..}
instance Property "Tags" CapacityReservation where
type PropertyType "Tags" CapacityReservation = [Tag]
set :: PropertyType "Tags" CapacityReservation
-> CapacityReservation -> CapacityReservation
set PropertyType "Tags" CapacityReservation
newValue CapacityReservation {Maybe [Tag]
Maybe CapacityAssignmentConfigurationProperty
()
Value Integer
Value Text
haddock_workaround_ :: CapacityReservation -> ()
capacityAssignmentConfiguration :: CapacityReservation
-> Maybe CapacityAssignmentConfigurationProperty
name :: CapacityReservation -> Value Text
tags :: CapacityReservation -> Maybe [Tag]
targetDpus :: CapacityReservation -> Value Integer
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
targetDpus :: Value Integer
..}
= CapacityReservation {tags :: Maybe [Tag]
tags = [Tag] -> Maybe [Tag]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [Tag]
PropertyType "Tags" CapacityReservation
newValue, Maybe CapacityAssignmentConfigurationProperty
()
Value Integer
Value Text
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
targetDpus :: Value Integer
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
targetDpus :: Value Integer
..}
instance Property "TargetDpus" CapacityReservation where
type PropertyType "TargetDpus" CapacityReservation = Value Prelude.Integer
set :: PropertyType "TargetDpus" CapacityReservation
-> CapacityReservation -> CapacityReservation
set PropertyType "TargetDpus" CapacityReservation
newValue CapacityReservation {Maybe [Tag]
Maybe CapacityAssignmentConfigurationProperty
()
Value Integer
Value Text
haddock_workaround_ :: CapacityReservation -> ()
capacityAssignmentConfiguration :: CapacityReservation
-> Maybe CapacityAssignmentConfigurationProperty
name :: CapacityReservation -> Value Text
tags :: CapacityReservation -> Maybe [Tag]
targetDpus :: CapacityReservation -> Value Integer
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
targetDpus :: Value Integer
..}
= CapacityReservation {targetDpus :: Value Integer
targetDpus = PropertyType "TargetDpus" CapacityReservation
Value Integer
newValue, Maybe [Tag]
Maybe CapacityAssignmentConfigurationProperty
()
Value Text
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
haddock_workaround_ :: ()
capacityAssignmentConfiguration :: Maybe CapacityAssignmentConfigurationProperty
name :: Value Text
tags :: Maybe [Tag]
..}