module Stratosphere.ApiGateway.Method.IntegrationResponseProperty (
        IntegrationResponseProperty(..), mkIntegrationResponseProperty
    ) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data IntegrationResponseProperty
  = -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-method-integrationresponse.html>
    IntegrationResponseProperty {IntegrationResponseProperty -> ()
haddock_workaround_ :: (),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-method-integrationresponse.html#cfn-apigateway-method-integrationresponse-contenthandling>
                                 IntegrationResponseProperty -> Maybe (Value Text)
contentHandling :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-method-integrationresponse.html#cfn-apigateway-method-integrationresponse-responseparameters>
                                 IntegrationResponseProperty -> 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-properties-apigateway-method-integrationresponse.html#cfn-apigateway-method-integrationresponse-responsetemplates>
                                 IntegrationResponseProperty -> 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-properties-apigateway-method-integrationresponse.html#cfn-apigateway-method-integrationresponse-selectionpattern>
                                 IntegrationResponseProperty -> Maybe (Value Text)
selectionPattern :: (Prelude.Maybe (Value Prelude.Text)),
                                 -- | See: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-method-integrationresponse.html#cfn-apigateway-method-integrationresponse-statuscode>
                                 IntegrationResponseProperty -> Value Text
statusCode :: (Value Prelude.Text)}
  deriving stock (IntegrationResponseProperty -> IntegrationResponseProperty -> Bool
(IntegrationResponseProperty
 -> IntegrationResponseProperty -> Bool)
-> (IntegrationResponseProperty
    -> IntegrationResponseProperty -> Bool)
-> Eq IntegrationResponseProperty
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: IntegrationResponseProperty -> IntegrationResponseProperty -> Bool
== :: IntegrationResponseProperty -> IntegrationResponseProperty -> Bool
$c/= :: IntegrationResponseProperty -> IntegrationResponseProperty -> Bool
/= :: IntegrationResponseProperty -> IntegrationResponseProperty -> Bool
Prelude.Eq, Int -> IntegrationResponseProperty -> ShowS
[IntegrationResponseProperty] -> ShowS
IntegrationResponseProperty -> String
(Int -> IntegrationResponseProperty -> ShowS)
-> (IntegrationResponseProperty -> String)
-> ([IntegrationResponseProperty] -> ShowS)
-> Show IntegrationResponseProperty
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> IntegrationResponseProperty -> ShowS
showsPrec :: Int -> IntegrationResponseProperty -> ShowS
$cshow :: IntegrationResponseProperty -> String
show :: IntegrationResponseProperty -> String
$cshowList :: [IntegrationResponseProperty] -> ShowS
showList :: [IntegrationResponseProperty] -> ShowS
Prelude.Show)
mkIntegrationResponseProperty ::
  Value Prelude.Text -> IntegrationResponseProperty
mkIntegrationResponseProperty :: Value Text -> IntegrationResponseProperty
mkIntegrationResponseProperty Value Text
statusCode
  = IntegrationResponseProperty
      {haddock_workaround_ :: ()
haddock_workaround_ = (), statusCode :: Value Text
statusCode = Value Text
statusCode,
       contentHandling :: Maybe (Value Text)
contentHandling = Maybe (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,
       responseTemplates :: Maybe (Map Text (Value Text))
responseTemplates = Maybe (Map Text (Value Text))
forall a. Maybe a
Prelude.Nothing,
       selectionPattern :: Maybe (Value Text)
selectionPattern = Maybe (Value Text)
forall a. Maybe a
Prelude.Nothing}
instance ToResourceProperties IntegrationResponseProperty where
  toResourceProperties :: IntegrationResponseProperty -> ResourceProperties
toResourceProperties IntegrationResponseProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IntegrationResponseProperty -> ()
contentHandling :: IntegrationResponseProperty -> Maybe (Value Text)
responseParameters :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
responseTemplates :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
selectionPattern :: IntegrationResponseProperty -> Maybe (Value Text)
statusCode :: IntegrationResponseProperty -> Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
..}
    = ResourceProperties
        {awsType :: Text
awsType = Text
"AWS::ApiGateway::Method.IntegrationResponse",
         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 -> 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
"ContentHandling" (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)
contentHandling,
                               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
"SelectionPattern" (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)
selectionPattern]))}
instance JSON.ToJSON IntegrationResponseProperty where
  toJSON :: IntegrationResponseProperty -> Value
toJSON IntegrationResponseProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IntegrationResponseProperty -> ()
contentHandling :: IntegrationResponseProperty -> Maybe (Value Text)
responseParameters :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
responseTemplates :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
selectionPattern :: IntegrationResponseProperty -> Maybe (Value Text)
statusCode :: IntegrationResponseProperty -> Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (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 -> 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
"ContentHandling" (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)
contentHandling,
                  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
"SelectionPattern" (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)
selectionPattern])))
instance Property "ContentHandling" IntegrationResponseProperty where
  type PropertyType "ContentHandling" IntegrationResponseProperty = Value Prelude.Text
  set :: PropertyType "ContentHandling" IntegrationResponseProperty
