module Stratosphere.IoTWireless.WirelessDevice.FPortsProperty (
        module Exports, FPortsProperty(..), mkFPortsProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.IoTWireless.WirelessDevice.ApplicationProperty as Exports
import Stratosphere.ResourceProperties
data FPortsProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotwireless-wirelessdevice-fports.html>
    FPortsProperty {FPortsProperty -> ()
haddock_workaround_ :: (),
                    -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotwireless-wirelessdevice-fports.html#cfn-iotwireless-wirelessdevice-fports-applications>
                    FPortsProperty -> Maybe [ApplicationProperty]
applications :: (Prelude.Maybe [ApplicationProperty])}
  deriving stock (FPortsProperty -> FPortsProperty -> Bool
(FPortsProperty -> FPortsProperty -> Bool)
-> (FPortsProperty -> FPortsProperty -> Bool) -> Eq FPortsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: FPortsProperty -> FPortsProperty -> Bool
== :: FPortsProperty -> FPortsProperty -> Bool
$c/= :: FPortsProperty -> FPortsProperty -> Bool
/= :: FPortsProperty -> FPortsProperty -> Bool
Prelude.Eq, Int -> FPortsProperty -> ShowS
[FPortsProperty] -> ShowS
FPortsProperty -> String
(Int -> FPortsProperty -> ShowS)
-> (FPortsProperty -> String)
-> ([FPortsProperty] -> ShowS)
-> Show FPortsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> FPortsProperty -> ShowS
showsPrec :: Int -> FPortsProperty -> ShowS
$cshow :: FPortsProperty -> String
show :: FPortsProperty -> String
$cshowList :: [FPortsProperty] -> ShowS
showList :: [FPortsProperty] -> ShowS
Prelude.Show)
mkFPortsProperty :: FPortsProperty
mkFPortsProperty :: FPortsProperty
mkFPortsProperty
  = FPortsProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), applications :: Maybe [ApplicationProperty]
applications = Maybe [ApplicationProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties FPortsProperty where
  toResourceProperties :: FPortsProperty -> ResourceProperties
toResourceProperties FPortsProperty {Maybe [ApplicationProperty]
()
haddock_workaround_ :: FPortsProperty -> ()
applications :: FPortsProperty -> Maybe [ApplicationProperty]
haddock_workaround_ :: ()
applications :: Maybe [ApplicationProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::IoTWireless::WirelessDevice.FPorts",
         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 -> [ApplicationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Applications" ([ApplicationProperty] -> (Key, Value))
-> Maybe [ApplicationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ApplicationProperty]
applications])}
instance JSON.ToJSON FPortsProperty where
  toJSON :: FPortsProperty -> Value
toJSON FPortsProperty {Maybe [ApplicationProperty]
()
haddock_workaround_ :: FPortsProperty -> ()
applications :: FPortsProperty -> Maybe [ApplicationProperty]
haddock_workaround_ :: ()
applications :: Maybe [ApplicationProperty]
..}
    = [(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 -> [ApplicationProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Applications" ([ApplicationProperty] -> (Key, Value))
-> Maybe [ApplicationProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ApplicationProperty]
applications]))
instance Property "Applications" FPortsProperty where
  type PropertyType "Applications" FPortsProperty = [ApplicationProperty]
  set :: PropertyType "Applications" FPortsProperty
-> FPortsProperty -> FPortsProperty
set PropertyType "Applications" FPortsProperty
newValue FPortsProperty {Maybe [ApplicationProperty]
()
haddock_workaround_ :: FPortsProperty -> ()
applications :: FPortsProperty -> Maybe [ApplicationProperty]
haddock_workaround_ :: ()
applications :: Maybe [ApplicationProperty]
..}
    = FPortsProperty {applications :: Maybe [ApplicationProperty]
applications = [ApplicationProperty] -> Maybe [ApplicationProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [ApplicationProperty]
PropertyType "Applications" FPortsProperty
newValue, ()
haddock_workaround_ :: ()
haddock_workaround_ :: ()
..}