module Stratosphere.AppMesh.VirtualGateway.VirtualGatewaySpecProperty (
        module Exports, VirtualGatewaySpecProperty(..),
        mkVirtualGatewaySpecProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.AppMesh.VirtualGateway.VirtualGatewayBackendDefaultsProperty as Exports
import {-# SOURCE #-} Stratosphere.AppMesh.VirtualGateway.VirtualGatewayListenerProperty as Exports
import {-# SOURCE #-} Stratosphere.AppMesh.VirtualGateway.VirtualGatewayLoggingProperty as Exports
import Stratosphere.ResourceProperties
data VirtualGatewaySpecProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayspec.html>
    VirtualGatewaySpecProperty {VirtualGatewaySpecProperty -> ()
haddock_workaround_ :: (),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayspec.html#cfn-appmesh-virtualgateway-virtualgatewayspec-backenddefaults>
                                VirtualGatewaySpecProperty
-> Maybe VirtualGatewayBackendDefaultsProperty
backendDefaults :: (Prelude.Maybe VirtualGatewayBackendDefaultsProperty),
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayspec.html#cfn-appmesh-virtualgateway-virtualgatewayspec-listeners>
                                VirtualGatewaySpecProperty -> [VirtualGatewayListenerProperty]
listeners :: [VirtualGatewayListenerProperty],
                                -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-virtualgateway-virtualgatewayspec.html#cfn-appmesh-virtualgateway-virtualgatewayspec-logging>
                                VirtualGatewaySpecProperty -> Maybe VirtualGatewayLoggingProperty
logging :: (Prelude.Maybe VirtualGatewayLoggingProperty)}
  deriving stock (VirtualGatewaySpecProperty -> VirtualGatewaySpecProperty -> Bool
(VirtualGatewaySpecProperty -> VirtualGatewaySpecProperty -> Bool)
-> (VirtualGatewaySpecProperty
    -> VirtualGatewaySpecProperty -> Bool)
-> Eq VirtualGatewaySpecProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: VirtualGatewaySpecProperty -> VirtualGatewaySpecProperty -> Bool
== :: VirtualGatewaySpecProperty -> VirtualGatewaySpecProperty -> Bool
$c/= :: VirtualGatewaySpecProperty -> VirtualGatewaySpecProperty -> Bool
/= :: VirtualGatewaySpecProperty -> VirtualGatewaySpecProperty -> Bool
Prelude.Eq, Int -> VirtualGatewaySpecProperty -> ShowS
[VirtualGatewaySpecProperty] -> ShowS
VirtualGatewaySpecProperty -> String
(Int -> VirtualGatewaySpecProperty -> ShowS)
-> (VirtualGatewaySpecProperty -> String)
-> ([VirtualGatewaySpecProperty] -> ShowS)
-> Show VirtualGatewaySpecProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> VirtualGatewaySpecProperty -> ShowS
showsPrec :: Int -> VirtualGatewaySpecProperty -> ShowS
$cshow :: VirtualGatewaySpecProperty -> String
show :: VirtualGatewaySpecProperty -> String
$cshowList :: [VirtualGatewaySpecProperty] -> ShowS
showList :: [VirtualGatewaySpecProperty] -> ShowS
Prelude.Show)
mkVirtualGatewaySpecProperty ::
  [VirtualGatewayListenerProperty] -> VirtualGatewaySpecProperty
mkVirtualGatewaySpecProperty :: [VirtualGatewayListenerProperty] -> VirtualGatewaySpecProperty
mkVirtualGatewaySpecProperty [VirtualGatewayListenerProperty]
listeners
  = VirtualGatewaySpecProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), listeners :: [VirtualGatewayListenerProperty]
listeners = [VirtualGatewayListenerProperty]
listeners,
       backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
backendDefaults = Maybe VirtualGatewayBackendDefaultsProperty
forall a. Maybe a
Prelude.Nothing, logging :: Maybe VirtualGatewayLoggingProperty
logging = Maybe VirtualGatewayLoggingProperty
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties VirtualGatewaySpecProperty where
  toResourceProperties :: VirtualGatewaySpecProperty -> ResourceProperties
toResourceProperties VirtualGatewaySpecProperty {[VirtualGatewayListenerProperty]
Maybe VirtualGatewayLoggingProperty
Maybe VirtualGatewayBackendDefaultsProperty
()
haddock_workaround_ :: VirtualGatewaySpecProperty -> ()
backendDefaults :: VirtualGatewaySpecProperty
-> Maybe VirtualGatewayBackendDefaultsProperty
listeners :: VirtualGatewaySpecProperty -> [VirtualGatewayListenerProperty]
logging :: VirtualGatewaySpecProperty -> Maybe VirtualGatewayLoggingProperty
haddock_workaround_ :: ()
backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
listeners :: [VirtualGatewayListenerProperty]
logging :: Maybe VirtualGatewayLoggingProperty
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::AppMesh::VirtualGateway.VirtualGatewaySpec",
         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
"Listeners" Key -> [VirtualGatewayListenerProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [VirtualGatewayListenerProperty]
listeners]
                           ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                              [Key -> VirtualGatewayBackendDefaultsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BackendDefaults" (VirtualGatewayBackendDefaultsProperty -> (Key, Value))
-> Maybe VirtualGatewayBackendDefaultsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VirtualGatewayBackendDefaultsProperty
backendDefaults,
                               Key -> VirtualGatewayLoggingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Logging" (VirtualGatewayLoggingProperty -> (Key, Value))
-> Maybe VirtualGatewayLoggingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VirtualGatewayLoggingProperty
logging]))}
instance JSON.ToJSON VirtualGatewaySpecProperty where
  toJSON :: VirtualGatewaySpecProperty -> Value
