module Stratosphere.ECS.CapacityProvider.ManagedInstancesProviderProperty (
        module Exports, ManagedInstancesProviderProperty(..),
        mkManagedInstancesProviderProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.ECS.CapacityProvider.InstanceLaunchTemplateProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ManagedInstancesProviderProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html>
    ManagedInstancesProviderProperty {ManagedInstancesProviderProperty -> ()
haddock_workaround_ :: (),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructurerolearn>
                                      ManagedInstancesProviderProperty -> Value Text
infrastructureRoleArn :: (Value Prelude.Text),
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-instancelaunchtemplate>
                                      ManagedInstancesProviderProperty -> InstanceLaunchTemplateProperty
instanceLaunchTemplate :: InstanceLaunchTemplateProperty,
                                      -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesprovider.html#cfn-ecs-capacityprovider-managedinstancesprovider-propagatetags>
                                      ManagedInstancesProviderProperty -> Maybe (Value Text)
propagateTags :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty -> Bool
(ManagedInstancesProviderProperty
 -> ManagedInstancesProviderProperty -> Bool)
-> (ManagedInstancesProviderProperty
    -> ManagedInstancesProviderProperty -> Bool)
-> Eq ManagedInstancesProviderProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty -> Bool
== :: ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty -> Bool
$c/= :: ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty -> Bool
/= :: ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty -> Bool
Prelude.Eq, Int -> ManagedInstancesProviderProperty -> ShowS
[ManagedInstancesProviderProperty] -> ShowS
ManagedInstancesProviderProperty -> String
(Int -> ManagedInstancesProviderProperty -> ShowS)
-> (ManagedInstancesProviderProperty -> String)
-> ([ManagedInstancesProviderProperty] -> ShowS)
-> Show ManagedInstancesProviderProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ManagedInstancesProviderProperty -> ShowS
showsPrec :: Int -> ManagedInstancesProviderProperty -> ShowS
$cshow :: ManagedInstancesProviderProperty -> String
show :: ManagedInstancesProviderProperty -> String
$cshowList :: [ManagedInstancesProviderProperty] -> ShowS
showList :: [ManagedInstancesProviderProperty] -> ShowS
Prelude.Show)
mkManagedInstancesProviderProperty ::
  Value Prelude.Text
  -> InstanceLaunchTemplateProperty
     -> ManagedInstancesProviderProperty
mkManagedInstancesProviderProperty :: Value Text
-> InstanceLaunchTemplateProperty
-> ManagedInstancesProviderProperty
mkManagedInstancesProviderProperty
  Value Text
infrastructureRoleArn
  InstanceLaunchTemplateProperty
instanceLaunchTemplate
  = ManagedInstancesProviderProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (),
       infrastructureRoleArn :: Value Text
infrastructureRoleArn = Value Text
infrastructureRoleArn,
       instanceLaunchTemplate :: InstanceLaunchTemplateProperty
instanceLaunchTemplate = InstanceLaunchTemplateProperty
instanceLaunchTemplate,
       propagateTags :: Maybe (Value Text)
propagateTags = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ManagedInstancesProviderProperty where
  toResourceProperties :: ManagedInstancesProviderProperty -> ResourceProperties
toResourceProperties ManagedInstancesProviderProperty {Maybe (Value Text)
()
Value Text
InstanceLaunchTemplateProperty
haddock_workaround_ :: ManagedInstancesProviderProperty -> ()
infrastructureRoleArn :: ManagedInstancesProviderProperty -> Value Text
instanceLaunchTemplate :: ManagedInstancesProviderProperty -> InstanceLaunchTemplateProperty
propagateTags :: ManagedInstancesProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
infrastructureRoleArn :: Value Text
instanceLaunchTemplate :: InstanceLaunchTemplateProperty
propagateTags :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::CapacityProvider.ManagedInstancesProvider",
         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
"InfrastructureRoleArn" 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
infrastructureRoleArn,
                            Key
"InstanceLaunchTemplate" Key -> InstanceLaunchTemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= InstanceLaunchTemplateProperty
instanceLaunchTemplate]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [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
"PropagateTags" (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)
propagateTags]))}
instance JSON.ToJSON ManagedInstancesProviderProperty where
  toJSON :: ManagedInstancesProviderProperty -> Value
toJSON ManagedInstancesProviderProperty {Maybe (Value Text)
()
Value Text
InstanceLaunchTemplateProperty
haddock_workaround_ :: ManagedInstancesProviderProperty -> ()
infrastructureRoleArn :: ManagedInstancesProviderProperty -> Value Text
instanceLaunchTemplate :: ManagedInstancesProviderProperty -> InstanceLaunchTemplateProperty
propagateTags :: ManagedInstancesProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
infrastructureRoleArn :: Value Text
instanceLaunchTemplate :: InstanceLaunchTemplateProperty
propagateTags :: Maybe (Value Text)
..}
    = [(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
"InfrastructureRoleArn" 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
infrastructureRoleArn,
               Key
"InstanceLaunchTemplate" Key -> InstanceLaunchTemplateProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= InstanceLaunchTemplateProperty
instanceLaunchTemplate]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [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
"PropagateTags" (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)
propagateTags])))
instance Property "InfrastructureRoleArn" ManagedInstancesProviderProperty where
  type PropertyType "InfrastructureRoleArn" ManagedInstancesProviderProperty = Value Prelude.Text
  set :: PropertyType
  "InfrastructureRoleArn" ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty
