module Stratosphere.ApiGateway.Method.MethodResponseProperty (
MethodResponseProperty(..), mkMethodResponseProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data MethodResponseProperty
=
MethodResponseProperty {MethodResponseProperty -> ()
haddock_workaround_ :: (),
MethodResponseProperty -> Maybe (Map Text (Value Text))
responseModels :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
MethodResponseProperty -> Maybe (Map Text (Value Text))
responseParameters :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
MethodResponseProperty -> Value Text
statusCode :: (Value Prelude.Text)}
deriving stock (MethodResponseProperty -> MethodResponseProperty -> Bool
(MethodResponseProperty -> MethodResponseProperty -> Bool)
-> (MethodResponseProperty -> MethodResponseProperty -> Bool)
-> Eq MethodResponseProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: MethodResponseProperty -> MethodResponseProperty -> Bool
== :: MethodResponseProperty -> MethodResponseProperty -> Bool
$c/= :: MethodResponseProperty -> MethodResponseProperty -> Bool
/= :: MethodResponseProperty -> MethodResponseProperty -> Bool
Prelude.Eq, Int -> MethodResponseProperty -> ShowS
[MethodResponseProperty] -> ShowS
MethodResponseProperty -> String
(Int -> MethodResponseProperty -> ShowS)
-> (MethodResponseProperty -> String)
-> ([MethodResponseProperty] -> ShowS)
-> Show MethodResponseProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> MethodResponseProperty -> ShowS
showsPrec :: Int -> MethodResponseProperty -> ShowS
$cshow :: MethodResponseProperty -> String
show :: MethodResponseProperty -> String
$cshowList :: [MethodResponseProperty] -> ShowS
showList :: [MethodResponseProperty] -> ShowS
Prelude.Show)
mkMethodResponseProperty ::
Value Prelude.Text -> MethodResponseProperty
mkMethodResponseProperty :: Value Text -> MethodResponseProperty
mkMethodResponseProperty Value Text
statusCode
= MethodResponseProperty
{haddock_workaround_ :: ()
haddock_workaround_ = (), statusCode :: Value Text
statusCode = Value Text
statusCode,
responseModels :: Maybe (Map Text (Value Text))
responseModels = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing,
responseParameters :: Maybe (Map Text (Value Text))
responseParameters = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties MethodResponseProperty where
toResourceProperties :: MethodResponseProperty -> ResourceProperties
toResourceProperties MethodResponseProperty {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: MethodResponseProperty -> ()
responseModels :: MethodResponseProperty -> Maybe (Map Text (Value Text))
responseParameters :: MethodResponseProperty -> Maybe (Map Text (Value Text))
statusCode :: MethodResponseProperty -> Value Text
haddock_workaround_ :: ()
responseModels :: Maybe (Map Text (Value Text))
responseParameters :: Maybe (Map Text (Value Text))
statusCode :: Value Text
..}
= ResourceProperties
{awsType :: Text
awsType = Text
"AWS::ApiGateway::Method.MethodResponse",
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
"StatusCode" 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
statusCode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Map Text (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
"ResponseModels" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
responseModels,
Key -> Map Text (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
"ResponseParameters" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
responseParameters]))}
instance JSON.ToJSON MethodResponseProperty where
toJSON :: MethodResponseProperty -> Value
toJSON MethodResponseProperty {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: MethodResponseProperty -> ()
responseModels :: MethodResponseProperty -> Maybe (Map Text (Value Text))
responseParameters :: MethodResponseProperty -> Maybe (Map Text (Value Text))
statusCode :: MethodResponseProperty -> Value Text
haddock_workaround_ :: ()
responseModels :: Maybe (Map Text (Value Text))
responseParameters :: Maybe (Map Text (Value Text))
statusCode :: 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
"StatusCode" 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
statusCode]
([Maybe (Key, Value)] -> [(Key, Value)]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[Key -> Map Text (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
"ResponseModels" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
responseModels,
Key -> Map Text (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
"ResponseParameters" (Map Text (Value Text) -> (Key, Value))
-> Maybe (Map Text (Value Text)) -> Maybe (Key, Value)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Map Text (Value Text))
responseParameters])))
instance Property "ResponseModels" MethodResponseProperty where
type PropertyType "ResponseModels" MethodResponseProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "ResponseModels" MethodResponseProperty
-> MethodResponseProperty -> MethodResponseProperty
set PropertyType "ResponseModels" MethodResponseProperty
newValue MethodResponseProperty {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: MethodResponseProperty -> ()
responseModels :: MethodResponseProperty -> Maybe (Map Text (Value Text))
responseParameters :: MethodResponseProperty -> Maybe (Map Text (Value Text))
statusCode :: MethodResponseProperty -> Value Text
haddock_workaround_ :: ()
responseModels :: Maybe (Map Text (Value Text))
responseParameters :: Maybe (Map Text (Value Text))
statusCode :: Value Text
..}
= MethodResponseProperty
{responseModels :: Maybe (Map Text (Value Text))
responseModels = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "ResponseModels" MethodResponseProperty
newValue, Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
statusCode :: Value Text
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
statusCode :: Value Text
..}
instance Property "ResponseParameters" MethodResponseProperty where
type PropertyType "ResponseParameters" MethodResponseProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
set :: PropertyType "ResponseParameters" MethodResponseProperty
-> MethodResponseProperty -> MethodResponseProperty
set PropertyType "ResponseParameters" MethodResponseProperty
newValue MethodResponseProperty {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: MethodResponseProperty -> ()
responseModels :: MethodResponseProperty -> Maybe (Map Text (Value Text))
responseParameters :: MethodResponseProperty -> Maybe (Map Text (Value Text))
statusCode :: MethodResponseProperty -> Value Text
haddock_workaround_ :: ()
responseModels :: Maybe (Map Text (Value Text))
responseParameters :: Maybe (Map Text (Value Text))
statusCode :: Value Text
..}
= MethodResponseProperty
{responseParameters :: Maybe (Map Text (Value Text))
responseParameters = Map Text (Value Text) -> Maybe (Map Text (Value Text))
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure Map Text (Value Text)
PropertyType "ResponseParameters" MethodResponseProperty
newValue, Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: ()
responseModels :: Maybe (Map Text (Value Text))
statusCode :: Value Text
haddock_workaround_ :: ()
responseModels :: Maybe (Map Text (Value Text))
statusCode :: Value Text
..}
instance Property "StatusCode" MethodResponseProperty where
type PropertyType "StatusCode" MethodResponseProperty = Value Prelude.Text
set :: PropertyType "StatusCode" MethodResponseProperty
-> MethodResponseProperty -> MethodResponseProperty
set PropertyType "StatusCode" MethodResponseProperty
newValue MethodResponseProperty {Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: MethodResponseProperty -> ()
responseModels :: MethodResponseProperty -> Maybe (Map Text (Value Text))
responseParameters :: MethodResponseProperty -> Maybe (Map Text (Value Text))
statusCode :: MethodResponseProperty -> Value Text
haddock_workaround_ :: ()
responseModels :: Maybe (Map Text (Value Text))
responseParameters :: Maybe (Map Text (Value Text))
statusCode :: Value Text
..}
= MethodResponseProperty {statusCode :: Value Text
statusCode = PropertyType "StatusCode" MethodResponseProperty
Value Text
newValue, Maybe (Map Text (Value Text))
()
haddock_workaround_ :: ()
responseModels :: Maybe (Map Text (Value Text))
responseParameters :: Maybe (Map Text (Value Text))
haddock_workaround_ :: ()
responseModels :: Maybe (Map Text (Value Text))
responseParameters :: Maybe (Map Text (Value Text))
..}