module Stratosphere.MediaConnect.Gateway (
        module Exports, Gateway(..), mkGateway
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.MediaConnect.Gateway.GatewayNetworkProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data Gateway
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-gateway.html>
    Gateway {Gateway -> ()
haddock_workaround_ :: (),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-gateway.html#cfn-mediaconnect-gateway-egresscidrblocks>
             Gateway -> ValueList Text
egressCidrBlocks :: (ValueList Prelude.Text),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-gateway.html#cfn-mediaconnect-gateway-name>
             Gateway -> Value Text
name :: (Value Prelude.Text),
             -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mediaconnect-gateway.html#cfn-mediaconnect-gateway-networks>
             Gateway -> [GatewayNetworkProperty]
networks :: [GatewayNetworkProperty]}
  deriving stock (Gateway -> Gateway -> Bool
(Gateway -> Gateway -> Bool)
-> (Gateway -> Gateway -> Bool) -> Eq Gateway
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Gateway -> Gateway -> Bool
== :: Gateway -> Gateway -> Bool
$c/= :: Gateway -> Gateway -> Bool
/= :: Gateway -> Gateway -> Bool
Prelude.Eq, Int -> Gateway -> ShowS
[Gateway] -> ShowS
Gateway -> String
(Int -> Gateway -> ShowS)
-> (Gateway -> String) -> ([Gateway] -> ShowS) -> Show Gateway
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> Gateway -> ShowS
showsPrec :: Int -> Gateway -> ShowS
$cshow :: Gateway -> String
show :: Gateway -> String
$cshowList :: [Gateway] -> ShowS
showList :: [Gateway] -> ShowS
Prelude.Show)
mkGateway ::
  ValueList Prelude.Text
  -> Value Prelude.Text -> [GatewayNetworkProperty] -> Gateway
mkGateway :: ValueList Text -> Value Text -> [GatewayNetworkProperty] -> Gateway
mkGateway ValueList Text
egressCidrBlocks Value Text
name [GatewayNetworkProperty]
networks
  = Gateway
      {haddock_workaround_ :: ()
haddock_workaround_ = (), egressCidrBlocks :: ValueList Text
egressCidrBlocks = ValueList Text
egressCidrBlocks,
       name :: Value Text
name = Value Text
name, networks :: [GatewayNetworkProperty]
networks = [GatewayNetworkProperty]
networks}
instance ToResourceProperties Gateway where
  toResourceProperties :: Gateway -> ResourceProperties
toResourceProperties Gateway {[GatewayNetworkProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Gateway -> ()
egressCidrBlocks :: Gateway -> ValueList Text
name :: Gateway -> Value Text
networks :: Gateway -> [GatewayNetworkProperty]
haddock_workaround_ :: ()
egressCidrBlocks :: ValueList Text
name :: Value Text
networks :: [GatewayNetworkProperty]
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::MediaConnect::Gateway",
         supportsTags :: Bool
supportsTags = Bool
Prelude.False,
         properties :: Object
properties = [Key
"EgressCidrBlocks" 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..= ValueList Text
egressCidrBlocks,
                       Key
"Name" 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
name, Key
"Networks" Key -> [GatewayNetworkProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [GatewayNetworkProperty]
networks]}
instance JSON.ToJSON Gateway where
  toJSON :: Gateway -> Value
toJSON Gateway {[GatewayNetworkProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Gateway -> ()
egressCidrBlocks :: Gateway -> ValueList Text
name :: Gateway -> Value Text
networks :: Gateway -> [GatewayNetworkProperty]
haddock_workaround_ :: ()
egressCidrBlocks :: ValueList Text
name :: Value Text
networks :: [GatewayNetworkProperty]
..}
    = [(Key, Value)] -> Value
JSON.object
        [Key
"EgressCidrBlocks" 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..= ValueList Text
egressCidrBlocks, Key
"Name" 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
name,
         Key
"Networks" Key -> [GatewayNetworkProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [GatewayNetworkProperty]
networks]
instance Property "EgressCidrBlocks" Gateway where
  type PropertyType "EgressCidrBlocks" Gateway = ValueList Prelude.Text
  set :: PropertyType "EgressCidrBlocks" Gateway -> Gateway -> Gateway
set PropertyType "EgressCidrBlocks" Gateway
newValue Gateway {[GatewayNetworkProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Gateway -> ()
egressCidrBlocks :: Gateway -> ValueList Text
name :: Gateway -> Value Text
networks :: Gateway -> [GatewayNetworkProperty]
haddock_workaround_ :: ()
egressCidrBlocks :: ValueList Text
name :: Value Text
networks :: [GatewayNetworkProperty]
..}
    = Gateway {egressCidrBlocks :: ValueList Text
egressCidrBlocks = PropertyType "EgressCidrBlocks" Gateway
ValueList Text
newValue, [GatewayNetworkProperty]
()
Value Text
haddock_workaround_ :: ()
name :: Value Text
networks :: [GatewayNetworkProperty]
haddock_workaround_ :: ()
name :: Value Text
networks :: [GatewayNetworkProperty]
..}
instance Property "Name" Gateway where
  type PropertyType "Name" Gateway = Value Prelude.Text
  set :: PropertyType "Name" Gateway -> Gateway -> Gateway
set PropertyType "Name" Gateway
newValue Gateway {[GatewayNetworkProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Gateway -> ()
egressCidrBlocks :: Gateway -> ValueList Text
name :: Gateway -> Value Text
networks :: Gateway -> [GatewayNetworkProperty]
haddock_workaround_ :: ()
egressCidrBlocks :: ValueList Text
name :: Value Text
networks :: [GatewayNetworkProperty]
..} = Gateway {name :: Value Text
name = PropertyType "Name" Gateway
Value Text
newValue, [GatewayNetworkProperty]
()
ValueList Text
haddock_workaround_ :: ()
egressCidrBlocks :: ValueList Text
networks :: [GatewayNetworkProperty]
haddock_workaround_ :: ()
egressCidrBlocks :: ValueList Text
networks :: [GatewayNetworkProperty]
..}
instance Property "Networks" Gateway where
  type PropertyType "Networks" Gateway = [GatewayNetworkProperty]
  set :: PropertyType "Networks" Gateway -> Gateway -> Gateway
set PropertyType "Networks" Gateway
newValue Gateway {[GatewayNetworkProperty]
()
ValueList Text
Value Text
haddock_workaround_ :: Gateway -> ()
egressCidrBlocks :: Gateway -> ValueList Text
name :: Gateway -> Value Text
networks :: Gateway -> [GatewayNetworkProperty]
haddock_workaround_ :: ()
egressCidrBlocks :: ValueList Text
name :: Value Text
networks :: [GatewayNetworkProperty]
..} = Gateway {networks :: [GatewayNetworkProperty]
networks = [GatewayNetworkProperty]
PropertyType "Networks" Gateway
newValue, ()
ValueList Text
Value Text
haddock_workaround_ :: ()
egressCidrBlocks :: ValueList Text
name :: Value Text
haddock_workaround_ :: ()
egressCidrBlocks :: ValueList Text
name :: Value Text
..}