toJSON VirtualGatewaySpecProperty {[VirtualGatewayListenerProperty]
Maybe VirtualGatewayLoggingProperty
Maybe VirtualGatewayBackendDefaultsProperty
()
haddock_workaround_ :: VirtualGatewaySpecProperty -> ()
backendDefaults :: VirtualGatewaySpecProperty
-> Maybe VirtualGatewayBackendDefaultsProperty
listeners :: VirtualGatewaySpecProperty -> [VirtualGatewayListenerProperty]
logging :: VirtualGatewaySpecProperty -> Maybe VirtualGatewayLoggingProperty
haddock_workaround_ :: ()
backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
listeners :: [VirtualGatewayListenerProperty]
logging :: Maybe VirtualGatewayLoggingProperty
..}
    = [(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
"Listeners" Key -> [VirtualGatewayListenerProperty] -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
JSON..= [VirtualGatewayListenerProperty]
listeners]
              ([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
                 [Key -> VirtualGatewayBackendDefaultsProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"BackendDefaults" (VirtualGatewayBackendDefaultsProperty -> (Key, Value))
-> Maybe VirtualGatewayBackendDefaultsProperty
-> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VirtualGatewayBackendDefaultsProperty
backendDefaults,
                  Key -> VirtualGatewayLoggingProperty -> (Key, Value)
forall v. ToJSON v => Key -> v -> (Key, Value)
forall e kv v. (KeyValue e kv, ToJSON v) => Key -> v -> kv
(JSON..=) Key
"Logging" (VirtualGatewayLoggingProperty -> (Key, Value))
-> Maybe VirtualGatewayLoggingProperty -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VirtualGatewayLoggingProperty
logging])))
instance Property "BackendDefaults" VirtualGatewaySpecProperty where
  type PropertyType "BackendDefaults" VirtualGatewaySpecProperty = VirtualGatewayBackendDefaultsProperty
  set :: PropertyType "BackendDefaults" VirtualGatewaySpecProperty
