module Stratosphere.MediaLive.Cluster.ClusterNetworkSettingsProperty (
module Exports, ClusterNetworkSettingsProperty(..),
mkClusterNetworkSettingsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaLive.Cluster.InterfaceMappingProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ClusterNetworkSettingsProperty
=
ClusterNetworkSettingsProperty {ClusterNetworkSettingsProperty -> ()
haddock_workaround_ :: (),
ClusterNetworkSettingsProperty -> Maybe (Value Text)
defaultRoute :: (Prelude.Maybe (Value Prelude.Text)),
ClusterNetworkSettingsProperty -> Maybe [InterfaceMappingProperty]
interfaceMappings :: (Prelude.Maybe [InterfaceMappingProperty])}
deriving stock (ClusterNetworkSettingsProperty
-> ClusterNetworkSettingsProperty -> Bool
(ClusterNetworkSettingsProperty
-> ClusterNetworkSettingsProperty -> Bool)
-> (ClusterNetworkSettingsProperty
-> ClusterNetworkSettingsProperty -> Bool)
-> Eq ClusterNetworkSettingsProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ClusterNetworkSettingsProperty
-> ClusterNetworkSettingsProperty -> Bool
== :: ClusterNetworkSettingsProperty
-> ClusterNetworkSettingsProperty -> Bool
$c/= :: ClusterNetworkSettingsProperty
-> ClusterNetworkSettingsProperty -> Bool
/= :: ClusterNetworkSettingsProperty
-> ClusterNetworkSettingsProperty -> Bool
Prelude.Eq, Int -> ClusterNetworkSettingsProperty -> ShowS
[ClusterNetworkSettingsProperty] -> ShowS
ClusterNetworkSettingsProperty -> String
(Int -> ClusterNetworkSettingsProperty -> ShowS)
-> (ClusterNetworkSettingsProperty -> String)
-> ([ClusterNetworkSettingsProperty] -> ShowS)
-> Show ClusterNetworkSettingsProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ClusterNetworkSettingsProperty -> ShowS
showsPrec :: Int -> ClusterNetworkSettingsProperty -> ShowS
$cshow :: ClusterNetworkSettingsProperty -> String
show :: ClusterNetworkSettingsProperty -> String
$cshowList :: [ClusterNetworkSettingsProperty] -> ShowS
showList :: [ClusterNetworkSettingsProperty] -> ShowS
Prelude.Show)
mkClusterNetworkSettingsProperty :: ClusterNetworkSettingsProperty
mkClusterNetworkSettingsProperty :: ClusterNetworkSettingsProperty
mkClusterNetworkSettingsProperty
= ClusterNetworkSettingsProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), defaultRoute :: Maybe (Value Text)
defaultRoute = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
interfaceMappings :: Maybe [InterfaceMappingProperty]
interfaceMappings = Maybe [InterfaceMappingProperty]
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ClusterNetworkSettingsProperty where
toResourceProperties :: ClusterNetworkSettingsProperty -> ResourceProperties
toResourceProperties ClusterNetworkSettingsProperty {Maybe [InterfaceMappingProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ClusterNetworkSettingsProperty -> ()
defaultRoute :: ClusterNetworkSettingsProperty -> Maybe (Value Text)
interfaceMappings :: ClusterNetworkSettingsProperty -> Maybe [InterfaceMappingProperty]
haddock_workaround_ :: ()
defaultRoute :: Maybe (Value Text)
interfaceMappings :: Maybe [InterfaceMappingProperty]
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::MediaLive::Cluster.ClusterNetworkSettings",
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
"DefaultRoute" (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)
defaultRoute,
Key -> [InterfaceMappingProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InterfaceMappings" ([InterfaceMappingProperty] -> (Key, Value))
-> Maybe [InterfaceMappingProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InterfaceMappingProperty]
interfaceMappings])}
instance JSON.ToJSON ClusterNetworkSettingsProperty where
toJSON :: ClusterNetworkSettingsProperty -> Value
toJSON ClusterNetworkSettingsProperty {Maybe [InterfaceMappingProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ClusterNetworkSettingsProperty -> ()
defaultRoute :: ClusterNetworkSettingsProperty -> Maybe (Value Text)
interfaceMappings :: ClusterNetworkSettingsProperty -> Maybe [InterfaceMappingProperty]
haddock_workaround_ :: ()
defaultRoute :: Maybe (Value Text)
interfaceMappings :: Maybe [InterfaceMappingProperty]
..}
= [(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
"DefaultRoute" (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)
defaultRoute,
Key -> [InterfaceMappingProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"InterfaceMappings" ([InterfaceMappingProperty] -> (Key, Value))
-> Maybe [InterfaceMappingProperty] -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [InterfaceMappingProperty]
interfaceMappings]))
instance Property "DefaultRoute" ClusterNetworkSettingsProperty where
type PropertyType "DefaultRoute" ClusterNetworkSettingsProperty = Value Prelude.Text
set :: PropertyType "DefaultRoute" ClusterNetworkSettingsProperty
-> ClusterNetworkSettingsProperty -> ClusterNetworkSettingsProperty
set PropertyType "DefaultRoute" ClusterNetworkSettingsProperty
newValue ClusterNetworkSettingsProperty {Maybe [InterfaceMappingProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ClusterNetworkSettingsProperty -> ()
defaultRoute :: ClusterNetworkSettingsProperty -> Maybe (Value Text)
interfaceMappings :: ClusterNetworkSettingsProperty -> Maybe [InterfaceMappingProperty]
haddock_workaround_ :: ()
defaultRoute :: Maybe (Value Text)
interfaceMappings :: Maybe [InterfaceMappingProperty]
..}
= ClusterNetworkSettingsProperty
{defaultRoute :: Maybe (Value Text)
defaultRoute = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "DefaultRoute" ClusterNetworkSettingsProperty
Value Text
newValue, Maybe [InterfaceMappingProperty]
()
haddock_workaround_ :: ()
interfaceMappings :: Maybe [InterfaceMappingProperty]
haddock_workaround_ :: ()
interfaceMappings :: Maybe [InterfaceMappingProperty]
..}
instance Property "InterfaceMappings" ClusterNetworkSettingsProperty where
type PropertyType "InterfaceMappings" ClusterNetworkSettingsProperty = [InterfaceMappingProperty]
set :: PropertyType "InterfaceMappings" ClusterNetworkSettingsProperty
-> ClusterNetworkSettingsProperty -> ClusterNetworkSettingsProperty
set PropertyType "InterfaceMappings" ClusterNetworkSettingsProperty
newValue ClusterNetworkSettingsProperty {Maybe [InterfaceMappingProperty]
Maybe (Value Text)
()
haddock_workaround_ :: ClusterNetworkSettingsProperty -> ()
defaultRoute :: ClusterNetworkSettingsProperty -> Maybe (Value Text)
interfaceMappings :: ClusterNetworkSettingsProperty -> Maybe [InterfaceMappingProperty]
haddock_workaround_ :: ()
defaultRoute :: Maybe (Value Text)
interfaceMappings :: Maybe [InterfaceMappingProperty]
..}
= ClusterNetworkSettingsProperty
{interfaceMappings :: Maybe [InterfaceMappingProperty]
interfaceMappings = [InterfaceMappingProperty] -> Maybe [InterfaceMappingProperty]
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure [InterfaceMappingProperty]
PropertyType "InterfaceMappings" ClusterNetworkSettingsProperty
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
defaultRoute :: Maybe (Value Text)
haddock_workaround_ :: ()
defaultRoute :: Maybe (Value Text)
..}