module Stratosphere.ApiGateway.GatewayResponse (
        GatewayResponse(..), mkGatewayResponse
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data GatewayResponse
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html>
    GatewayResponse {GatewayResponse -> ()
haddock_workaround_ :: (),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html#cfn-apigateway-gatewayresponse-responseparameters>
                     GatewayResponse -> Maybe (Map Text (Value Text))
responseParameters :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html#cfn-apigateway-gatewayresponse-responsetemplates>
                     GatewayResponse -> Maybe (Map Text (Value Text))
responseTemplates :: (Prelude.Maybe (Prelude.Map Prelude.Text (Value Prelude.Text))),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html#cfn-apigateway-gatewayresponse-responsetype>
                     GatewayResponse -> Value Text
responseType :: (Value Prelude.Text),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html#cfn-apigateway-gatewayresponse-restapiid>
                     GatewayResponse -> Value Text
restApiId :: (Value Prelude.Text),
                     -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-gatewayresponse.html#cfn-apigateway-gatewayresponse-statuscode>
                     GatewayResponse -> Maybe (Value Text)
statusCode :: (Prelude.Maybe (Value Prelude.Text))}
  deriving stock (GatewayResponse -> GatewayResponse -> Bool
(GatewayResponse -> GatewayResponse -> Bool)
-> (GatewayResponse -> GatewayResponse -> Bool)
-> Eq GatewayResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GatewayResponse -> GatewayResponse -> Bool
== :: GatewayResponse -> GatewayResponse -> Bool
$c/= :: GatewayResponse -> GatewayResponse -> Bool
/= :: GatewayResponse -> GatewayResponse -> Bool
Prelude.Eq, Int -> GatewayResponse -> ShowS
[GatewayResponse] -> ShowS
GatewayResponse -> String
(Int -> GatewayResponse -> ShowS)
-> (GatewayResponse -> String)
-> ([GatewayResponse] -> ShowS)
-> Show GatewayResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GatewayResponse -> ShowS
showsPrec :: Int -> GatewayResponse -> ShowS
$cshow :: GatewayResponse -> String
show :: GatewayResponse -> String
$cshowList :: [GatewayResponse] -> ShowS
showList :: [GatewayResponse] -> ShowS
Prelude.Show)
mkGatewayResponse ::
  Value Prelude.Text -> Value Prelude.Text -> GatewayResponse
mkGatewayResponse :: Value Text -> Value Text -> GatewayResponse
mkGatewayResponse Value Text
responseType Value Text
restApiId
  = GatewayResponse
      {haddock_workaround_ :: ()
haddock_workaround_ = (), responseType :: Value Text
responseType = Value Text
responseType,
       restApiId :: Value Text
restApiId = Value Text
restApiId, responseParameters :: Maybe (Map Text (Value Text))
responseParameters = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing,
       responseTemplates :: Maybe (Map Text (Value Text))
responseTemplates = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing, statusCode :: Maybe (Value Text)
statusCode = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties GatewayResponse where
  toResourceProperties :: GatewayResponse -> ResourceProperties
toResourceProperties GatewayResponse {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GatewayResponse -> ()
responseParameters :: GatewayResponse -> Maybe (Map Text (Value Text))
responseTemplates :: GatewayResponse -> Maybe (Map Text (Value Text))
responseType :: GatewayResponse -> Value Text
restApiId :: GatewayResponse -> Value Text
statusCode :: GatewayResponse -> Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApiGateway::GatewayResponse",
         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
"ResponseType" 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
responseType,
                            Key
"RestApiId" 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
restApiId]
                           ([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
"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,
                               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
"ResponseTemplates" (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))
responseTemplates,
                               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
"StatusCode" (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)
statusCode]))}
instance JSON.ToJSON GatewayResponse where
  toJSON :: GatewayResponse -> Value
toJSON GatewayResponse {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GatewayResponse -> ()
responseParameters :: GatewayResponse -> Maybe (Map Text (Value Text))
responseTemplates :: GatewayResponse -> Maybe (Map Text (Value Text))
responseType :: GatewayResponse -> Value Text
restApiId :: GatewayResponse -> Value Text
statusCode :: GatewayResponse -> Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: 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
"ResponseType" 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
responseType,
               Key
"RestApiId" 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
restApiId]
              ([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
"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,
                  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
"ResponseTemplates" (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))
responseTemplates,
                  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
"StatusCode" (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)
statusCode])))
instance Property "ResponseParameters" GatewayResponse where
  type PropertyType "ResponseParameters" GatewayResponse = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "ResponseParameters" GatewayResponse
