module Stratosphere.AppRunner.Service.NetworkConfigurationProperty (
        module Exports, NetworkConfigurationProperty(..),
        mkNetworkConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppRunner.Service.EgressConfigurationProperty as Exports
import {-# SOURCE #-} Stratosphere.AppRunner.Service.IngressConfigurationProperty as Exports
import Stratosphere.ResourceProperties
import Stratosphere.Value
data NetworkConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-networkconfiguration.html>
    NetworkConfigurationProperty {NetworkConfigurationProperty -> ()
haddock_workaround_ :: (),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-networkconfiguration.html#cfn-apprunner-service-networkconfiguration-egressconfiguration>
                                  NetworkConfigurationProperty -> Maybe EgressConfigurationProperty
egressConfiguration :: (Prelude.Maybe EgressConfigurationProperty),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-networkconfiguration.html#cfn-apprunner-service-networkconfiguration-ingressconfiguration>
                                  NetworkConfigurationProperty -> Maybe IngressConfigurationProperty
ingressConfiguration :: (Prelude.Maybe IngressConfigurationProperty),
                                  -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-networkconfiguration.html#cfn-apprunner-service-networkconfiguration-ipaddresstype>
                                  NetworkConfigurationProperty -> Maybe (Value Text)
ipAddressType :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
(NetworkConfigurationProperty
 -> NetworkConfigurationProperty -> Bool)
-> (NetworkConfigurationProperty
    -> NetworkConfigurationProperty -> Bool)
-> Eq NetworkConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
== :: NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
$c/= :: NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
/= :: NetworkConfigurationProperty
-> NetworkConfigurationProperty -> Bool
Prelude.Eq, Int -> NetworkConfigurationProperty -> ShowS
[NetworkConfigurationProperty] -> ShowS
NetworkConfigurationProperty -> String
(Int -> NetworkConfigurationProperty -> ShowS)
-> (NetworkConfigurationProperty -> String)
-> ([NetworkConfigurationProperty] -> ShowS)
-> Show NetworkConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> NetworkConfigurationProperty -> ShowS
showsPrec :: Int -> NetworkConfigurationProperty -> ShowS
$cshow :: NetworkConfigurationProperty -> String
show :: NetworkConfigurationProperty -> String
$cshowList :: [NetworkConfigurationProperty] -> ShowS
showList :: [NetworkConfigurationProperty] -> ShowS
Prelude.Show)
mkNetworkConfigurationProperty :: NetworkConfigurationProperty
mkNetworkConfigurationProperty :: NetworkConfigurationProperty
mkNetworkConfigurationProperty
  = NetworkConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), egressConfiguration :: Maybe EgressConfigurationProperty
egressConfiguration = Maybe EgressConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       ingressConfiguration :: Maybe IngressConfigurationProperty
ingressConfiguration = Maybe IngressConfigurationProperty
forall a. Maybe a
Prelude.Nothing,
       ipAddressType :: Maybe (Value Text)
ipAddressType = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties NetworkConfigurationProperty where
  toResourceProperties :: NetworkConfigurationProperty -> ResourceProperties
toResourceProperties NetworkConfigurationProperty {Maybe (Value Text)
Maybe EgressConfigurationProperty
Maybe IngressConfigurationProperty
()
haddock_workaround_ :: NetworkConfigurationProperty -> ()
egressConfiguration :: NetworkConfigurationProperty -> Maybe EgressConfigurationProperty
ingressConfiguration :: NetworkConfigurationProperty -> Maybe IngressConfigurationProperty
ipAddressType :: NetworkConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
egressConfiguration :: Maybe EgressConfigurationProperty
ingressConfiguration :: Maybe IngressConfigurationProperty
ipAddressType :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppRunner::Service.NetworkConfiguration",
         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 -> EgressConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EgressConfiguration" (EgressConfigurationProperty -> (Key, Value))
-> Maybe EgressConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EgressConfigurationProperty
egressConfiguration,
                            Key -> IngressConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IngressConfiguration" (IngressConfigurationProperty -> (Key, Value))
-> Maybe IngressConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IngressConfigurationProperty
ingressConfiguration,
                            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 NetworkConfigurationProperty where
  toJSON :: NetworkConfigurationProperty -> Value
toJSON NetworkConfigurationProperty {Maybe (Value Text)
Maybe EgressConfigurationProperty
Maybe IngressConfigurationProperty
()
haddock_workaround_ :: NetworkConfigurationProperty -> ()
egressConfiguration :: NetworkConfigurationProperty -> Maybe EgressConfigurationProperty
ingressConfiguration :: NetworkConfigurationProperty -> Maybe IngressConfigurationProperty
ipAddressType :: NetworkConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
egressConfiguration :: Maybe EgressConfigurationProperty
ingressConfiguration :: Maybe IngressConfigurationProperty
ipAddressType :: Maybe (Value 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 -> EgressConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"EgressConfiguration" (EgressConfigurationProperty -> (Key, Value))
-> Maybe EgressConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EgressConfigurationProperty
egressConfiguration,
               Key -> IngressConfigurationProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"IngressConfiguration" (IngressConfigurationProperty -> (Key, Value))
-> Maybe IngressConfigurationProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IngressConfigurationProperty
ingressConfiguration,
               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 "EgressConfiguration" NetworkConfigurationProperty where
  type PropertyType "EgressConfiguration" NetworkConfigurationProperty = EgressConfigurationProperty
  set :: PropertyType "EgressConfiguration" NetworkConfigurationProperty
-> NetworkConfigurationProperty -> NetworkConfigurationProperty
set PropertyType "EgressConfiguration" NetworkConfigurationProperty
newValue NetworkConfigurationProperty {Maybe (Value Text)
Maybe EgressConfigurationProperty
Maybe IngressConfigurationProperty
()
haddock_workaround_ :: NetworkConfigurationProperty -> ()
egressConfiguration :: NetworkConfigurationProperty -> Maybe EgressConfigurationProperty
ingressConfiguration :: NetworkConfigurationProperty -> Maybe IngressConfigurationProperty
ipAddressType :: NetworkConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
egressConfiguration :: Maybe EgressConfigurationProperty
ingressConfiguration :: Maybe IngressConfigurationProperty
ipAddressType :: Maybe (Value Text)
..}
    = NetworkConfigurationProperty
        {egressConfiguration :: Maybe EgressConfigurationProperty
egressConfiguration = EgressConfigurationProperty -> Maybe EgressConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "EgressConfiguration" NetworkConfigurationProperty
EgressConfigurationProperty
newValue, Maybe (Value Text)
Maybe IngressConfigurationProperty
()
haddock_workaround_ :: ()
ingressConfiguration :: Maybe IngressConfigurationProperty
ipAddressType :: Maybe (Value Text)
haddock_workaround_ :: ()
ingressConfiguration :: Maybe IngressConfigurationProperty
ipAddressType :: Maybe (Value Text)
..}
instance Property "IngressConfiguration" NetworkConfigurationProperty where
  type PropertyType "IngressConfiguration" NetworkConfigurationProperty = IngressConfigurationProperty
  set :: PropertyType "IngressConfiguration" NetworkConfigurationProperty
-> NetworkConfigurationProperty -> NetworkConfigurationProperty
set PropertyType "IngressConfiguration" NetworkConfigurationProperty
newValue NetworkConfigurationProperty {Maybe (Value Text)
Maybe EgressConfigurationProperty
Maybe IngressConfigurationProperty
()
haddock_workaround_ :: NetworkConfigurationProperty -> ()
egressConfiguration :: NetworkConfigurationProperty -> Maybe EgressConfigurationProperty
ingressConfiguration :: NetworkConfigurationProperty -> Maybe IngressConfigurationProperty
ipAddressType :: NetworkConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
egressConfiguration :: Maybe EgressConfigurationProperty
ingressConfiguration :: Maybe IngressConfigurationProperty
ipAddressType :: Maybe (Value Text)
..}
    = NetworkConfigurationProperty
        {ingressConfiguration :: Maybe IngressConfigurationProperty
ingressConfiguration = IngressConfigurationProperty -> Maybe IngressConfigurationProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "IngressConfiguration" NetworkConfigurationProperty
IngressConfigurationProperty
newValue, Maybe (Value Text)
Maybe EgressConfigurationProperty
()
haddock_workaround_ :: ()
egressConfiguration :: Maybe EgressConfigurationProperty
ipAddressType :: Maybe (Value Text)
haddock_workaround_ :: ()
egressConfiguration :: Maybe EgressConfigurationProperty
ipAddressType :: Maybe (Value Text)
..}
instance Property "IpAddressType" NetworkConfigurationProperty where
  type PropertyType "IpAddressType" NetworkConfigurationProperty = Value Prelude.Text
  set :: PropertyType "IpAddressType" NetworkConfigurationProperty
-> NetworkConfigurationProperty -> NetworkConfigurationProperty
set PropertyType "IpAddressType" NetworkConfigurationProperty
newValue NetworkConfigurationProperty {Maybe (Value Text)
Maybe EgressConfigurationProperty
Maybe IngressConfigurationProperty
()
haddock_workaround_ :: NetworkConfigurationProperty -> ()
egressConfiguration :: NetworkConfigurationProperty -> Maybe EgressConfigurationProperty
ingressConfiguration :: NetworkConfigurationProperty -> Maybe IngressConfigurationProperty
ipAddressType :: NetworkConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
egressConfiguration :: Maybe EgressConfigurationProperty
ingressConfiguration :: Maybe IngressConfigurationProperty
ipAddressType :: Maybe (Value Text)
..}
    = NetworkConfigurationProperty
        {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" NetworkConfigurationProperty
Value Text
newValue, Maybe EgressConfigurationProperty
Maybe IngressConfigurationProperty
()
haddock_workaround_ :: ()
egressConfiguration :: Maybe EgressConfigurationProperty
ingressConfiguration :: Maybe IngressConfigurationProperty
haddock_workaround_ :: ()
egressConfiguration :: Maybe EgressConfigurationProperty
ingressConfiguration :: Maybe IngressConfigurationProperty
..}