module Stratosphere.ECS.ClusterCapacityProviderAssociations (
        module Exports, ClusterCapacityProviderAssociations(..),
        mkClusterCapacityProviderAssociations
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ECS.ClusterCapacityProviderAssociations.CapacityProviderStrategyProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ClusterCapacityProviderAssociations
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-clustercapacityproviderassociations.html>
    ClusterCapacityProviderAssociations {ClusterCapacityProviderAssociations -> ()
haddock_workaround_ :: (),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-clustercapacityproviderassociations.html#cfn-ecs-clustercapacityproviderassociations-capacityproviders>
                                         ClusterCapacityProviderAssociations -> Maybe (ValueList Text)
capacityProviders :: (Prelude.Maybe (ValueList Prelude.Text)),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-clustercapacityproviderassociations.html#cfn-ecs-clustercapacityproviderassociations-cluster>
                                         ClusterCapacityProviderAssociations -> Value Text
cluster :: (Value Prelude.Text),
                                         -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-clustercapacityproviderassociations.html#cfn-ecs-clustercapacityproviderassociations-defaultcapacityproviderstrategy>
                                         ClusterCapacityProviderAssociations
-> [CapacityProviderStrategyProperty]
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]}
  deriving stock (ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations -> Bool
(ClusterCapacityProviderAssociations
 -> ClusterCapacityProviderAssociations -> Bool)
-> (ClusterCapacityProviderAssociations
    -> ClusterCapacityProviderAssociations -> Bool)
-> Eq ClusterCapacityProviderAssociations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations -> Bool
== :: ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations -> Bool
$c/= :: ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations -> Bool
/= :: ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations -> Bool
Prelude.Eq, Int -> ClusterCapacityProviderAssociations -> ShowS
[ClusterCapacityProviderAssociations] -> ShowS
ClusterCapacityProviderAssociations -> String
(Int -> ClusterCapacityProviderAssociations -> ShowS)
-> (ClusterCapacityProviderAssociations -> String)
-> ([ClusterCapacityProviderAssociations] -> ShowS)
-> Show ClusterCapacityProviderAssociations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClusterCapacityProviderAssociations -> ShowS
showsPrec :: Int -> ClusterCapacityProviderAssociations -> ShowS
$cshow :: ClusterCapacityProviderAssociations -> String
show :: ClusterCapacityProviderAssociations -> String
$cshowList :: [ClusterCapacityProviderAssociations] -> ShowS
showList :: [ClusterCapacityProviderAssociations] -> ShowS
Prelude.Show)
mkClusterCapacityProviderAssociations ::
  Value Prelude.Text
  -> [CapacityProviderStrategyProperty]
     -> ClusterCapacityProviderAssociations
mkClusterCapacityProviderAssociations :: Value Text
-> [CapacityProviderStrategyProperty]
-> ClusterCapacityProviderAssociations
mkClusterCapacityProviderAssociations
  Value Text
cluster
  [CapacityProviderStrategyProperty]
defaultCapacityProviderStrategy
  = ClusterCapacityProviderAssociations
      {haddock_workaround_ :: ()
haddock_workaround_ = (), cluster :: Value Text
cluster = Value Text
cluster,
       defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
defaultCapacityProviderStrategy = [CapacityProviderStrategyProperty]
defaultCapacityProviderStrategy,
       capacityProviders :: Maybe (ValueList Text)
capacityProviders = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ClusterCapacityProviderAssociations where
  toResourceProperties :: ClusterCapacityProviderAssociations -> ResourceProperties
toResourceProperties ClusterCapacityProviderAssociations {[CapacityProviderStrategyProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ClusterCapacityProviderAssociations -> ()
capacityProviders :: ClusterCapacityProviderAssociations -> Maybe (ValueList Text)
cluster :: ClusterCapacityProviderAssociations -> Value Text
defaultCapacityProviderStrategy :: ClusterCapacityProviderAssociations
-> [CapacityProviderStrategyProperty]
haddock_workaround_ :: ()
capacityProviders :: Maybe (ValueList Text)
cluster :: Value Text
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::ClusterCapacityProviderAssociations",
         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
"Cluster" 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
cluster,
                            Key
"DefaultCapacityProviderStrategy"
                              Key -> [CapacityProviderStrategyProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [CapacityProviderStrategyProperty]
defaultCapacityProviderStrategy]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> ValueList 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
"CapacityProviders" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
capacityProviders]))}
instance JSON.ToJSON ClusterCapacityProviderAssociations where
  toJSON :: ClusterCapacityProviderAssociations -> Value
