{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ApiGatewayV2.Types.Integration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ApiGatewayV2.Types.Integration where

import Amazonka.ApiGatewayV2.Types.ConnectionType
import Amazonka.ApiGatewayV2.Types.ContentHandlingStrategy
import Amazonka.ApiGatewayV2.Types.IntegrationType
import Amazonka.ApiGatewayV2.Types.PassthroughBehavior
import Amazonka.ApiGatewayV2.Types.TlsConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | Represents an integration.
--
-- /See:/ 'newIntegration' smart constructor.
data Integration = Integration'
  { -- | Specifies whether an integration is managed by API Gateway. If you
    -- created an API using using quick create, the resulting integration is
    -- managed by API Gateway. You can update a managed integration, but you
    -- can\'t delete it.
    Integration -> Maybe Bool
apiGatewayManaged :: Prelude.Maybe Prelude.Bool,
    -- | The ID of the VPC link for a private integration. Supported only for
    -- HTTP APIs.
    Integration -> Maybe Text
connectionId :: Prelude.Maybe Prelude.Text,
    -- | The type of the network connection to the integration endpoint. Specify
    -- INTERNET for connections through the public routable internet or
    -- VPC_LINK for private connections between API Gateway and resources in a
    -- VPC. The default value is INTERNET.
    Integration -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
    -- | Supported only for WebSocket APIs. Specifies how to handle response
    -- payload content type conversions. Supported values are CONVERT_TO_BINARY
    -- and CONVERT_TO_TEXT, with the following behaviors:
    --
    -- CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded
    -- string to the corresponding binary blob.
    --
    -- CONVERT_TO_TEXT: Converts a response payload from a binary blob to a
    -- Base64-encoded string.
    --
    -- If this property is not defined, the response payload will be passed
    -- through from the integration response to the route response or method
    -- response without modification.
    Integration -> Maybe ContentHandlingStrategy
contentHandlingStrategy :: Prelude.Maybe ContentHandlingStrategy,
    -- | Specifies the credentials required for the integration, if any. For AWS
    -- integrations, three options are available. To specify an IAM Role for
    -- API Gateway to assume, use the role\'s Amazon Resource Name (ARN). To
    -- require that the caller\'s identity be passed through from the request,
    -- specify the string arn:aws:iam::*:user\/*. To use resource-based
    -- permissions on supported AWS services, specify null.
    Integration -> Maybe Text
credentialsArn :: Prelude.Maybe Prelude.Text,
    -- | Represents the description of an integration.
    Integration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Represents the identifier of an integration.
    Integration -> Maybe Text
integrationId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the integration\'s HTTP method type.
    Integration -> Maybe Text
integrationMethod :: Prelude.Maybe Prelude.Text,
    -- | The integration response selection expression for the integration.
    -- Supported only for WebSocket APIs. See
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-integration-response-selection-expressions Integration Response Selection Expressions>.
    Integration -> Maybe Text
integrationResponseSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS
    -- service action to invoke. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html Integration subtype reference>.
    Integration -> Maybe Text
integrationSubtype :: Prelude.Maybe Prelude.Text,
    -- | The integration type of an integration. One of the following:
    --
    -- AWS: for integrating the route or method request with an AWS service
    -- action, including the Lambda function-invoking action. With the Lambda
    -- function-invoking action, this is referred to as the Lambda custom
    -- integration. With any other AWS service action, this is known as AWS
    -- integration. Supported only for WebSocket APIs.
    --
    -- AWS_PROXY: for integrating the route or method request with a Lambda
    -- function or other AWS service action. This integration is also referred
    -- to as a Lambda proxy integration.
    --
    -- HTTP: for integrating the route or method request with an HTTP endpoint.
    -- This integration is also referred to as the HTTP custom integration.
    -- Supported only for WebSocket APIs.
    --
    -- HTTP_PROXY: for integrating the route or method request with an HTTP
    -- endpoint, with the client request passed through as-is. This is also
    -- referred to as HTTP proxy integration.
    --
    -- MOCK: for integrating the route or method request with API Gateway as a
    -- \"loopback\" endpoint without invoking any backend. Supported only for
    -- WebSocket APIs.
    Integration -> Maybe IntegrationType
integrationType :: Prelude.Maybe IntegrationType,
    -- | For a Lambda integration, specify the URI of a Lambda function.
    --
    -- For an HTTP integration, specify a fully-qualified URL.
    --
    -- For an HTTP API private integration, specify the ARN of an Application
    -- Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map
    -- service. If you specify the ARN of an AWS Cloud Map service, API Gateway
    -- uses DiscoverInstances to identify resources. You can use query
    -- parameters to target specific resources. To learn more, see
    -- <https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html DiscoverInstances>.
    -- For private integrations, all resources must be owned by the same AWS
    -- account.
    Integration -> Maybe Text
integrationUri :: Prelude.Maybe Prelude.Text,
    -- | Specifies the pass-through behavior for incoming requests based on the
    -- Content-Type header in the request, and the available mapping templates
    -- specified as the requestTemplates property on the Integration resource.
    -- There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
    -- NEVER. Supported only for WebSocket APIs.
    --
    -- WHEN_NO_MATCH passes the request body for unmapped content types through
    -- to the integration backend without transformation.
    --
    -- NEVER rejects unmapped content types with an HTTP 415 Unsupported Media
    -- Type response.
    --
    -- WHEN_NO_TEMPLATES allows pass-through when the integration has no
    -- content types mapped to templates. However, if there is at least one
    -- content type defined, unmapped content types will be rejected with the
    -- same HTTP 415 Unsupported Media Type response.
    Integration -> Maybe PassthroughBehavior
passthroughBehavior :: Prelude.Maybe PassthroughBehavior,
    -- | Specifies the format of the payload sent to an integration. Required for
    -- HTTP APIs.
    Integration -> Maybe Text
payloadFormatVersion :: Prelude.Maybe Prelude.Text,
    -- | For WebSocket APIs, a key-value map specifying request parameters that
    -- are passed from the method request to the backend. The key is an
    -- integration request parameter name and the associated value is a method
    -- request parameter value or static value that must be enclosed within
    -- single quotes and pre-encoded as required by the backend. The method
    -- request parameter value must match the pattern of
    -- method.request.{location}.{name} , where {location} is querystring,
    -- path, or header; and {name} must be a valid and unique method request
    -- parameter name.
    --
    -- For HTTP API integrations with a specified integrationSubtype, request
    -- parameters are a key-value map specifying parameters that are passed to
    -- AWS_PROXY integrations. You can provide static values, or map request
    -- data, stage variables, or context variables that are evaluated at
    -- runtime. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html Working with AWS service integrations for HTTP APIs>.
    --
    -- For HTTP API itegrations, without a specified integrationSubtype request
    -- parameters are a key-value map specifying how to transform HTTP requests
    -- before sending them to backend integrations. The key should follow the
    -- pattern \<action>:\<header|querystring|path>.\<location>. The action can
    -- be append, overwrite or remove. For values, you can provide static
    -- values, or map request data, stage variables, or context variables that
    -- are evaluated at runtime. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
    Integration -> Maybe (HashMap Text Text)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Represents a map of Velocity templates that are applied on the request
    -- payload based on the value of the Content-Type header sent by the
    -- client. The content type value is the key in this map, and the template
    -- (as a String) is the value. Supported only for WebSocket APIs.
    Integration -> Maybe (HashMap Text Text)
requestTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | Supported only for HTTP APIs. You use response parameters to transform
    -- the HTTP response from a backend integration before returning the
    -- response to clients. Specify a key-value map from a selection key to
    -- response parameters. The selection key must be a valid HTTP status code
    -- within the range of 200-599. Response parameters are a key-value map.
    -- The key must match pattern \<action>:\<header>.\<location> or
    -- overwrite.statuscode. The action can be append, overwrite or remove. The
    -- value can be a static value, or map to response data, stage variables,
    -- or context variables that are evaluated at runtime. To learn more, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
    Integration -> Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | The template selection expression for the integration. Supported only
    -- for WebSocket APIs.
    Integration -> Maybe Text
templateSelectionExpression :: Prelude.Maybe Prelude.Text,
    -- | Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and
    -- between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is
    -- 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
    Integration -> Maybe Natural
timeoutInMillis :: Prelude.Maybe Prelude.Natural,
    -- | The TLS configuration for a private integration. If you specify a TLS
    -- configuration, private integration traffic uses the HTTPS protocol.
    -- Supported only for HTTP APIs.
    Integration -> Maybe TlsConfig
tlsConfig :: Prelude.Maybe TlsConfig
  }
  deriving (Integration -> Integration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Integration -> Integration -> Bool
$c/= :: Integration -> Integration -> Bool
== :: Integration -> Integration -> Bool
$c== :: Integration -> Integration -> Bool
Prelude.Eq, ReadPrec [Integration]
ReadPrec Integration
Int -> ReadS Integration
ReadS [Integration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Integration]
$creadListPrec :: ReadPrec [Integration]
readPrec :: ReadPrec Integration
$creadPrec :: ReadPrec Integration
readList :: ReadS [Integration]
$creadList :: ReadS [Integration]
readsPrec :: Int -> ReadS Integration
$creadsPrec :: Int -> ReadS Integration
Prelude.Read, Int -> Integration -> ShowS
[Integration] -> ShowS
Integration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Integration] -> ShowS
$cshowList :: [Integration] -> ShowS
show :: Integration -> String
$cshow :: Integration -> String
showsPrec :: Int -> Integration -> ShowS
$cshowsPrec :: Int -> Integration -> ShowS
Prelude.Show, forall x. Rep Integration x -> Integration
forall x. Integration -> Rep Integration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Integration x -> Integration
$cfrom :: forall x. Integration -> Rep Integration x
Prelude.Generic)

-- |
-- Create a value of 'Integration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'apiGatewayManaged', 'integration_apiGatewayManaged' - Specifies whether an integration is managed by API Gateway. If you
-- created an API using using quick create, the resulting integration is
-- managed by API Gateway. You can update a managed integration, but you
-- can\'t delete it.
--
-- 'connectionId', 'integration_connectionId' - The ID of the VPC link for a private integration. Supported only for
-- HTTP APIs.
--
-- 'connectionType', 'integration_connectionType' - The type of the network connection to the integration endpoint. Specify
-- INTERNET for connections through the public routable internet or
-- VPC_LINK for private connections between API Gateway and resources in a
-- VPC. The default value is INTERNET.
--
-- 'contentHandlingStrategy', 'integration_contentHandlingStrategy' - Supported only for WebSocket APIs. Specifies how to handle response
-- payload content type conversions. Supported values are CONVERT_TO_BINARY
-- and CONVERT_TO_TEXT, with the following behaviors:
--
-- CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded
-- string to the corresponding binary blob.
--
-- CONVERT_TO_TEXT: Converts a response payload from a binary blob to a
-- Base64-encoded string.
--
-- If this property is not defined, the response payload will be passed
-- through from the integration response to the route response or method
-- response without modification.
--
-- 'credentialsArn', 'integration_credentialsArn' - Specifies the credentials required for the integration, if any. For AWS
-- integrations, three options are available. To specify an IAM Role for
-- API Gateway to assume, use the role\'s Amazon Resource Name (ARN). To
-- require that the caller\'s identity be passed through from the request,
-- specify the string arn:aws:iam::*:user\/*. To use resource-based
-- permissions on supported AWS services, specify null.
--
-- 'description', 'integration_description' - Represents the description of an integration.
--
-- 'integrationId', 'integration_integrationId' - Represents the identifier of an integration.
--
-- 'integrationMethod', 'integration_integrationMethod' - Specifies the integration\'s HTTP method type.
--
-- 'integrationResponseSelectionExpression', 'integration_integrationResponseSelectionExpression' - The integration response selection expression for the integration.
-- Supported only for WebSocket APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-integration-response-selection-expressions Integration Response Selection Expressions>.
--
-- 'integrationSubtype', 'integration_integrationSubtype' - Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS
-- service action to invoke. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html Integration subtype reference>.
--
-- 'integrationType', 'integration_integrationType' - The integration type of an integration. One of the following:
--
-- AWS: for integrating the route or method request with an AWS service
-- action, including the Lambda function-invoking action. With the Lambda
-- function-invoking action, this is referred to as the Lambda custom
-- integration. With any other AWS service action, this is known as AWS
-- integration. Supported only for WebSocket APIs.
--
-- AWS_PROXY: for integrating the route or method request with a Lambda
-- function or other AWS service action. This integration is also referred
-- to as a Lambda proxy integration.
--
-- HTTP: for integrating the route or method request with an HTTP endpoint.
-- This integration is also referred to as the HTTP custom integration.
-- Supported only for WebSocket APIs.
--
-- HTTP_PROXY: for integrating the route or method request with an HTTP
-- endpoint, with the client request passed through as-is. This is also
-- referred to as HTTP proxy integration.
--
-- MOCK: for integrating the route or method request with API Gateway as a
-- \"loopback\" endpoint without invoking any backend. Supported only for
-- WebSocket APIs.
--
-- 'integrationUri', 'integration_integrationUri' - For a Lambda integration, specify the URI of a Lambda function.
--
-- For an HTTP integration, specify a fully-qualified URL.
--
-- For an HTTP API private integration, specify the ARN of an Application
-- Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map
-- service. If you specify the ARN of an AWS Cloud Map service, API Gateway
-- uses DiscoverInstances to identify resources. You can use query
-- parameters to target specific resources. To learn more, see
-- <https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html DiscoverInstances>.
-- For private integrations, all resources must be owned by the same AWS
-- account.
--
-- 'passthroughBehavior', 'integration_passthroughBehavior' - Specifies the pass-through behavior for incoming requests based on the
-- Content-Type header in the request, and the available mapping templates
-- specified as the requestTemplates property on the Integration resource.
-- There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
-- NEVER. Supported only for WebSocket APIs.
--
-- WHEN_NO_MATCH passes the request body for unmapped content types through
-- to the integration backend without transformation.
--
-- NEVER rejects unmapped content types with an HTTP 415 Unsupported Media
-- Type response.
--
-- WHEN_NO_TEMPLATES allows pass-through when the integration has no
-- content types mapped to templates. However, if there is at least one
-- content type defined, unmapped content types will be rejected with the
-- same HTTP 415 Unsupported Media Type response.
--
-- 'payloadFormatVersion', 'integration_payloadFormatVersion' - Specifies the format of the payload sent to an integration. Required for
-- HTTP APIs.
--
-- 'requestParameters', 'integration_requestParameters' - For WebSocket APIs, a key-value map specifying request parameters that
-- are passed from the method request to the backend. The key is an
-- integration request parameter name and the associated value is a method
-- request parameter value or static value that must be enclosed within
-- single quotes and pre-encoded as required by the backend. The method
-- request parameter value must match the pattern of
-- method.request.{location}.{name} , where {location} is querystring,
-- path, or header; and {name} must be a valid and unique method request
-- parameter name.
--
-- For HTTP API integrations with a specified integrationSubtype, request
-- parameters are a key-value map specifying parameters that are passed to
-- AWS_PROXY integrations. You can provide static values, or map request
-- data, stage variables, or context variables that are evaluated at
-- runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html Working with AWS service integrations for HTTP APIs>.
--
-- For HTTP API itegrations, without a specified integrationSubtype request
-- parameters are a key-value map specifying how to transform HTTP requests
-- before sending them to backend integrations. The key should follow the
-- pattern \<action>:\<header|querystring|path>.\<location>. The action can
-- be append, overwrite or remove. For values, you can provide static
-- values, or map request data, stage variables, or context variables that
-- are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
--
-- 'requestTemplates', 'integration_requestTemplates' - Represents a map of Velocity templates that are applied on the request
-- payload based on the value of the Content-Type header sent by the
-- client. The content type value is the key in this map, and the template
-- (as a String) is the value. Supported only for WebSocket APIs.
--
-- 'responseParameters', 'integration_responseParameters' - Supported only for HTTP APIs. You use response parameters to transform
-- the HTTP response from a backend integration before returning the
-- response to clients. Specify a key-value map from a selection key to
-- response parameters. The selection key must be a valid HTTP status code
-- within the range of 200-599. Response parameters are a key-value map.
-- The key must match pattern \<action>:\<header>.\<location> or
-- overwrite.statuscode. The action can be append, overwrite or remove. The
-- value can be a static value, or map to response data, stage variables,
-- or context variables that are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
--
-- 'templateSelectionExpression', 'integration_templateSelectionExpression' - The template selection expression for the integration. Supported only
-- for WebSocket APIs.
--
-- 'timeoutInMillis', 'integration_timeoutInMillis' - Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and
-- between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is
-- 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
--
-- 'tlsConfig', 'integration_tlsConfig' - The TLS configuration for a private integration. If you specify a TLS
-- configuration, private integration traffic uses the HTTPS protocol.
-- Supported only for HTTP APIs.
newIntegration ::
  Integration
newIntegration :: Integration
newIntegration =
  Integration'
    { $sel:apiGatewayManaged:Integration' :: Maybe Bool
apiGatewayManaged = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionId:Integration' :: Maybe Text
connectionId = forall a. Maybe a
Prelude.Nothing,
      $sel:connectionType:Integration' :: Maybe ConnectionType
connectionType = forall a. Maybe a
Prelude.Nothing,
      $sel:contentHandlingStrategy:Integration' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = forall a. Maybe a
Prelude.Nothing,
      $sel:credentialsArn:Integration' :: Maybe Text
credentialsArn = forall a. Maybe a
Prelude.Nothing,
      $sel:description:Integration' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationId:Integration' :: Maybe Text
integrationId = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationMethod:Integration' :: Maybe Text
integrationMethod = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationResponseSelectionExpression:Integration' :: Maybe Text
integrationResponseSelectionExpression =
        forall a. Maybe a
Prelude.Nothing,
      $sel:integrationSubtype:Integration' :: Maybe Text
integrationSubtype = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationType:Integration' :: Maybe IntegrationType
integrationType = forall a. Maybe a
Prelude.Nothing,
      $sel:integrationUri:Integration' :: Maybe Text
integrationUri = forall a. Maybe a
Prelude.Nothing,
      $sel:passthroughBehavior:Integration' :: Maybe PassthroughBehavior
passthroughBehavior = forall a. Maybe a
Prelude.Nothing,
      $sel:payloadFormatVersion:Integration' :: Maybe Text
payloadFormatVersion = forall a. Maybe a
Prelude.Nothing,
      $sel:requestParameters:Integration' :: Maybe (HashMap Text Text)
requestParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:requestTemplates:Integration' :: Maybe (HashMap Text Text)
requestTemplates = forall a. Maybe a
Prelude.Nothing,
      $sel:responseParameters:Integration' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = forall a. Maybe a
Prelude.Nothing,
      $sel:templateSelectionExpression:Integration' :: Maybe Text
templateSelectionExpression = forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMillis:Integration' :: Maybe Natural
timeoutInMillis = forall a. Maybe a
Prelude.Nothing,
      $sel:tlsConfig:Integration' :: Maybe TlsConfig
tlsConfig = forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies whether an integration is managed by API Gateway. If you
-- created an API using using quick create, the resulting integration is
-- managed by API Gateway. You can update a managed integration, but you
-- can\'t delete it.
integration_apiGatewayManaged :: Lens.Lens' Integration (Prelude.Maybe Prelude.Bool)
integration_apiGatewayManaged :: Lens' Integration (Maybe Bool)
integration_apiGatewayManaged = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:Integration' :: Integration -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: Integration
s@Integration' {} Maybe Bool
a -> Integration
s {$sel:apiGatewayManaged:Integration' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: Integration)

-- | The ID of the VPC link for a private integration. Supported only for
-- HTTP APIs.
integration_connectionId :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_connectionId :: Lens' Integration (Maybe Text)
integration_connectionId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
connectionId :: Maybe Text
$sel:connectionId:Integration' :: Integration -> Maybe Text
connectionId} -> Maybe Text
connectionId) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:connectionId:Integration' :: Maybe Text
connectionId = Maybe Text
a} :: Integration)

-- | The type of the network connection to the integration endpoint. Specify
-- INTERNET for connections through the public routable internet or
-- VPC_LINK for private connections between API Gateway and resources in a
-- VPC. The default value is INTERNET.
integration_connectionType :: Lens.Lens' Integration (Prelude.Maybe ConnectionType)
integration_connectionType :: Lens' Integration (Maybe ConnectionType)
integration_connectionType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:Integration' :: Integration -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: Integration
s@Integration' {} Maybe ConnectionType
a -> Integration
s {$sel:connectionType:Integration' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: Integration)

-- | Supported only for WebSocket APIs. Specifies how to handle response
-- payload content type conversions. Supported values are CONVERT_TO_BINARY
-- and CONVERT_TO_TEXT, with the following behaviors:
--
-- CONVERT_TO_BINARY: Converts a response payload from a Base64-encoded
-- string to the corresponding binary blob.
--
-- CONVERT_TO_TEXT: Converts a response payload from a binary blob to a
-- Base64-encoded string.
--
-- If this property is not defined, the response payload will be passed
-- through from the integration response to the route response or method
-- response without modification.
integration_contentHandlingStrategy :: Lens.Lens' Integration (Prelude.Maybe ContentHandlingStrategy)
integration_contentHandlingStrategy :: Lens' Integration (Maybe ContentHandlingStrategy)
integration_contentHandlingStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe ContentHandlingStrategy
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:contentHandlingStrategy:Integration' :: Integration -> Maybe ContentHandlingStrategy
contentHandlingStrategy} -> Maybe ContentHandlingStrategy
contentHandlingStrategy) (\s :: Integration
s@Integration' {} Maybe ContentHandlingStrategy
a -> Integration
s {$sel:contentHandlingStrategy:Integration' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
a} :: Integration)

-- | Specifies the credentials required for the integration, if any. For AWS
-- integrations, three options are available. To specify an IAM Role for
-- API Gateway to assume, use the role\'s Amazon Resource Name (ARN). To
-- require that the caller\'s identity be passed through from the request,
-- specify the string arn:aws:iam::*:user\/*. To use resource-based
-- permissions on supported AWS services, specify null.
integration_credentialsArn :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_credentialsArn :: Lens' Integration (Maybe Text)
integration_credentialsArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
credentialsArn :: Maybe Text
$sel:credentialsArn:Integration' :: Integration -> Maybe Text
credentialsArn} -> Maybe Text
credentialsArn) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:credentialsArn:Integration' :: Maybe Text
credentialsArn = Maybe Text
a} :: Integration)

-- | Represents the description of an integration.
integration_description :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_description :: Lens' Integration (Maybe Text)
integration_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
description :: Maybe Text
$sel:description:Integration' :: Integration -> Maybe Text
description} -> Maybe Text
description) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:description:Integration' :: Maybe Text
description = Maybe Text
a} :: Integration)

-- | Represents the identifier of an integration.
integration_integrationId :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_integrationId :: Lens' Integration (Maybe Text)
integration_integrationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
integrationId :: Maybe Text
$sel:integrationId:Integration' :: Integration -> Maybe Text
integrationId} -> Maybe Text
integrationId) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:integrationId:Integration' :: Maybe Text
integrationId = Maybe Text
a} :: Integration)

-- | Specifies the integration\'s HTTP method type.
integration_integrationMethod :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_integrationMethod :: Lens' Integration (Maybe Text)
integration_integrationMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
integrationMethod :: Maybe Text
$sel:integrationMethod:Integration' :: Integration -> Maybe Text
integrationMethod} -> Maybe Text
integrationMethod) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:integrationMethod:Integration' :: Maybe Text
integrationMethod = Maybe Text
a} :: Integration)

-- | The integration response selection expression for the integration.
-- Supported only for WebSocket APIs. See
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-websocket-api-selection-expressions.html#apigateway-websocket-api-integration-response-selection-expressions Integration Response Selection Expressions>.
integration_integrationResponseSelectionExpression :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_integrationResponseSelectionExpression :: Lens' Integration (Maybe Text)
integration_integrationResponseSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
integrationResponseSelectionExpression :: Maybe Text
$sel:integrationResponseSelectionExpression:Integration' :: Integration -> Maybe Text
integrationResponseSelectionExpression} -> Maybe Text
integrationResponseSelectionExpression) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:integrationResponseSelectionExpression:Integration' :: Maybe Text
integrationResponseSelectionExpression = Maybe Text
a} :: Integration)

-- | Supported only for HTTP API AWS_PROXY integrations. Specifies the AWS
-- service action to invoke. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services-reference.html Integration subtype reference>.
integration_integrationSubtype :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_integrationSubtype :: Lens' Integration (Maybe Text)
integration_integrationSubtype = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
integrationSubtype :: Maybe Text
$sel:integrationSubtype:Integration' :: Integration -> Maybe Text
integrationSubtype} -> Maybe Text
integrationSubtype) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:integrationSubtype:Integration' :: Maybe Text
integrationSubtype = Maybe Text
a} :: Integration)

-- | The integration type of an integration. One of the following:
--
-- AWS: for integrating the route or method request with an AWS service
-- action, including the Lambda function-invoking action. With the Lambda
-- function-invoking action, this is referred to as the Lambda custom
-- integration. With any other AWS service action, this is known as AWS
-- integration. Supported only for WebSocket APIs.
--
-- AWS_PROXY: for integrating the route or method request with a Lambda
-- function or other AWS service action. This integration is also referred
-- to as a Lambda proxy integration.
--
-- HTTP: for integrating the route or method request with an HTTP endpoint.
-- This integration is also referred to as the HTTP custom integration.
-- Supported only for WebSocket APIs.
--
-- HTTP_PROXY: for integrating the route or method request with an HTTP
-- endpoint, with the client request passed through as-is. This is also
-- referred to as HTTP proxy integration.
--
-- MOCK: for integrating the route or method request with API Gateway as a
-- \"loopback\" endpoint without invoking any backend. Supported only for
-- WebSocket APIs.
integration_integrationType :: Lens.Lens' Integration (Prelude.Maybe IntegrationType)
integration_integrationType :: Lens' Integration (Maybe IntegrationType)
integration_integrationType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe IntegrationType
integrationType :: Maybe IntegrationType
$sel:integrationType:Integration' :: Integration -> Maybe IntegrationType
integrationType} -> Maybe IntegrationType
integrationType) (\s :: Integration
s@Integration' {} Maybe IntegrationType
a -> Integration
s {$sel:integrationType:Integration' :: Maybe IntegrationType
integrationType = Maybe IntegrationType
a} :: Integration)

-- | For a Lambda integration, specify the URI of a Lambda function.
--
-- For an HTTP integration, specify a fully-qualified URL.
--
-- For an HTTP API private integration, specify the ARN of an Application
-- Load Balancer listener, Network Load Balancer listener, or AWS Cloud Map
-- service. If you specify the ARN of an AWS Cloud Map service, API Gateway
-- uses DiscoverInstances to identify resources. You can use query
-- parameters to target specific resources. To learn more, see
-- <https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html DiscoverInstances>.
-- For private integrations, all resources must be owned by the same AWS
-- account.
integration_integrationUri :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_integrationUri :: Lens' Integration (Maybe Text)
integration_integrationUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
integrationUri :: Maybe Text
$sel:integrationUri:Integration' :: Integration -> Maybe Text
integrationUri} -> Maybe Text
integrationUri) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:integrationUri:Integration' :: Maybe Text
integrationUri = Maybe Text
a} :: Integration)

-- | Specifies the pass-through behavior for incoming requests based on the
-- Content-Type header in the request, and the available mapping templates
-- specified as the requestTemplates property on the Integration resource.
-- There are three valid values: WHEN_NO_MATCH, WHEN_NO_TEMPLATES, and
-- NEVER. Supported only for WebSocket APIs.
--
-- WHEN_NO_MATCH passes the request body for unmapped content types through
-- to the integration backend without transformation.
--
-- NEVER rejects unmapped content types with an HTTP 415 Unsupported Media
-- Type response.
--
-- WHEN_NO_TEMPLATES allows pass-through when the integration has no
-- content types mapped to templates. However, if there is at least one
-- content type defined, unmapped content types will be rejected with the
-- same HTTP 415 Unsupported Media Type response.
integration_passthroughBehavior :: Lens.Lens' Integration (Prelude.Maybe PassthroughBehavior)
integration_passthroughBehavior :: Lens' Integration (Maybe PassthroughBehavior)
integration_passthroughBehavior = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe PassthroughBehavior
passthroughBehavior :: Maybe PassthroughBehavior
$sel:passthroughBehavior:Integration' :: Integration -> Maybe PassthroughBehavior
passthroughBehavior} -> Maybe PassthroughBehavior
passthroughBehavior) (\s :: Integration
s@Integration' {} Maybe PassthroughBehavior
a -> Integration
s {$sel:passthroughBehavior:Integration' :: Maybe PassthroughBehavior
passthroughBehavior = Maybe PassthroughBehavior
a} :: Integration)

-- | Specifies the format of the payload sent to an integration. Required for
-- HTTP APIs.
integration_payloadFormatVersion :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_payloadFormatVersion :: Lens' Integration (Maybe Text)
integration_payloadFormatVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
payloadFormatVersion :: Maybe Text
$sel:payloadFormatVersion:Integration' :: Integration -> Maybe Text
payloadFormatVersion} -> Maybe Text
payloadFormatVersion) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:payloadFormatVersion:Integration' :: Maybe Text
payloadFormatVersion = Maybe Text
a} :: Integration)

-- | For WebSocket APIs, a key-value map specifying request parameters that
-- are passed from the method request to the backend. The key is an
-- integration request parameter name and the associated value is a method
-- request parameter value or static value that must be enclosed within
-- single quotes and pre-encoded as required by the backend. The method
-- request parameter value must match the pattern of
-- method.request.{location}.{name} , where {location} is querystring,
-- path, or header; and {name} must be a valid and unique method request
-- parameter name.
--
-- For HTTP API integrations with a specified integrationSubtype, request
-- parameters are a key-value map specifying parameters that are passed to
-- AWS_PROXY integrations. You can provide static values, or map request
-- data, stage variables, or context variables that are evaluated at
-- runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html Working with AWS service integrations for HTTP APIs>.
--
-- For HTTP API itegrations, without a specified integrationSubtype request
-- parameters are a key-value map specifying how to transform HTTP requests
-- before sending them to backend integrations. The key should follow the
-- pattern \<action>:\<header|querystring|path>.\<location>. The action can
-- be append, overwrite or remove. For values, you can provide static
-- values, or map request data, stage variables, or context variables that
-- are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
integration_requestParameters :: Lens.Lens' Integration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
integration_requestParameters :: Lens' Integration (Maybe (HashMap Text Text))
integration_requestParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
$sel:requestParameters:Integration' :: Integration -> Maybe (HashMap Text Text)
requestParameters} -> Maybe (HashMap Text Text)
requestParameters) (\s :: Integration
s@Integration' {} Maybe (HashMap Text Text)
a -> Integration
s {$sel:requestParameters:Integration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
a} :: Integration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Represents a map of Velocity templates that are applied on the request
-- payload based on the value of the Content-Type header sent by the
-- client. The content type value is the key in this map, and the template
-- (as a String) is the value. Supported only for WebSocket APIs.
integration_requestTemplates :: Lens.Lens' Integration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
integration_requestTemplates :: Lens' Integration (Maybe (HashMap Text Text))
integration_requestTemplates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe (HashMap Text Text)
requestTemplates :: Maybe (HashMap Text Text)
$sel:requestTemplates:Integration' :: Integration -> Maybe (HashMap Text Text)
requestTemplates} -> Maybe (HashMap Text Text)
requestTemplates) (\s :: Integration
s@Integration' {} Maybe (HashMap Text Text)
a -> Integration
s {$sel:requestTemplates:Integration' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
a} :: Integration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Supported only for HTTP APIs. You use response parameters to transform
-- the HTTP response from a backend integration before returning the
-- response to clients. Specify a key-value map from a selection key to
-- response parameters. The selection key must be a valid HTTP status code
-- within the range of 200-599. Response parameters are a key-value map.
-- The key must match pattern \<action>:\<header>.\<location> or
-- overwrite.statuscode. The action can be append, overwrite or remove. The
-- value can be a static value, or map to response data, stage variables,
-- or context variables that are evaluated at runtime. To learn more, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html Transforming API requests and responses>.
integration_responseParameters :: Lens.Lens' Integration (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)))
integration_responseParameters :: Lens' Integration (Maybe (HashMap Text (HashMap Text Text)))
integration_responseParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
$sel:responseParameters:Integration' :: Integration -> Maybe (HashMap Text (HashMap Text Text))
responseParameters} -> Maybe (HashMap Text (HashMap Text Text))
responseParameters) (\s :: Integration
s@Integration' {} Maybe (HashMap Text (HashMap Text Text))
a -> Integration
s {$sel:responseParameters:Integration' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
a} :: Integration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The template selection expression for the integration. Supported only
-- for WebSocket APIs.
integration_templateSelectionExpression :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_templateSelectionExpression :: Lens' Integration (Maybe Text)
integration_templateSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
templateSelectionExpression :: Maybe Text
$sel:templateSelectionExpression:Integration' :: Integration -> Maybe Text
templateSelectionExpression} -> Maybe Text
templateSelectionExpression) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:templateSelectionExpression:Integration' :: Maybe Text
templateSelectionExpression = Maybe Text
a} :: Integration)

-- | Custom timeout between 50 and 29,000 milliseconds for WebSocket APIs and
-- between 50 and 30,000 milliseconds for HTTP APIs. The default timeout is
-- 29 seconds for WebSocket APIs and 30 seconds for HTTP APIs.
integration_timeoutInMillis :: Lens.Lens' Integration (Prelude.Maybe Prelude.Natural)
integration_timeoutInMillis :: Lens' Integration (Maybe Natural)
integration_timeoutInMillis = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Natural
timeoutInMillis :: Maybe Natural
$sel:timeoutInMillis:Integration' :: Integration -> Maybe Natural
timeoutInMillis} -> Maybe Natural
timeoutInMillis) (\s :: Integration
s@Integration' {} Maybe Natural
a -> Integration
s {$sel:timeoutInMillis:Integration' :: Maybe Natural
timeoutInMillis = Maybe Natural
a} :: Integration)

-- | The TLS configuration for a private integration. If you specify a TLS
-- configuration, private integration traffic uses the HTTPS protocol.
-- Supported only for HTTP APIs.
integration_tlsConfig :: Lens.Lens' Integration (Prelude.Maybe TlsConfig)
integration_tlsConfig :: Lens' Integration (Maybe TlsConfig)
integration_tlsConfig = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe TlsConfig
tlsConfig :: Maybe TlsConfig
$sel:tlsConfig:Integration' :: Integration -> Maybe TlsConfig
tlsConfig} -> Maybe TlsConfig
tlsConfig) (\s :: Integration
s@Integration' {} Maybe TlsConfig
a -> Integration
s {$sel:tlsConfig:Integration' :: Maybe TlsConfig
tlsConfig = Maybe TlsConfig
a} :: Integration)

instance Data.FromJSON Integration where
  parseJSON :: Value -> Parser Integration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Integration"
      ( \Object
x ->
          Maybe Bool
-> Maybe Text
-> Maybe ConnectionType
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe IntegrationType
-> Maybe Text
-> Maybe PassthroughBehavior
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text (HashMap Text Text))
-> Maybe Text
-> Maybe Natural
-> Maybe TlsConfig
-> Integration
Integration'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"apiGatewayManaged")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"connectionId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"connectionType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"contentHandlingStrategy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"credentialsArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"integrationId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"integrationMethod")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"integrationResponseSelectionExpression")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"integrationSubtype")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"integrationType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"integrationUri")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"passthroughBehavior")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"payloadFormatVersion")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"requestParameters"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"requestTemplates"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"responseParameters"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"templateSelectionExpression")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"timeoutInMillis")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tlsConfig")
      )

instance Prelude.Hashable Integration where
  hashWithSalt :: Int -> Integration -> Int
hashWithSalt Int
_salt Integration' {Maybe Bool
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe IntegrationType
Maybe PassthroughBehavior
Maybe TlsConfig
tlsConfig :: Maybe TlsConfig
timeoutInMillis :: Maybe Natural
templateSelectionExpression :: Maybe Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
requestTemplates :: Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
payloadFormatVersion :: Maybe Text
passthroughBehavior :: Maybe PassthroughBehavior
integrationUri :: Maybe Text
integrationType :: Maybe IntegrationType
integrationSubtype :: Maybe Text
integrationResponseSelectionExpression :: Maybe Text
integrationMethod :: Maybe Text
integrationId :: Maybe Text
description :: Maybe Text
credentialsArn :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
connectionType :: Maybe ConnectionType
connectionId :: Maybe Text
apiGatewayManaged :: Maybe Bool
$sel:tlsConfig:Integration' :: Integration -> Maybe TlsConfig
$sel:timeoutInMillis:Integration' :: Integration -> Maybe Natural
$sel:templateSelectionExpression:Integration' :: Integration -> Maybe Text
$sel:responseParameters:Integration' :: Integration -> Maybe (HashMap Text (HashMap Text Text))
$sel:requestTemplates:Integration' :: Integration -> Maybe (HashMap Text Text)
$sel:requestParameters:Integration' :: Integration -> Maybe (HashMap Text Text)
$sel:payloadFormatVersion:Integration' :: Integration -> Maybe Text
$sel:passthroughBehavior:Integration' :: Integration -> Maybe PassthroughBehavior
$sel:integrationUri:Integration' :: Integration -> Maybe Text
$sel:integrationType:Integration' :: Integration -> Maybe IntegrationType
$sel:integrationSubtype:Integration' :: Integration -> Maybe Text
$sel:integrationResponseSelectionExpression:Integration' :: Integration -> Maybe Text
$sel:integrationMethod:Integration' :: Integration -> Maybe Text
$sel:integrationId:Integration' :: Integration -> Maybe Text
$sel:description:Integration' :: Integration -> Maybe Text
$sel:credentialsArn:Integration' :: Integration -> Maybe Text
$sel:contentHandlingStrategy:Integration' :: Integration -> Maybe ContentHandlingStrategy
$sel:connectionType:Integration' :: Integration -> Maybe ConnectionType
$sel:connectionId:Integration' :: Integration -> Maybe Text
$sel:apiGatewayManaged:Integration' :: Integration -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
apiGatewayManaged
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
connectionId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ConnectionType
connectionType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ContentHandlingStrategy
contentHandlingStrategy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
credentialsArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
integrationId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
integrationMethod
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
integrationResponseSelectionExpression
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
integrationSubtype
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IntegrationType
integrationType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
integrationUri
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe PassthroughBehavior
passthroughBehavior
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
payloadFormatVersion
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
requestParameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
requestTemplates
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text (HashMap Text Text))
responseParameters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateSelectionExpression
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
timeoutInMillis
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TlsConfig
tlsConfig

instance Prelude.NFData Integration where
  rnf :: Integration -> ()
rnf Integration' {Maybe Bool
Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe IntegrationType
Maybe PassthroughBehavior
Maybe TlsConfig
tlsConfig :: Maybe TlsConfig
timeoutInMillis :: Maybe Natural
templateSelectionExpression :: Maybe Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
requestTemplates :: Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
payloadFormatVersion :: Maybe Text
passthroughBehavior :: Maybe PassthroughBehavior
integrationUri :: Maybe Text
integrationType :: Maybe IntegrationType
integrationSubtype :: Maybe Text
integrationResponseSelectionExpression :: Maybe Text
integrationMethod :: Maybe Text
integrationId :: Maybe Text
description :: Maybe Text
credentialsArn :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
connectionType :: Maybe ConnectionType
connectionId :: Maybe Text
apiGatewayManaged :: Maybe Bool
$sel:tlsConfig:Integration' :: Integration -> Maybe TlsConfig
$sel:timeoutInMillis:Integration' :: Integration -> Maybe Natural
$sel:templateSelectionExpression:Integration' :: Integration -> Maybe Text
$sel:responseParameters:Integration' :: Integration -> Maybe (HashMap Text (HashMap Text Text))
$sel:requestTemplates:Integration' :: Integration -> Maybe (HashMap Text Text)
$sel:requestParameters:Integration' :: Integration -> Maybe (HashMap Text Text)
$sel:payloadFormatVersion:Integration' :: Integration -> Maybe Text
$sel:passthroughBehavior:Integration' :: Integration -> Maybe PassthroughBehavior
$sel:integrationUri:Integration' :: Integration -> Maybe Text
$sel:integrationType:Integration' :: Integration -> Maybe IntegrationType
$sel:integrationSubtype:Integration' :: Integration -> Maybe Text
$sel:integrationResponseSelectionExpression:Integration' :: Integration -> Maybe Text
$sel:integrationMethod:Integration' :: Integration -> Maybe Text
$sel:integrationId:Integration' :: Integration -> Maybe Text
$sel:description:Integration' :: Integration -> Maybe Text
$sel:credentialsArn:Integration' :: Integration -> Maybe Text
$sel:contentHandlingStrategy:Integration' :: Integration -> Maybe ContentHandlingStrategy
$sel:connectionType:Integration' :: Integration -> Maybe ConnectionType
$sel:connectionId:Integration' :: Integration -> Maybe Text
$sel:apiGatewayManaged:Integration' :: Integration -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
apiGatewayManaged
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
connectionId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ConnectionType
connectionType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ContentHandlingStrategy
contentHandlingStrategy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
credentialsArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationMethod
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationResponseSelectionExpression
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationSubtype
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IntegrationType
integrationType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationUri
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe PassthroughBehavior
passthroughBehavior
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
payloadFormatVersion
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
requestParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
requestTemplates
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text (HashMap Text Text))
responseParameters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
templateSelectionExpression
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
timeoutInMillis
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TlsConfig
tlsConfig