module Stratosphere.AppRunner.Service.EgressConfigurationProperty (
        EgressConfigurationProperty(..), mkEgressConfigurationProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data EgressConfigurationProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-egressconfiguration.html>
    EgressConfigurationProperty {EgressConfigurationProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-egressconfiguration.html#cfn-apprunner-service-egressconfiguration-egresstype>
                                 EgressConfigurationProperty -> Value Text
egressType :: (Value Prelude.Text),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-service-egressconfiguration.html#cfn-apprunner-service-egressconfiguration-vpcconnectorarn>
                                 EgressConfigurationProperty -> Maybe (Value Text)
vpcConnectorArn :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (EgressConfigurationProperty -> EgressConfigurationProperty -> Bool
(EgressConfigurationProperty
 -> EgressConfigurationProperty -> Bool)
-> (EgressConfigurationProperty
    -> EgressConfigurationProperty -> Bool)
-> Eq EgressConfigurationProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: EgressConfigurationProperty -> EgressConfigurationProperty -> Bool
== :: EgressConfigurationProperty -> EgressConfigurationProperty -> Bool
$c/= :: EgressConfigurationProperty -> EgressConfigurationProperty -> Bool
/= :: EgressConfigurationProperty -> EgressConfigurationProperty -> Bool
Prelude.Eq, Int -> EgressConfigurationProperty -> ShowS
[EgressConfigurationProperty] -> ShowS
EgressConfigurationProperty -> String
(Int -> EgressConfigurationProperty -> ShowS)
-> (EgressConfigurationProperty -> String)
-> ([EgressConfigurationProperty] -> ShowS)
-> Show EgressConfigurationProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> EgressConfigurationProperty -> ShowS
showsPrec :: Int -> EgressConfigurationProperty -> ShowS
$cshow :: EgressConfigurationProperty -> String
show :: EgressConfigurationProperty -> String
$cshowList :: [EgressConfigurationProperty] -> ShowS
showList :: [EgressConfigurationProperty] -> ShowS
Prelude.Show)
mkEgressConfigurationProperty ::
  Value Prelude.Text -> EgressConfigurationProperty
mkEgressConfigurationProperty :: Value Text -> EgressConfigurationProperty
mkEgressConfigurationProperty Value Text
egressType
  = EgressConfigurationProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), egressType :: Value Text
egressType = Value Text
egressType,
       vpcConnectorArn :: Maybe (Value Text)
vpcConnectorArn = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties EgressConfigurationProperty where
  toResourceProperties :: EgressConfigurationProperty -> ResourceProperties
toResourceProperties EgressConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EgressConfigurationProperty -> ()
egressType :: EgressConfigurationProperty -> Value Text
vpcConnectorArn :: EgressConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
egressType :: Value Text
vpcConnectorArn :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppRunner::Service.EgressConfiguration",
         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
"EgressType" 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
egressType]
                           ([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
"VpcConnectorArn" (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)
vpcConnectorArn]))}
instance JSON.ToJSON EgressConfigurationProperty where
  toJSON :: EgressConfigurationProperty -> Value
toJSON EgressConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EgressConfigurationProperty -> ()
egressType :: EgressConfigurationProperty -> Value Text
vpcConnectorArn :: EgressConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
egressType :: Value Text
vpcConnectorArn :: Maybe (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
"EgressType" 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
egressType]
              ([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
"VpcConnectorArn" (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)
vpcConnectorArn])))
instance Property "EgressType" EgressConfigurationProperty where
  type PropertyType "EgressType" EgressConfigurationProperty = Value Prelude.Text
  set :: PropertyType "EgressType" EgressConfigurationProperty
-> EgressConfigurationProperty -> EgressConfigurationProperty
set PropertyType "EgressType" EgressConfigurationProperty
newValue EgressConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EgressConfigurationProperty -> ()
egressType :: EgressConfigurationProperty -> Value Text
vpcConnectorArn :: EgressConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
egressType :: Value Text
vpcConnectorArn :: Maybe (Value Text)
..}
    = EgressConfigurationProperty {egressType :: Value Text
egressType = PropertyType "EgressType" EgressConfigurationProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
vpcConnectorArn :: Maybe (Value Text)
haddock_workaround_ :: ()
vpcConnectorArn :: Maybe (Value Text)
..}
instance Property "VpcConnectorArn" EgressConfigurationProperty where
  type PropertyType "VpcConnectorArn" EgressConfigurationProperty = Value Prelude.Text
  set :: PropertyType "VpcConnectorArn" EgressConfigurationProperty
-> EgressConfigurationProperty -> EgressConfigurationProperty
set PropertyType "VpcConnectorArn" EgressConfigurationProperty
newValue EgressConfigurationProperty {Maybe (Value Text)
()
Value Text
haddock_workaround_ :: EgressConfigurationProperty -> ()
egressType :: EgressConfigurationProperty -> Value Text
vpcConnectorArn :: EgressConfigurationProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
egressType :: Value Text
vpcConnectorArn :: Maybe (Value Text)
..}
    = EgressConfigurationProperty
        {vpcConnectorArn :: Maybe (Value Text)
vpcConnectorArn = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "VpcConnectorArn" EgressConfigurationProperty
Value Text
newValue, ()
Value Text
haddock_workaround_ :: ()
egressType :: Value Text
haddock_workaround_ :: ()
egressType :: Value Text
..}