module Stratosphere.NetworkFirewall.Firewall.SubnetMappingProperty (
        SubnetMappingProperty(..), mkSubnetMappingProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data SubnetMappingProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-subnetmapping.html>
    SubnetMappingProperty {SubnetMappingProperty -> ()
haddock_workaround_ :: (),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-subnetmapping.html#cfn-networkfirewall-firewall-subnetmapping-ipaddresstype>
                           SubnetMappingProperty -> Maybe (Value Text)
iPAddressType :: (Prelude.Maybe (Value Prelude.Text)),
                           -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-networkfirewall-firewall-subnetmapping.html#cfn-networkfirewall-firewall-subnetmapping-subnetid>
                           SubnetMappingProperty -> Value Text
subnetId :: (Value Prelude.Text)}
  deriving stock (SubnetMappingProperty -> SubnetMappingProperty -> Bool
(SubnetMappingProperty -> SubnetMappingProperty -> Bool)
-> (SubnetMappingProperty -> SubnetMappingProperty -> Bool)
-> Eq SubnetMappingProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: SubnetMappingProperty -> SubnetMappingProperty -> Bool
== :: SubnetMappingProperty -> SubnetMappingProperty -> Bool
$c/= :: SubnetMappingProperty -> SubnetMappingProperty -> Bool
/= :: SubnetMappingProperty -> SubnetMappingProperty -> Bool
Prelude.Eq, Int -> SubnetMappingProperty -> ShowS
[SubnetMappingProperty] -> ShowS
SubnetMappingProperty -> String
(Int -> SubnetMappingProperty -> ShowS)
-> (SubnetMappingProperty -> String)
-> ([SubnetMappingProperty] -> ShowS)
-> Show SubnetMappingProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> SubnetMappingProperty -> ShowS
showsPrec :: Int -> SubnetMappingProperty -> ShowS
$cshow :: SubnetMappingProperty -> String
show :: SubnetMappingProperty -> String
$cshowList :: [SubnetMappingProperty] -> ShowS
showList :: [SubnetMappingProperty] -> ShowS
Prelude.Show)
mkSubnetMappingProperty ::
  Value Prelude.Text -> SubnetMappingProperty
mkSubnetMappingProperty :: Value Text -> SubnetMappingProperty
mkSubnetMappingProperty Value Text
subnetId
  = SubnetMappingProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), subnetId :: Value Text
subnetId = Value Text
subnetId,
       iPAddressType :: Maybe (Value Text)
iPAddressType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties SubnetMappingProperty where
  toResourceProperties :: SubnetMappingProperty -> ResourceProperties
toResourceProperties SubnetMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SubnetMappingProperty -> ()
iPAddressType :: SubnetMappingProperty -> Maybe (Value Text)
subnetId :: SubnetMappingProperty -> Value Text
haddock_workaround_ :: ()
iPAddressType :: Maybe (Value Text)
subnetId :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::NetworkFirewall::Firewall.SubnetMapping",
         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
"SubnetId" 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
subnetId]
                           ([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
"IPAddressType" (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)
iPAddressType]))}
instance JSON.ToJSON SubnetMappingProperty where
  toJSON :: SubnetMappingProperty -> Value
toJSON SubnetMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SubnetMappingProperty -> ()
iPAddressType :: SubnetMappingProperty -> Maybe (Value Text)
subnetId :: SubnetMappingProperty -> Value Text
haddock_workaround_ :: ()
iPAddressType :: Maybe (Value Text)
subnetId :: 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
"SubnetId" 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
subnetId]
              ([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
"IPAddressType" (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)
iPAddressType])))
instance Property "IPAddressType" SubnetMappingProperty where
  type PropertyType "IPAddressType" SubnetMappingProperty = Value Prelude.Text
  set :: PropertyType "IPAddressType" SubnetMappingProperty
-> SubnetMappingProperty -> SubnetMappingProperty
set PropertyType "IPAddressType" SubnetMappingProperty
newValue SubnetMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SubnetMappingProperty -> ()
iPAddressType :: SubnetMappingProperty -> Maybe (Value Text)
subnetId :: SubnetMappingProperty -> Value Text
haddock_workaround_ :: ()
iPAddressType :: Maybe (Value Text)
subnetId :: Value Text
..}
    = SubnetMappingProperty {iPAddressType :: Maybe (Value Text)
iPAddressType = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IPAddressType" SubnetMappingProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
subnetId :: Value Text
haddock_workaround_ :: ()
subnetId :: Value Text
..}
instance Property "SubnetId" SubnetMappingProperty where
  type PropertyType "SubnetId" SubnetMappingProperty = Value Prelude.Text
  set :: PropertyType "SubnetId" SubnetMappingProperty
-> SubnetMappingProperty -> SubnetMappingProperty
set PropertyType "SubnetId" SubnetMappingProperty
newValue SubnetMappingProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: SubnetMappingProperty -> ()
iPAddressType :: SubnetMappingProperty -> Maybe (Value Text)
subnetId :: SubnetMappingProperty -> Value Text
haddock_workaround_ :: ()
iPAddressType :: Maybe (Value Text)
subnetId :: Value Text
..}
    = SubnetMappingProperty {subnetId :: Value Text
subnetId = PropertyType "SubnetId" SubnetMappingProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
iPAddressType :: Maybe (Value Text)
haddock_workaround_ :: ()
iPAddressType :: Maybe (Value Text)
..}