-> VirtualGatewaySpecProperty -> VirtualGatewaySpecProperty
set PropertyType "BackendDefaults" VirtualGatewaySpecProperty
newValue VirtualGatewaySpecProperty {[VirtualGatewayListenerProperty]
Maybe VirtualGatewayLoggingProperty
Maybe VirtualGatewayBackendDefaultsProperty
()
haddock_workaround_ :: VirtualGatewaySpecProperty -> ()
backendDefaults :: VirtualGatewaySpecProperty
-> Maybe VirtualGatewayBackendDefaultsProperty
listeners :: VirtualGatewaySpecProperty -> [VirtualGatewayListenerProperty]
logging :: VirtualGatewaySpecProperty -> Maybe VirtualGatewayLoggingProperty
haddock_workaround_ :: ()
backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
listeners :: [VirtualGatewayListenerProperty]
logging :: Maybe VirtualGatewayLoggingProperty
..}
    = VirtualGatewaySpecProperty
        {backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
backendDefaults = VirtualGatewayBackendDefaultsProperty
-> Maybe VirtualGatewayBackendDefaultsProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "BackendDefaults" VirtualGatewaySpecProperty
VirtualGatewayBackendDefaultsProperty
newValue, [VirtualGatewayListenerProperty]
Maybe VirtualGatewayLoggingProperty
()
haddock_workaround_ :: ()
listeners :: [VirtualGatewayListenerProperty]
logging :: Maybe VirtualGatewayLoggingProperty
haddock_workaround_ :: ()
listeners :: [VirtualGatewayListenerProperty]
logging :: Maybe VirtualGatewayLoggingProperty
..}
instance Property "Listeners" VirtualGatewaySpecProperty where
  type PropertyType "Listeners" VirtualGatewaySpecProperty = [VirtualGatewayListenerProperty]
  set :: PropertyType "Listeners" VirtualGatewaySpecProperty
-> VirtualGatewaySpecProperty -> VirtualGatewaySpecProperty
set PropertyType "Listeners" VirtualGatewaySpecProperty
newValue VirtualGatewaySpecProperty {[VirtualGatewayListenerProperty]
Maybe VirtualGatewayLoggingProperty
Maybe VirtualGatewayBackendDefaultsProperty
()
haddock_workaround_ :: VirtualGatewaySpecProperty -> ()
backendDefaults :: VirtualGatewaySpecProperty
-> Maybe VirtualGatewayBackendDefaultsProperty
listeners :: VirtualGatewaySpecProperty -> [VirtualGatewayListenerProperty]
logging :: VirtualGatewaySpecProperty -> Maybe VirtualGatewayLoggingProperty
haddock_workaround_ :: ()
backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
listeners :: [VirtualGatewayListenerProperty]
logging :: Maybe VirtualGatewayLoggingProperty
..}
    = VirtualGatewaySpecProperty {listeners :: [VirtualGatewayListenerProperty]
listeners = [VirtualGatewayListenerProperty]
PropertyType "Listeners" VirtualGatewaySpecProperty
newValue, Maybe VirtualGatewayLoggingProperty
Maybe VirtualGatewayBackendDefaultsProperty
()
haddock_workaround_ :: ()
backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
logging :: Maybe VirtualGatewayLoggingProperty
haddock_workaround_ :: ()
backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
logging :: Maybe VirtualGatewayLoggingProperty
..}
instance Property "Logging" VirtualGatewaySpecProperty where
  type PropertyType "Logging" VirtualGatewaySpecProperty = VirtualGatewayLoggingProperty
  set :: PropertyType "Logging" VirtualGatewaySpecProperty
-> VirtualGatewaySpecProperty -> VirtualGatewaySpecProperty
set PropertyType "Logging" VirtualGatewaySpecProperty
newValue VirtualGatewaySpecProperty {[VirtualGatewayListenerProperty]
Maybe VirtualGatewayLoggingProperty
Maybe VirtualGatewayBackendDefaultsProperty
()
haddock_workaround_ :: VirtualGatewaySpecProperty -> ()
backendDefaults :: VirtualGatewaySpecProperty
-> Maybe VirtualGatewayBackendDefaultsProperty
listeners :: VirtualGatewaySpecProperty -> [VirtualGatewayListenerProperty]
logging :: VirtualGatewaySpecProperty -> Maybe VirtualGatewayLoggingProperty
haddock_workaround_ :: ()
backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
listeners :: [VirtualGatewayListenerProperty]
logging :: Maybe VirtualGatewayLoggingProperty
..}
    = VirtualGatewaySpecProperty {logging :: Maybe VirtualGatewayLoggingProperty
logging = VirtualGatewayLoggingProperty
-> Maybe VirtualGatewayLoggingProperty
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Logging" VirtualGatewaySpecProperty
VirtualGatewayLoggingProperty
newValue, [VirtualGatewayListenerProperty]
Maybe VirtualGatewayBackendDefaultsProperty
()
haddock_workaround_ :: ()
backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
listeners :: [VirtualGatewayListenerProperty]
haddock_workaround_ :: ()
backendDefaults :: Maybe VirtualGatewayBackendDefaultsProperty
listeners :: [VirtualGatewayListenerProperty]
..}