-> GatewayResponse -> GatewayResponse
set PropertyType "ResponseParameters" GatewayResponse
newValue GatewayResponse {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GatewayResponse -> ()
responseParameters :: GatewayResponse -> Maybe (Map Text (Value Text))
responseTemplates :: GatewayResponse -> Maybe (Map Text (Value Text))
responseType :: GatewayResponse -> Value Text
restApiId :: GatewayResponse -> Value Text
statusCode :: GatewayResponse -> Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
..}
    = GatewayResponse {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" GatewayResponse
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
haddock_workaround_ :: ()
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
..}
instance Property "ResponseTemplates" GatewayResponse where
  type PropertyType "ResponseTemplates" GatewayResponse = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "ResponseTemplates" GatewayResponse
-> GatewayResponse -> GatewayResponse
set PropertyType "ResponseTemplates" GatewayResponse
newValue GatewayResponse {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GatewayResponse -> ()
responseParameters :: GatewayResponse -> Maybe (Map Text (Value Text))
responseTemplates :: GatewayResponse -> Maybe (Map Text (Value Text))
responseType :: GatewayResponse -> Value Text
restApiId :: GatewayResponse -> Value Text
statusCode :: GatewayResponse -> Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
..}
    = GatewayResponse {responseTemplates :: Maybe (Map Text (Value Text))
responseTemplates = 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 "ResponseTemplates" GatewayResponse
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
..}
instance Property "ResponseType" GatewayResponse where
  type PropertyType "ResponseType" GatewayResponse = Value Prelude.Text
  set :: PropertyType "ResponseType" GatewayResponse
-> GatewayResponse -> GatewayResponse
set PropertyType "ResponseType" GatewayResponse
newValue GatewayResponse {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GatewayResponse -> ()
responseParameters :: GatewayResponse -> Maybe (Map Text (Value Text))
responseTemplates :: GatewayResponse -> Maybe (Map Text (Value Text))
responseType :: GatewayResponse -> Value Text
restApiId :: GatewayResponse -> Value Text
statusCode :: GatewayResponse -> Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
..}
    = GatewayResponse {responseType :: Value Text
responseType = PropertyType "ResponseType" GatewayResponse
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
restApiId :: Value Text
statusCode :: Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
restApiId :: Value Text
statusCode :: Maybe (Value Text)
..}
instance Property "RestApiId" GatewayResponse where
  type PropertyType "RestApiId" GatewayResponse = Value Prelude.Text
  set :: PropertyType "RestApiId" GatewayResponse
-> GatewayResponse -> GatewayResponse
set PropertyType "RestApiId" GatewayResponse
newValue GatewayResponse {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GatewayResponse -> ()
responseParameters :: GatewayResponse -> Maybe (Map Text (Value Text))
responseTemplates :: GatewayResponse -> Maybe (Map Text (Value Text))
responseType :: GatewayResponse -> Value Text
restApiId :: GatewayResponse -> Value Text
statusCode :: GatewayResponse -> Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
..}
    = GatewayResponse {restApiId :: Value Text
restApiId = PropertyType "RestApiId" GatewayResponse
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
statusCode :: Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
statusCode :: Maybe (Value Text)
..}
instance Property "StatusCode" GatewayResponse where
  type PropertyType "StatusCode" GatewayResponse = Value Prelude.Text
  set :: PropertyType "StatusCode" GatewayResponse
-> GatewayResponse -> GatewayResponse
set PropertyType "StatusCode" GatewayResponse
newValue GatewayResponse {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: GatewayResponse -> ()
responseParameters :: GatewayResponse -> Maybe (Map Text (Value Text))
responseTemplates :: GatewayResponse -> Maybe (Map Text (Value Text))
responseType :: GatewayResponse -> Value Text
restApiId :: GatewayResponse -> Value Text
statusCode :: GatewayResponse -> Maybe (Value Text)
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
statusCode :: Maybe (Value Text)
..}
    = GatewayResponse {statusCode :: Maybe (Value Text)
statusCode = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "StatusCode" GatewayResponse
Value Text
newValue, Maybe (Map Text (Value Text))
()
Value Text
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
responseType :: Value Text
restApiId :: Value Text
..}