module Stratosphere.PCS.Cluster.NetworkingProperty (
        NetworkingProperty(..), mkNetworkingProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NetworkingProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-cluster-networking.html>
    NetworkingProperty {NetworkingProperty -> ()
haddock_workaround_ :: (),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-cluster-networking.html#cfn-pcs-cluster-networking-networktype>
                        NetworkingProperty -> Maybe (Value Text)
networkType :: (Prelude.Maybe (Value Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-cluster-networking.html#cfn-pcs-cluster-networking-securitygroupids>
                        NetworkingProperty -> Maybe (ValueList Text)
securityGroupIds :: (Prelude.Maybe (ValueList Prelude.Text)),
                        -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pcs-cluster-networking.html#cfn-pcs-cluster-networking-subnetids>
                        NetworkingProperty -> Maybe (ValueList Text)
subnetIds :: (Prelude.Maybe (ValueList Prelude.Text))}
  deriving stock (NetworkingProperty -> NetworkingProperty -> Bool
(NetworkingProperty -> NetworkingProperty -> Bool)
-> (NetworkingProperty -> NetworkingProperty -> Bool)
-> Eq NetworkingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NetworkingProperty -> NetworkingProperty -> Bool
== :: NetworkingProperty -> NetworkingProperty -> Bool
$c/= :: NetworkingProperty -> NetworkingProperty -> Bool
/= :: NetworkingProperty -> NetworkingProperty -> Bool
Prelude.Eq, Int -> NetworkingProperty -> ShowS
[NetworkingProperty] -> ShowS
NetworkingProperty -> String
(Int -> NetworkingProperty -> ShowS)
-> (NetworkingProperty -> String)
-> ([NetworkingProperty] -> ShowS)
-> Show NetworkingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NetworkingProperty -> ShowS
showsPrec :: Int -> NetworkingProperty -> ShowS
$cshow :: NetworkingProperty -> String
show :: NetworkingProperty -> String
$cshowList :: [NetworkingProperty] -> ShowS
showList :: [NetworkingProperty] -> ShowS
Prelude.Show)
mkNetworkingProperty :: NetworkingProperty
mkNetworkingProperty :: NetworkingProperty
mkNetworkingProperty
  = NetworkingProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), networkType :: Maybe (Value Text)
networkType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
       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 NetworkingProperty where
  toResourceProperties :: NetworkingProperty -> ResourceProperties
toResourceProperties NetworkingProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: NetworkingProperty -> ()
networkType :: NetworkingProperty -> Maybe (Value Text)
securityGroupIds :: NetworkingProperty -> Maybe (ValueList Text)
subnetIds :: NetworkingProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
networkType :: Maybe (Value Text)
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::PCS::Cluster.Networking",
         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 -> 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
"NetworkType" (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)
networkType,
                            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 NetworkingProperty where
  toJSON :: NetworkingProperty -> Value
toJSON NetworkingProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: NetworkingProperty -> ()
networkType :: NetworkingProperty -> Maybe (Value Text)
securityGroupIds :: NetworkingProperty -> Maybe (ValueList Text)
subnetIds :: NetworkingProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
networkType :: Maybe (Value Text)
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 -> 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
"NetworkType" (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)
networkType,
               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 "NetworkType" NetworkingProperty where
  type PropertyType "NetworkType" NetworkingProperty = Value Prelude.Text
  set :: PropertyType "NetworkType" NetworkingProperty
-> NetworkingProperty -> NetworkingProperty
set PropertyType "NetworkType" NetworkingProperty
newValue NetworkingProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: NetworkingProperty -> ()
networkType :: NetworkingProperty -> Maybe (Value Text)
securityGroupIds :: NetworkingProperty -> Maybe (ValueList Text)
subnetIds :: NetworkingProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
networkType :: Maybe (Value Text)
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
..}
    = NetworkingProperty {networkType :: Maybe (Value Text)
networkType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "NetworkType" NetworkingProperty
Value Text
newValue, Maybe (ValueList Text)
()
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
..}
instance Property "SecurityGroupIds" NetworkingProperty where
  type PropertyType "SecurityGroupIds" NetworkingProperty = ValueList Prelude.Text
  set :: PropertyType "SecurityGroupIds" NetworkingProperty
-> NetworkingProperty -> NetworkingProperty
set PropertyType "SecurityGroupIds" NetworkingProperty
newValue NetworkingProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: NetworkingProperty -> ()
networkType :: NetworkingProperty -> Maybe (Value Text)
securityGroupIds :: NetworkingProperty -> Maybe (ValueList Text)
subnetIds :: NetworkingProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
networkType :: Maybe (Value Text)
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
..}
    = NetworkingProperty {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" NetworkingProperty
ValueList Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
networkType :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
networkType :: Maybe (Value Text)
subnetIds :: Maybe (ValueList Text)
..}
instance Property "SubnetIds" NetworkingProperty where
  type PropertyType "SubnetIds" NetworkingProperty = ValueList Prelude.Text
  set :: PropertyType "SubnetIds" NetworkingProperty
-> NetworkingProperty -> NetworkingProperty
set PropertyType "SubnetIds" NetworkingProperty
newValue NetworkingProperty {Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: NetworkingProperty -> ()
networkType :: NetworkingProperty -> Maybe (Value Text)
securityGroupIds :: NetworkingProperty -> Maybe (ValueList Text)
subnetIds :: NetworkingProperty -> Maybe (ValueList Text)
haddock_workaround_ :: ()
networkType :: Maybe (Value Text)
securityGroupIds :: Maybe (ValueList Text)
subnetIds :: Maybe (ValueList Text)
..}
    = NetworkingProperty {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" NetworkingProperty
ValueList Text
newValue, Maybe (ValueList Text)
Maybe (Value Text)
()
haddock_workaround_ :: ()
networkType :: Maybe (Value Text)
securityGroupIds :: Maybe (ValueList Text)
haddock_workaround_ :: ()
networkType :: Maybe (Value Text)
securityGroupIds :: Maybe (ValueList Text)
..}