toJSON ClusterCapacityProviderAssociations {[CapacityProviderStrategyProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ClusterCapacityProviderAssociations -> ()
capacityProviders :: ClusterCapacityProviderAssociations -> Maybe (ValueList Text)
cluster :: ClusterCapacityProviderAssociations -> Value Text
defaultCapacityProviderStrategy :: ClusterCapacityProviderAssociations
-> [CapacityProviderStrategyProperty]
haddock_workaround_ :: ()
capacityProviders :: Maybe (ValueList Text)
cluster :: Value Text
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
..}
    = [(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
"Cluster" 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
cluster,
               Key
"DefaultCapacityProviderStrategy"
                 Key -> [CapacityProviderStrategyProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [CapacityProviderStrategyProperty]
defaultCapacityProviderStrategy]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> ValueList 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
"CapacityProviders" (ValueList Text -> (Key, Value))
-> Maybe (ValueList Text) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (ValueList Text)
capacityProviders])))
instance Property "CapacityProviders" ClusterCapacityProviderAssociations where
  type PropertyType "CapacityProviders" ClusterCapacityProviderAssociations = ValueList Prelude.Text
  set :: PropertyType
  "CapacityProviders" ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations
set PropertyType
  "CapacityProviders" ClusterCapacityProviderAssociations
newValue ClusterCapacityProviderAssociations {[CapacityProviderStrategyProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ClusterCapacityProviderAssociations -> ()
capacityProviders :: ClusterCapacityProviderAssociations -> Maybe (ValueList Text)
cluster :: ClusterCapacityProviderAssociations -> Value Text
defaultCapacityProviderStrategy :: ClusterCapacityProviderAssociations
-> [CapacityProviderStrategyProperty]
haddock_workaround_ :: ()
capacityProviders :: Maybe (ValueList Text)
cluster :: Value Text
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
..}
    = ClusterCapacityProviderAssociations
        {capacityProviders :: Maybe (ValueList Text)
capacityProviders = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "CapacityProviders" ClusterCapacityProviderAssociations
ValueList Text
newValue, [CapacityProviderStrategyProperty]
()
Value Text
haddock_workaround_ :: ()
cluster :: Value Text
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
haddock_workaround_ :: ()
cluster :: Value Text
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
..}
instance Property "Cluster" ClusterCapacityProviderAssociations where
  type PropertyType "Cluster" ClusterCapacityProviderAssociations = Value Prelude.Text
  set :: PropertyType "Cluster" ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations
set PropertyType "Cluster" ClusterCapacityProviderAssociations
newValue ClusterCapacityProviderAssociations {[CapacityProviderStrategyProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ClusterCapacityProviderAssociations -> ()
capacityProviders :: ClusterCapacityProviderAssociations -> Maybe (ValueList Text)
cluster :: ClusterCapacityProviderAssociations -> Value Text
defaultCapacityProviderStrategy :: ClusterCapacityProviderAssociations
-> [CapacityProviderStrategyProperty]
haddock_workaround_ :: ()
capacityProviders :: Maybe (ValueList Text)
cluster :: Value Text
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
..}
    = ClusterCapacityProviderAssociations {cluster :: Value Text
cluster = PropertyType "Cluster" ClusterCapacityProviderAssociations
Value Text
newValue, [CapacityProviderStrategyProperty]
Maybe (ValueList Text)
()
haddock_workaround_ :: ()
capacityProviders :: Maybe (ValueList Text)
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
haddock_workaround_ :: ()
capacityProviders :: Maybe (ValueList Text)
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
..}
instance Property "DefaultCapacityProviderStrategy" ClusterCapacityProviderAssociations where
  type PropertyType "DefaultCapacityProviderStrategy" ClusterCapacityProviderAssociations = [CapacityProviderStrategyProperty]
  set :: PropertyType
  "DefaultCapacityProviderStrategy"
  ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations
-> ClusterCapacityProviderAssociations
set PropertyType
  "DefaultCapacityProviderStrategy"
  ClusterCapacityProviderAssociations
newValue ClusterCapacityProviderAssociations {[CapacityProviderStrategyProperty]
Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ClusterCapacityProviderAssociations -> ()
capacityProviders :: ClusterCapacityProviderAssociations -> Maybe (ValueList Text)
cluster :: ClusterCapacityProviderAssociations -> Value Text
defaultCapacityProviderStrategy :: ClusterCapacityProviderAssociations
-> [CapacityProviderStrategyProperty]
haddock_workaround_ :: ()
capacityProviders :: Maybe (ValueList Text)
cluster :: Value Text
defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
..}
    = ClusterCapacityProviderAssociations
        {defaultCapacityProviderStrategy :: [CapacityProviderStrategyProperty]
defaultCapacityProviderStrategy = [CapacityProviderStrategyProperty]
PropertyType
  "DefaultCapacityProviderStrategy"
  ClusterCapacityProviderAssociations
newValue, Maybe (ValueList Text)
()
Value Text
haddock_workaround_ :: ()
capacityProviders :: Maybe (ValueList Text)
cluster :: Value Text
haddock_workaround_ :: ()
capacityProviders :: Maybe (ValueList Text)
cluster :: Value Text
..}