-> IntegrationResponseProperty -> IntegrationResponseProperty
set PropertyType "ContentHandling" IntegrationResponseProperty
newValue IntegrationResponseProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IntegrationResponseProperty -> ()
contentHandling :: IntegrationResponseProperty -> Maybe (Value Text)
responseParameters :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
responseTemplates :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
selectionPattern :: IntegrationResponseProperty -> Maybe (Value Text)
statusCode :: IntegrationResponseProperty -> Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
..}
    = IntegrationResponseProperty
        {contentHandling :: Maybe (Value Text)
contentHandling = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "ContentHandling" IntegrationResponseProperty
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))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
haddock_workaround_ :: ()
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
..}
instance Property "ResponseParameters" IntegrationResponseProperty where
  type PropertyType "ResponseParameters" IntegrationResponseProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "ResponseParameters" IntegrationResponseProperty
-> IntegrationResponseProperty -> IntegrationResponseProperty
set PropertyType "ResponseParameters" IntegrationResponseProperty
newValue IntegrationResponseProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IntegrationResponseProperty -> ()
contentHandling :: IntegrationResponseProperty -> Maybe (Value Text)
responseParameters :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
responseTemplates :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
selectionPattern :: IntegrationResponseProperty -> Maybe (Value Text)
statusCode :: IntegrationResponseProperty -> Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
..}
    = IntegrationResponseProperty
        {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" IntegrationResponseProperty
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
..}
instance Property "ResponseTemplates" IntegrationResponseProperty where
  type PropertyType "ResponseTemplates" IntegrationResponseProperty = Prelude.Map Prelude.Text (Value Prelude.Text)
  set :: PropertyType "ResponseTemplates" IntegrationResponseProperty
-> IntegrationResponseProperty -> IntegrationResponseProperty
set PropertyType "ResponseTemplates" IntegrationResponseProperty
newValue IntegrationResponseProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IntegrationResponseProperty -> ()
contentHandling :: IntegrationResponseProperty -> Maybe (Value Text)
responseParameters :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
responseTemplates :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
selectionPattern :: IntegrationResponseProperty -> Maybe (Value Text)
statusCode :: IntegrationResponseProperty -> Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
..}
    = IntegrationResponseProperty
        {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" IntegrationResponseProperty
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
..}
instance Property "SelectionPattern" IntegrationResponseProperty where
  type PropertyType "SelectionPattern" IntegrationResponseProperty = Value Prelude.Text
  set :: PropertyType "SelectionPattern" IntegrationResponseProperty
-> IntegrationResponseProperty -> IntegrationResponseProperty
set PropertyType "SelectionPattern" IntegrationResponseProperty
newValue IntegrationResponseProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IntegrationResponseProperty -> ()
contentHandling :: IntegrationResponseProperty -> Maybe (Value Text)
responseParameters :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
responseTemplates :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
selectionPattern :: IntegrationResponseProperty -> Maybe (Value Text)
statusCode :: IntegrationResponseProperty -> Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
..}
    = IntegrationResponseProperty
        {selectionPattern :: Maybe (Value Text)
selectionPattern = Value Text -> Maybe (Value Text)
forall a. a -> Maybe a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure PropertyType "SelectionPattern" IntegrationResponseProperty
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
statusCode :: Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
statusCode :: Value Text
..}
instance Property "StatusCode" IntegrationResponseProperty where
  type PropertyType "StatusCode" IntegrationResponseProperty = Value Prelude.Text
  set :: PropertyType "StatusCode" IntegrationResponseProperty
-> IntegrationResponseProperty -> IntegrationResponseProperty
set PropertyType "StatusCode" IntegrationResponseProperty
newValue IntegrationResponseProperty {Maybe (Map Text (Value Text))
Maybe (Value Text)
()
Value Text
haddock_workaround_ :: IntegrationResponseProperty -> ()
contentHandling :: IntegrationResponseProperty -> Maybe (Value Text)
responseParameters :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
responseTemplates :: IntegrationResponseProperty -> Maybe (Map Text (Value Text))
selectionPattern :: IntegrationResponseProperty -> Maybe (Value Text)
statusCode :: IntegrationResponseProperty -> Value Text
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
statusCode :: Value Text
..}
    = IntegrationResponseProperty {statusCode :: Value Text
statusCode = PropertyType "StatusCode" IntegrationResponseProperty
Value Text
newValue, Maybe (Map Text (Value Text))
Maybe (Value Text)
()
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
haddock_workaround_ :: ()
contentHandling :: Maybe (Value Text)
responseParameters :: Maybe (Map Text (Value Text))
responseTemplates :: Maybe (Map Text (Value Text))
selectionPattern :: Maybe (Value Text)
..}