module Stratosphere.MWAA.Environment.NetworkConfigurationProperty (
        NetworkConfigurationProperty(..), mkNetworkConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NetworkConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html>
    NetworkConfigurationProperty {NetworkConfigurationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html#cfn-mwaa-environment-networkconfiguration-securitygroupids>
                                  NetworkConfigurationProperty -> Maybe (ValueList Text)
securityGroupIds :: (Prelude.Maybe (ValueList Prelude.Text)),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html#cfn-mwaa-environment-networkconfiguration-subnetids>
                                  NetworkConfigurationProperty -> Maybe (ValueList Text)
subnetIds :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
(NetworkConfigurationProperty
 -> NetworkConfigurationProperty -> Bool)
-> (NetworkConfigurationProperty
    -> NetworkConfigurationProperty -> Bool)
-> Eq NetworkConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
== :: NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
$c/= :: NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
/= :: NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
Prelude.Eq, Int -> NetworkConfigurationProperty -> ShowS
[NetworkConfigurationProperty] -> ShowS
NetworkConfigurationProperty -> String
(Int -> NetworkConfigurationProperty -> ShowS)
-> (NetworkConfigurationProperty -> String)
-> ([NetworkConfigurationProperty] -> ShowS)
-> Show NetworkConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NetworkConfigurationProperty -> ShowS
showsPrec :: Int -> NetworkConfigurationProperty -> ShowS
$cshow :: NetworkConfigurationProperty -> String
show :: NetworkConfigurationProperty -> String
$cshowList :: [NetworkConfigurationProperty] -> ShowS
showList :: [NetworkConfigurationProperty] -> ShowS
Prelude.Show)
mkNetworkConfigurationProperty :: NetworkConfigurationProperty
mkNetworkConfigurationProperty :: NetworkConfigurationProperty
mkNetworkConfigurationProperty
  = NetworkConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), securityGroupIds :: Maybe (ValueList Text)
securityGroupIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing,
       subnetIds :: Maybe (ValueList Text)
subnetIds = Maybe (ValueList Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NetworkConfigurationProperty where
  toResourceProperties :: NetworkConfigurationProperty -> ResourceProperties
toResourceProperties NetworkConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: NetworkConfigurationProperty -> ()
securityGroupIds :: NetworkConfigurationProperty -> Maybe (ValueList Text)
subnetIds :: NetworkConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MWAA::Environment.NetworkConfiguration",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         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 -> 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
"SecurityGroupIds" (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)
securityGroupIds,
                            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
"SubnetIds" (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)
subnetIds])}
instance JSON.ToJSON NetworkConfigurationProperty where
  toJSON :: NetworkConfigurationProperty -> Value
toJSON NetworkConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: NetworkConfigurationProperty -> ()
securityGroupIds :: NetworkConfigurationProperty -> Maybe (ValueList Text)
subnetIds :: NetworkConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
..}
    = [(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 -> 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
"SecurityGroupIds" (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)
securityGroupIds,
               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
"SubnetIds" (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)
subnetIds]))
instance Property "SecurityGroupIds" NetworkConfigurationProperty where
  type PropertyType "SecurityGroupIds" NetworkConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "SecurityGroupIds" NetworkConfigurationProperty
-> NetworkConfigurationProperty -> NetworkConfigurationProperty
set PropertyType "SecurityGroupIds" NetworkConfigurationProperty
newValue NetworkConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: NetworkConfigurationProperty -> ()
securityGroupIds :: NetworkConfigurationProperty -> Maybe (ValueList Text)
subnetIds :: NetworkConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
..}
    = NetworkConfigurationProperty
        {securityGroupIds :: Maybe (ValueList Text)
securityGroupIds = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SecurityGroupIds" NetworkConfigurationProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
subnetIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
subnetIds :: Maybe (ValueList Text)
..}
instance Property "SubnetIds" NetworkConfigurationProperty where
  type PropertyType "SubnetIds" NetworkConfigurationProperty = ValueList Prelude.Text
  set :: PropertyType "SubnetIds" NetworkConfigurationProperty
-> NetworkConfigurationProperty -> NetworkConfigurationProperty
set PropertyType "SubnetIds" NetworkConfigurationProperty
newValue NetworkConfigurationProperty {Maybe (ValueList Text)
()
haddock_workaround_ :: NetworkConfigurationProperty -> ()
securityGroupIds :: NetworkConfigurationProperty -> Maybe (ValueList Text)
subnetIds :: NetworkConfigurationProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
..}
    = NetworkConfigurationProperty
        {subnetIds :: Maybe (ValueList Text)
subnetIds = ValueList Text -> Maybe (ValueList Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SubnetIds" NetworkConfigurationProperty
ValueList Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
..}