module Stratosphere.ApiGatewayV2.Integration.ResponseParameterProperty (
ResponseParameterProperty(..), mkResponseParameterProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data ResponseParameterProperty
=
ResponseParameterProperty {ResponseParameterProperty -> ()
haddock_workaround_ :: (),
ResponseParameterProperty -> Maybe (Value Text)
destination :: (Prelude.Maybe (Value Prelude.Text)),
ResponseParameterProperty -> Maybe (Value Text)
source :: (Prelude.Maybe (Value Prelude.Text))}
deriving stock (ResponseParameterProperty -> ResponseParameterProperty -> Bool
(ResponseParameterProperty -> ResponseParameterProperty -> Bool)
-> (ResponseParameterProperty -> ResponseParameterProperty -> Bool)
-> Eq ResponseParameterProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ResponseParameterProperty -> ResponseParameterProperty -> Bool
== :: ResponseParameterProperty -> ResponseParameterProperty -> Bool
$c/= :: ResponseParameterProperty -> ResponseParameterProperty -> Bool
/= :: ResponseParameterProperty -> ResponseParameterProperty -> Bool
Prelude.Eq, Int -> ResponseParameterProperty -> ShowS
[ResponseParameterProperty] -> ShowS
ResponseParameterProperty -> String
(Int -> ResponseParameterProperty -> ShowS)
-> (ResponseParameterProperty -> String)
-> ([ResponseParameterProperty] -> ShowS)
-> Show ResponseParameterProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> ResponseParameterProperty -> ShowS
showsPrec :: Int -> ResponseParameterProperty -> ShowS
$cshow :: ResponseParameterProperty -> String
show :: ResponseParameterProperty -> String
$cshowList :: [ResponseParameterProperty] -> ShowS
showList :: [ResponseParameterProperty] -> ShowS
Prelude.Show)
mkResponseParameterProperty :: ResponseParameterProperty
mkResponseParameterProperty :: ResponseParameterProperty
mkResponseParameterProperty
= ResponseParameterProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), destination :: Maybe (Value Text)
destination = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing,
source :: Maybe (Value Text)
source = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties ResponseParameterProperty where
toResourceProperties :: ResponseParameterProperty -> ResourceProperties
toResourceProperties ResponseParameterProperty {Maybe (Value Text)
()
haddock_workaround_ :: ResponseParameterProperty -> ()
destination :: ResponseParameterProperty -> Maybe (Value Text)
source :: ResponseParameterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destination :: Maybe (Value Text)
source :: Maybe (Value Text)
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGatewayV2::Integration.ResponseParameter",
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
"Destination" (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)
destination,
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
"Source" (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)
source])}
instance JSON.ToJSON ResponseParameterProperty where
toJSON :: ResponseParameterProperty -> Value
toJSON ResponseParameterProperty {Maybe (Value Text)
()
haddock_workaround_ :: ResponseParameterProperty -> ()
destination :: ResponseParameterProperty -> Maybe (Value Text)
source :: ResponseParameterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destination :: Maybe (Value Text)
source :: 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 -> 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
"Destination" (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)
destination,
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
"Source" (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)
source]))
instance Property "Destination" ResponseParameterProperty where
type PropertyType "Destination" ResponseParameterProperty = Value Prelude.Text
set :: PropertyType "Destination" ResponseParameterProperty
-> ResponseParameterProperty -> ResponseParameterProperty
set PropertyType "Destination" ResponseParameterProperty
newValue ResponseParameterProperty {Maybe (Value Text)
()
haddock_workaround_ :: ResponseParameterProperty -> ()
destination :: ResponseParameterProperty -> Maybe (Value Text)
source :: ResponseParameterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destination :: Maybe (Value Text)
source :: Maybe (Value Text)
..}
= ResponseParameterProperty
{destination :: Maybe (Value Text)
destination = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Destination" ResponseParameterProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
source :: Maybe (Value Text)
haddock_workaround_ :: ()
source :: Maybe (Value Text)
..}
instance Property "Source" ResponseParameterProperty where
type PropertyType "Source" ResponseParameterProperty = Value Prelude.Text
set :: PropertyType "Source" ResponseParameterProperty
-> ResponseParameterProperty -> ResponseParameterProperty
set PropertyType "Source" ResponseParameterProperty
newValue ResponseParameterProperty {Maybe (Value Text)
()
haddock_workaround_ :: ResponseParameterProperty -> ()
destination :: ResponseParameterProperty -> Maybe (Value Text)
source :: ResponseParameterProperty -> Maybe (Value Text)
haddock_workaround_ :: ()
destination :: Maybe (Value Text)
source :: Maybe (Value Text)
..}
= ResponseParameterProperty {source :: Maybe (Value Text)
source = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "Source" ResponseParameterProperty
Value Text
newValue, Maybe (Value Text)
()
haddock_workaround_ :: ()
destination :: Maybe (Value Text)
haddock_workaround_ :: ()
destination :: Maybe (Value Text)
..}