module Stratosphere.ECS.CapacityProvider.ManagedInstancesNetworkConfigurationProperty (
        ManagedInstancesNetworkConfigurationProperty(..),
        mkManagedInstancesNetworkConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ManagedInstancesNetworkConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html>
    ManagedInstancesNetworkConfigurationProperty {ManagedInstancesNetworkConfigurationProperty -> ()
haddock_workaround_ :: (),
                                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-securitygroups>
                                                  ManagedInstancesNetworkConfigurationProperty
-> Maybe (ValueList Text)
securityGroups :: (Prelude.Maybe (ValueList Prelude.Text)),
                                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.html#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-subnets>
                                                  ManagedInstancesNetworkConfigurationProperty -> ValueList Text
subnets :: (ValueList Prelude.Text)}
  deriving stock (ManagedInstancesNetworkConfigurationProperty
-> ManagedInstancesNetworkConfigurationProperty -> Bool
(ManagedInstancesNetworkConfigurationProperty
 -> ManagedInstancesNetworkConfigurationProperty -> Bool)
-> (ManagedInstancesNetworkConfigurationProperty
    -> ManagedInstancesNetworkConfigurationProperty -> Bool)
-> Eq ManagedInstancesNetworkConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ManagedInstancesNetworkConfigurationProperty
-> ManagedInstancesNetworkConfigurationProperty -> Bool
== :: ManagedInstancesNetworkConfigurationProperty
-> ManagedInstancesNetworkConfigurationProperty -> Bool
$c/= :: ManagedInstancesNetworkConfigurationProperty
-> ManagedInstancesNetworkConfigurationProperty -> Bool
/= :: ManagedInstancesNetworkConfigurationProperty
-> ManagedInstancesNetworkConfigurationProperty -> Bool
Prelude.Eq, Int -> ManagedInstancesNetworkConfigurationProperty -> ShowS
[ManagedInstancesNetworkConfigurationProperty] -> ShowS
ManagedInstancesNetworkConfigurationProperty -> String
(Int -> ManagedInstancesNetworkConfigurationProperty -> ShowS)
-> (ManagedInstancesNetworkConfigurationProperty -> String)
-> ([ManagedInstancesNetworkConfigurationProperty] -> ShowS)
-> Show ManagedInstancesNetworkConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ManagedInstancesNetworkConfigurationProperty -> ShowS
showsPrec :: Int -> ManagedInstancesNetworkConfigurationProperty -> ShowS
$cshow :: ManagedInstancesNetworkConfigurationProperty -> String
show :: ManagedInstancesNetworkConfigurationProperty -> String
$cshowList :: [ManagedInstancesNetworkConfigurationProperty] -> ShowS
showList :: [ManagedInstancesNetworkConfigurationProperty] -> ShowS
Prelude.Show)
mkManagedInstancesNetworkConfigurationProperty ::
  ValueList Prelude.Text
  -> ManagedInstancesNetworkConfigurationProperty
mkManagedInstancesNetworkConfigurationProperty :: ValueList Text -> ManagedInstancesNetworkConfigurationProperty
mkManagedInstancesNetworkConfigurationProperty ValueList Text
subnets
  = ManagedInstancesNetworkConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), subnets :: ValueList Text
subnets = ValueList Text
subnets,
       securityGroups :: Maybe (ValueList Text)
securityGroups = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ManagedInstancesNetworkConfigurationProperty where
  toResourceProperties :: ManagedInstancesNetworkConfigurationProperty -> ResourceProperties
toResourceProperties
    ManagedInstancesNetworkConfigurationProperty {Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: ManagedInstancesNetworkConfigurationProperty -> ()
securityGroups :: ManagedInstancesNetworkConfigurationProperty
-> Maybe (ValueList Text)
subnets :: ManagedInstancesNetworkConfigurationProperty -> ValueList Text
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ECS::CapacityProvider.ManagedInstancesNetworkConfiguration",
         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
"Subnets" 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..= ValueList Text
subnets]
                           ([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
"SecurityGroups" (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)
securityGroups]))}
instance JSON.ToJSON ManagedInstancesNetworkConfigurationProperty where
  toJSON :: ManagedInstancesNetworkConfigurationProperty -> Value
toJSON ManagedInstancesNetworkConfigurationProperty {Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: ManagedInstancesNetworkConfigurationProperty -> ()
securityGroups :: ManagedInstancesNetworkConfigurationProperty
-> Maybe (ValueList Text)
subnets :: ManagedInstancesNetworkConfigurationProperty -> ValueList Text
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList 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
"Subnets" 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..= ValueList Text
subnets]
              ([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
"SecurityGroups" (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)
securityGroups])))
instance Property "SecurityGroups" ManagedInstancesNetworkConfigurationProperty where
  type PropertyType "SecurityGroups" ManagedInstancesNetworkConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType
  "SecurityGroups" ManagedInstancesNetworkConfigurationProperty
-> ManagedInstancesNetworkConfigurationProperty
-> ManagedInstancesNetworkConfigurationProperty
set PropertyType
  "SecurityGroups" ManagedInstancesNetworkConfigurationProperty
newValue ManagedInstancesNetworkConfigurationProperty {Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: ManagedInstancesNetworkConfigurationProperty -> ()
securityGroups :: ManagedInstancesNetworkConfigurationProperty
-> Maybe (ValueList Text)
subnets :: ManagedInstancesNetworkConfigurationProperty -> ValueList Text
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
..}
    = ManagedInstancesNetworkConfigurationProperty
        {securityGroups :: Maybe (ValueList Text)
securityGroups = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType
  "SecurityGroups" ManagedInstancesNetworkConfigurationProperty
ValueList Text
newValue, ()
ValueList Text
haddock_workaround_ :: ()
subnets :: ValueList Text
haddock_workaround_ :: ()
subnets :: ValueList Text
..}
instance Property "Subnets" ManagedInstancesNetworkConfigurationProperty where
  type PropertyType "Subnets" ManagedInstancesNetworkConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "Subnets" ManagedInstancesNetworkConfigurationProperty
-> ManagedInstancesNetworkConfigurationProperty
-> ManagedInstancesNetworkConfigurationProperty
set PropertyType "Subnets" ManagedInstancesNetworkConfigurationProperty
newValue ManagedInstancesNetworkConfigurationProperty {Maybe (ValueList Text)
()
ValueList Text
haddock_workaround_ :: ManagedInstancesNetworkConfigurationProperty -> ()
securityGroups :: ManagedInstancesNetworkConfigurationProperty
-> Maybe (ValueList Text)
subnets :: ManagedInstancesNetworkConfigurationProperty -> ValueList Text
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
subnets :: ValueList Text
..}
    = ManagedInstancesNetworkConfigurationProperty
        {subnets :: ValueList Text
subnets = PropertyType "Subnets" ManagedInstancesNetworkConfigurationProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
haddock_workaround_ :: ()
securityGroups :: Maybe (ValueList Text)
..}