set PropertyType
  "InfrastructureRoleArn" ManagedInstancesProviderProperty
newValue ManagedInstancesProviderProperty {Maybe (Value Text)
()
Value Text
InstanceLaunchTemplateProperty
haddock_workaround_ :: ManagedInstancesProviderProperty -> ()
infrastructureRoleArn :: ManagedInstancesProviderProperty -> Value Text
instanceLaunchTemplate :: ManagedInstancesProviderProperty -> InstanceLaunchTemplateProperty
propagateTags :: ManagedInstancesProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
infrastructureRoleArn :: Value Text
instanceLaunchTemplate :: InstanceLaunchTemplateProperty
propagateTags :: Maybe (Value Text)
..}
    = ManagedInstancesProviderProperty
        {infrastructureRoleArn :: Value Text
infrastructureRoleArn = PropertyType
  "InfrastructureRoleArn" ManagedInstancesProviderProperty
Value Text
newValue, Maybe (Value Text)
()
InstanceLaunchTemplateProperty
haddock_workaround_ :: ()
instanceLaunchTemplate :: InstanceLaunchTemplateProperty
propagateTags :: Maybe (Value Text)
haddock_workaround_ :: ()
instanceLaunchTemplate :: InstanceLaunchTemplateProperty
propagateTags :: Maybe (Value Text)
..}
instance Property "InstanceLaunchTemplate" ManagedInstancesProviderProperty where
  type PropertyType "InstanceLaunchTemplate" ManagedInstancesProviderProperty = InstanceLaunchTemplateProperty
  set :: PropertyType
  "InstanceLaunchTemplate" ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty
set PropertyType
  "InstanceLaunchTemplate" ManagedInstancesProviderProperty
newValue ManagedInstancesProviderProperty {Maybe (Value Text)
()
Value Text
InstanceLaunchTemplateProperty
haddock_workaround_ :: ManagedInstancesProviderProperty -> ()
infrastructureRoleArn :: ManagedInstancesProviderProperty -> Value Text
instanceLaunchTemplate :: ManagedInstancesProviderProperty -> InstanceLaunchTemplateProperty
propagateTags :: ManagedInstancesProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
infrastructureRoleArn :: Value Text
instanceLaunchTemplate :: InstanceLaunchTemplateProperty
propagateTags :: Maybe (Value Text)
..}
    = ManagedInstancesProviderProperty
        {instanceLaunchTemplate :: InstanceLaunchTemplateProperty
instanceLaunchTemplate = PropertyType
  "InstanceLaunchTemplate" ManagedInstancesProviderProperty
InstanceLaunchTemplateProperty
newValue, Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
infrastructureRoleArn :: Value Text
propagateTags :: Maybe (Value Text)
haddock_workaround_ :: ()
infrastructureRoleArn :: Value Text
propagateTags :: Maybe (Value Text)
..}
instance Property "PropagateTags" ManagedInstancesProviderProperty where
  type PropertyType "PropagateTags" ManagedInstancesProviderProperty = Value Prelude.Text
  set :: PropertyType "PropagateTags" ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty
-> ManagedInstancesProviderProperty
set PropertyType "PropagateTags" ManagedInstancesProviderProperty
newValue ManagedInstancesProviderProperty {Maybe (Value Text)
()
Value Text
InstanceLaunchTemplateProperty
haddock_workaround_ :: ManagedInstancesProviderProperty -> ()
infrastructureRoleArn :: ManagedInstancesProviderProperty -> Value Text
instanceLaunchTemplate :: ManagedInstancesProviderProperty -> InstanceLaunchTemplateProperty
propagateTags :: ManagedInstancesProviderProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
infrastructureRoleArn :: Value Text
instanceLaunchTemplate :: InstanceLaunchTemplateProperty
propagateTags :: Maybe (Value Text)
..}
    = ManagedInstancesProviderProperty
        {propagateTags :: Maybe (Value Text)
propagateTags = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "PropagateTags" ManagedInstancesProviderProperty
Value Text
newValue, ()
Value Text
InstanceLaunchTemplateProperty
haddock_workaround_ :: ()
infrastructureRoleArn :: Value Text
instanceLaunchTemplate :: InstanceLaunchTemplateProperty
haddock_workaround_ :: ()
infrastructureRoleArn :: Value Text
instanceLaunchTemplate :: InstanceLaunchTemplateProperty
..}