module Stratosphere.ECS.CapacityProvider (
        module Exports, CapacityProvider(..), mkCapacityProvider
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ECS.CapacityProvider.AutoScalingGroupProviderProperty as Exports
import {-# SOURCE #-} Stratosphere.ECS.CapacityProvider.ManagedInstancesProviderProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Tag
import Stratosphere.Value
data CapacityProvider
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html>
    CapacityProvider {CapacityProvider -> ()
haddock_workaround_ :: (),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-autoscalinggroupprovider>
                      CapacityProvider -> Maybe AutoScalingGroupProviderProperty
autoScalingGroupProvider :: (Prelude.Maybe AutoScalingGroupProviderProperty),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-clustername>
                      CapacityProvider -> Maybe (Value Text)
clusterName :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider>
                      CapacityProvider -> Maybe ManagedInstancesProviderProperty
managedInstancesProvider :: (Prelude.Maybe ManagedInstancesProviderProperty),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-name>
                      CapacityProvider -> Maybe (Value Text)
name :: (Prelude.Maybe (Value Prelude.Text)),
                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#cfn-ecs-capacityprovider-tags>
                      CapacityProvider -> Maybe [Tag]
tags :: (Prelude.Maybe [Tag])}
  deriving stock (CapacityProvider -> CapacityProvider -> Bool
(CapacityProvider -> CapacityProvider -> Bool)
-> (CapacityProvider -> CapacityProvider -> Bool)
-> Eq CapacityProvider
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: CapacityProvider -> CapacityProvider -> Bool
== :: CapacityProvider -> CapacityProvider -> Bool
$c/= :: CapacityProvider -> CapacityProvider -> Bool
/= :: CapacityProvider -> CapacityProvider -> Bool
Prelude.Eq, Int -> CapacityProvider -> ShowS
[CapacityProvider] -> ShowS
CapacityProvider -> String
(Int -> CapacityProvider -> ShowS)
-> (CapacityProvider -> String)
-> ([CapacityProvider] -> ShowS)
-> Show CapacityProvider
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> CapacityProvider -> ShowS
showsPrec :: Int -> CapacityProvider -> ShowS
$cshow :: CapacityProvider -> String
show :: CapacityProvider -> String
$cshowList :: [CapacityProvider] -> ShowS
showList :: [CapacityProvider] -> ShowS
Prelude.Show)
mkCapacityProvider :: CapacityProvider
mkCapacityProvider :: CapacityProvider
mkCapacityProvider
  = CapacityProvider
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
autoScalingGroupProvider = Maybe AutoScalingGroupProviderProperty
forall a. Maybe a
Prelude.Nothing,
       clusterName :: Maybe (Value Text)
clusterName = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
managedInstancesProvider = Maybe ManagedInstancesProviderProperty
forall a. Maybe a
Prelude.Nothing, name :: Maybe (Value Text)
name = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       tags :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties CapacityProvider where
  toResourceProperties :: CapacityProvider -> ResourceProperties
toResourceProperties CapacityProvider {Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: CapacityProvider -> ()
autoScalingGroupProvider :: CapacityProvider -> Maybe AutoScalingGroupProviderProperty
clusterName :: CapacityProvider -> Maybe (Value Text)
managedInstancesProvider :: CapacityProvider -> Maybe ManagedInstancesProviderProperty
name :: CapacityProvider -> Maybe (Value Text)
tags :: CapacityProvider -> Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::CapacityProvider",
         supportsTags :: Bool
supportsTags = Bool
Prelude.True,
         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 -> AutoScalingGroupProviderProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AutoScalingGroupProvider"
                              (AutoScalingGroupProviderProperty -> (Key, Value))
-> Maybe AutoScalingGroupProviderProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoScalingGroupProviderProperty
autoScalingGroupProvider,
                            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
"ClusterName" (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)
clusterName,
                            Key -> ManagedInstancesProviderProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ManagedInstancesProvider"
                              (ManagedInstancesProviderProperty -> (Key, Value))
-> Maybe ManagedInstancesProviderProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedInstancesProviderProperty
managedInstancesProvider,
                            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,
                            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 CapacityProvider where
  toJSON :: CapacityProvider -> Value
toJSON CapacityProvider {Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: CapacityProvider -> ()
autoScalingGroupProvider :: CapacityProvider -> Maybe AutoScalingGroupProviderProperty
clusterName :: CapacityProvider -> Maybe (Value Text)
managedInstancesProvider :: CapacityProvider -> Maybe ManagedInstancesProviderProperty
name :: CapacityProvider -> Maybe (Value Text)
tags :: CapacityProvider -> Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = [(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 -> AutoScalingGroupProviderProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"AutoScalingGroupProvider"
                 (AutoScalingGroupProviderProperty -> (Key, Value))
-> Maybe AutoScalingGroupProviderProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AutoScalingGroupProviderProperty
autoScalingGroupProvider,
               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
"ClusterName" (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)
clusterName,
               Key -> ManagedInstancesProviderProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"ManagedInstancesProvider"
                 (ManagedInstancesProviderProperty -> (Key, Value))
-> Maybe ManagedInstancesProviderProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ManagedInstancesProviderProperty
managedInstancesProvider,
               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,
               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 "AutoScalingGroupProvider" CapacityProvider where
  type PropertyType "AutoScalingGroupProvider" CapacityProvider = AutoScalingGroupProviderProperty
  set :: PropertyType "AutoScalingGroupProvider" CapacityProvider
-> CapacityProvider -> CapacityProvider
set PropertyType "AutoScalingGroupProvider" CapacityProvider
newValue CapacityProvider {Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: CapacityProvider -> ()
autoScalingGroupProvider :: CapacityProvider -> Maybe AutoScalingGroupProviderProperty
clusterName :: CapacityProvider -> Maybe (Value Text)
managedInstancesProvider :: CapacityProvider -> Maybe ManagedInstancesProviderProperty
name :: CapacityProvider -> Maybe (Value Text)
tags :: CapacityProvider -> Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = CapacityProvider
        {autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
autoScalingGroupProvider = AutoScalingGroupProviderProperty
-> Maybe AutoScalingGroupProviderProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "AutoScalingGroupProvider" CapacityProvider
AutoScalingGroupProviderProperty
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: ()
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ClusterName" CapacityProvider where
  type PropertyType "ClusterName" CapacityProvider = Value Prelude.Text
  set :: PropertyType "ClusterName" CapacityProvider
-> CapacityProvider -> CapacityProvider
set PropertyType "ClusterName" CapacityProvider
newValue CapacityProvider {Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: CapacityProvider -> ()
autoScalingGroupProvider :: CapacityProvider -> Maybe AutoScalingGroupProviderProperty
clusterName :: CapacityProvider -> Maybe (Value Text)
managedInstancesProvider :: CapacityProvider -> Maybe ManagedInstancesProviderProperty
name :: CapacityProvider -> Maybe (Value Text)
tags :: CapacityProvider -> Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = CapacityProvider {clusterName :: Maybe (Value Text)
clusterName = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ClusterName" CapacityProvider
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "ManagedInstancesProvider" CapacityProvider where
  type PropertyType "ManagedInstancesProvider" CapacityProvider = ManagedInstancesProviderProperty
  set :: PropertyType "ManagedInstancesProvider" CapacityProvider
-> CapacityProvider -> CapacityProvider
set PropertyType "ManagedInstancesProvider" CapacityProvider
newValue CapacityProvider {Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: CapacityProvider -> ()
autoScalingGroupProvider :: CapacityProvider -> Maybe AutoScalingGroupProviderProperty
clusterName :: CapacityProvider -> Maybe (Value Text)
managedInstancesProvider :: CapacityProvider -> Maybe ManagedInstancesProviderProperty
name :: CapacityProvider -> Maybe (Value Text)
tags :: CapacityProvider -> Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = CapacityProvider
        {managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
managedInstancesProvider = ManagedInstancesProviderProperty
-> Maybe ManagedInstancesProviderProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ManagedInstancesProvider" CapacityProvider
ManagedInstancesProviderProperty
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
()
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
instance Property "Name" CapacityProvider where
  type PropertyType "Name" CapacityProvider = Value Prelude.Text
  set :: PropertyType "Name" CapacityProvider
-> CapacityProvider -> CapacityProvider
set PropertyType "Name" CapacityProvider
newValue CapacityProvider {Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: CapacityProvider -> ()
autoScalingGroupProvider :: CapacityProvider -> Maybe AutoScalingGroupProviderProperty
clusterName :: CapacityProvider -> Maybe (Value Text)
managedInstancesProvider :: CapacityProvider -> Maybe ManagedInstancesProviderProperty
name :: CapacityProvider -> Maybe (Value Text)
tags :: CapacityProvider -> Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = CapacityProvider {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" CapacityProvider
Value Text
newValue, Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
tags :: Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
tags :: Maybe [Tag]
..}
instance Property "Tags" CapacityProvider where
  type PropertyType "Tags" CapacityProvider = [Tag]
  set :: PropertyType "Tags" CapacityProvider
-> CapacityProvider -> CapacityProvider
set PropertyType "Tags" CapacityProvider
newValue CapacityProvider {Maybe [Tag]
Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: CapacityProvider -> ()
autoScalingGroupProvider :: CapacityProvider -> Maybe AutoScalingGroupProviderProperty
clusterName :: CapacityProvider -> Maybe (Value Text)
managedInstancesProvider :: CapacityProvider -> Maybe ManagedInstancesProviderProperty
name :: CapacityProvider -> Maybe (Value Text)
tags :: CapacityProvider -> Maybe [Tag]
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
tags :: Maybe [Tag]
..}
    = CapacityProvider {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" CapacityProvider
newValue, Maybe (Value Text)
Maybe AutoScalingGroupProviderProperty
Maybe ManagedInstancesProviderProperty
()
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
haddock_workaround_ :: ()
autoScalingGroupProvider :: Maybe AutoScalingGroupProviderProperty
clusterName :: Maybe (Value Text)
managedInstancesProvider :: Maybe ManagedInstancesProviderProperty
name :: Maybe (Value Text)
..}