{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.CreateIntegration
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates an Integration.
module Amazonka.ApiGatewayV2.CreateIntegration
  ( -- * Creating a Request
    CreateIntegration (..),
    newCreateIntegration,

    -- * Request Lenses
    createIntegration_requestTemplates,
    createIntegration_integrationSubtype,
    createIntegration_credentialsArn,
    createIntegration_integrationUri,
    createIntegration_requestParameters,
    createIntegration_connectionId,
    createIntegration_passthroughBehavior,
    createIntegration_integrationMethod,
    createIntegration_tlsConfig,
    createIntegration_payloadFormatVersion,
    createIntegration_templateSelectionExpression,
    createIntegration_timeoutInMillis,
    createIntegration_contentHandlingStrategy,
    createIntegration_description,
    createIntegration_connectionType,
    createIntegration_responseParameters,
    createIntegration_apiId,
    createIntegration_integrationType,

    -- * Destructuring the Response
    CreateIntegrationResponse' (..),
    newCreateIntegrationResponse',

    -- * Response Lenses
    createIntegrationResponse'_integrationResponseSelectionExpression,
    createIntegrationResponse'_requestTemplates,
    createIntegrationResponse'_integrationSubtype,
    createIntegrationResponse'_credentialsArn,
    createIntegrationResponse'_integrationUri,
    createIntegrationResponse'_integrationId,
    createIntegrationResponse'_requestParameters,
    createIntegrationResponse'_connectionId,
    createIntegrationResponse'_passthroughBehavior,
    createIntegrationResponse'_integrationMethod,
    createIntegrationResponse'_tlsConfig,
    createIntegrationResponse'_payloadFormatVersion,
    createIntegrationResponse'_templateSelectionExpression,
    createIntegrationResponse'_timeoutInMillis,
    createIntegrationResponse'_apiGatewayManaged,
    createIntegrationResponse'_contentHandlingStrategy,
    createIntegrationResponse'_integrationType,
    createIntegrationResponse'_description,
    createIntegrationResponse'_connectionType,
    createIntegrationResponse'_responseParameters,
    createIntegrationResponse'_httpStatus,
  )
where

import Amazonka.ApiGatewayV2.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Creates a new Integration resource to represent an integration.
--
-- /See:/ 'newCreateIntegration' smart constructor.
data CreateIntegration = CreateIntegration'
  { -- | 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.
    CreateIntegration -> Maybe (HashMap Text Text)
requestTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text 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>.
    CreateIntegration -> Maybe Text
integrationSubtype :: Prelude.Maybe Prelude.Text,
    -- | 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.
    CreateIntegration -> Maybe Text
credentialsArn :: Prelude.Maybe Prelude.Text,
    -- | 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.
    CreateIntegration -> Maybe Text
integrationUri :: 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 integrations without a specified integrationSubtype request
    -- parameters are a key-value map specifying how to transform HTTP requests
    -- before sending them to the backend. The key should follow the pattern
    -- \<action>:\<header|querystring|path>.\<location> where 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>.
    CreateIntegration -> Maybe (HashMap Text Text)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The ID of the VPC link for a private integration. Supported only for
    -- HTTP APIs.
    CreateIntegration -> Maybe Text
connectionId :: 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.
    CreateIntegration -> Maybe PassthroughBehavior
passthroughBehavior :: Prelude.Maybe PassthroughBehavior,
    -- | Specifies the integration\'s HTTP method type.
    CreateIntegration -> Maybe Text
integrationMethod :: Prelude.Maybe Prelude.Text,
    -- | 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.
    CreateIntegration -> Maybe TlsConfigInput
tlsConfig :: Prelude.Maybe TlsConfigInput,
    -- | Specifies the format of the payload sent to an integration. Required for
    -- HTTP APIs.
    CreateIntegration -> Maybe Text
payloadFormatVersion :: Prelude.Maybe Prelude.Text,
    -- | The template selection expression for the integration.
    CreateIntegration -> 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.
    CreateIntegration -> Maybe Natural
timeoutInMillis :: Prelude.Maybe Prelude.Natural,
    -- | 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.
    CreateIntegration -> Maybe ContentHandlingStrategy
contentHandlingStrategy :: Prelude.Maybe ContentHandlingStrategy,
    -- | The description of the integration.
    CreateIntegration -> Maybe Text
description :: 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.
    CreateIntegration -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
    -- | 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>.
    CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | The API identifier.
    CreateIntegration -> Text
apiId :: 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. For HTTP API private
    -- integrations, use an 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.
    CreateIntegration -> IntegrationType
integrationType :: IntegrationType
  }
  deriving (CreateIntegration -> CreateIntegration -> Bool
(CreateIntegration -> CreateIntegration -> Bool)
-> (CreateIntegration -> CreateIntegration -> Bool)
-> Eq CreateIntegration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIntegration -> CreateIntegration -> Bool
$c/= :: CreateIntegration -> CreateIntegration -> Bool
== :: CreateIntegration -> CreateIntegration -> Bool
$c== :: CreateIntegration -> CreateIntegration -> Bool
Prelude.Eq, ReadPrec [CreateIntegration]
ReadPrec CreateIntegration
Int -> ReadS CreateIntegration
ReadS [CreateIntegration]
(Int -> ReadS CreateIntegration)
-> ReadS [CreateIntegration]
-> ReadPrec CreateIntegration
-> ReadPrec [CreateIntegration]
-> Read CreateIntegration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIntegration]
$creadListPrec :: ReadPrec [CreateIntegration]
readPrec :: ReadPrec CreateIntegration
$creadPrec :: ReadPrec CreateIntegration
readList :: ReadS [CreateIntegration]
$creadList :: ReadS [CreateIntegration]
readsPrec :: Int -> ReadS CreateIntegration
$creadsPrec :: Int -> ReadS CreateIntegration
Prelude.Read, Int -> CreateIntegration -> ShowS
[CreateIntegration] -> ShowS
CreateIntegration -> String
(Int -> CreateIntegration -> ShowS)
-> (CreateIntegration -> String)
-> ([CreateIntegration] -> ShowS)
-> Show CreateIntegration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIntegration] -> ShowS
$cshowList :: [CreateIntegration] -> ShowS
show :: CreateIntegration -> String
$cshow :: CreateIntegration -> String
showsPrec :: Int -> CreateIntegration -> ShowS
$cshowsPrec :: Int -> CreateIntegration -> ShowS
Prelude.Show, (forall x. CreateIntegration -> Rep CreateIntegration x)
-> (forall x. Rep CreateIntegration x -> CreateIntegration)
-> Generic CreateIntegration
forall x. Rep CreateIntegration x -> CreateIntegration
forall x. CreateIntegration -> Rep CreateIntegration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateIntegration x -> CreateIntegration
$cfrom :: forall x. CreateIntegration -> Rep CreateIntegration x
Prelude.Generic)

-- |
-- Create a value of 'CreateIntegration' 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:
--
-- 'requestTemplates', 'createIntegration_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.
--
-- 'integrationSubtype', 'createIntegration_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>.
--
-- 'credentialsArn', 'createIntegration_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.
--
-- 'integrationUri', 'createIntegration_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.
--
-- 'requestParameters', 'createIntegration_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 integrations without a specified integrationSubtype request
-- parameters are a key-value map specifying how to transform HTTP requests
-- before sending them to the backend. The key should follow the pattern
-- \<action>:\<header|querystring|path>.\<location> where 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>.
--
-- 'connectionId', 'createIntegration_connectionId' - The ID of the VPC link for a private integration. Supported only for
-- HTTP APIs.
--
-- 'passthroughBehavior', 'createIntegration_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.
--
-- 'integrationMethod', 'createIntegration_integrationMethod' - Specifies the integration\'s HTTP method type.
--
-- 'tlsConfig', 'createIntegration_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.
--
-- 'payloadFormatVersion', 'createIntegration_payloadFormatVersion' - Specifies the format of the payload sent to an integration. Required for
-- HTTP APIs.
--
-- 'templateSelectionExpression', 'createIntegration_templateSelectionExpression' - The template selection expression for the integration.
--
-- 'timeoutInMillis', 'createIntegration_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.
--
-- 'contentHandlingStrategy', 'createIntegration_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.
--
-- 'description', 'createIntegration_description' - The description of the integration.
--
-- 'connectionType', 'createIntegration_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.
--
-- 'responseParameters', 'createIntegration_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>.
--
-- 'apiId', 'createIntegration_apiId' - The API identifier.
--
-- 'integrationType', 'createIntegration_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. For HTTP API private
-- integrations, use an 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.
newCreateIntegration ::
  -- | 'apiId'
  Prelude.Text ->
  -- | 'integrationType'
  IntegrationType ->
  CreateIntegration
newCreateIntegration :: Text -> IntegrationType -> CreateIntegration
newCreateIntegration Text
pApiId_ IntegrationType
pIntegrationType_ =
  CreateIntegration' :: Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe PassthroughBehavior
-> Maybe Text
-> Maybe TlsConfigInput
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe ConnectionType
-> Maybe (HashMap Text (HashMap Text Text))
-> Text
-> IntegrationType
-> CreateIntegration
CreateIntegration'
    { $sel:requestTemplates:CreateIntegration' :: Maybe (HashMap Text Text)
requestTemplates =
        Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationSubtype:CreateIntegration' :: Maybe Text
integrationSubtype = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:credentialsArn:CreateIntegration' :: Maybe Text
credentialsArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationUri:CreateIntegration' :: Maybe Text
integrationUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestParameters:CreateIntegration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionId:CreateIntegration' :: Maybe Text
connectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:passthroughBehavior:CreateIntegration' :: Maybe PassthroughBehavior
passthroughBehavior = Maybe PassthroughBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationMethod:CreateIntegration' :: Maybe Text
integrationMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tlsConfig:CreateIntegration' :: Maybe TlsConfigInput
tlsConfig = Maybe TlsConfigInput
forall a. Maybe a
Prelude.Nothing,
      $sel:payloadFormatVersion:CreateIntegration' :: Maybe Text
payloadFormatVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateSelectionExpression:CreateIntegration' :: Maybe Text
templateSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMillis:CreateIntegration' :: Maybe Natural
timeoutInMillis = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:contentHandlingStrategy:CreateIntegration' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateIntegration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionType:CreateIntegration' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
forall a. Maybe a
Prelude.Nothing,
      $sel:responseParameters:CreateIntegration' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
      $sel:apiId:CreateIntegration' :: Text
apiId = Text
pApiId_,
      $sel:integrationType:CreateIntegration' :: IntegrationType
integrationType = IntegrationType
pIntegrationType_
    }

-- | 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.
createIntegration_requestTemplates :: Lens.Lens' CreateIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegration_requestTemplates :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIntegration -> f CreateIntegration
createIntegration_requestTemplates = (CreateIntegration -> Maybe (HashMap Text Text))
-> (CreateIntegration
    -> Maybe (HashMap Text Text) -> CreateIntegration)
-> Lens
     CreateIntegration
     CreateIntegration
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe (HashMap Text Text)
requestTemplates :: Maybe (HashMap Text Text)
$sel:requestTemplates:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
requestTemplates} -> Maybe (HashMap Text Text)
requestTemplates) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe (HashMap Text Text)
a -> CreateIntegration
s {$sel:requestTemplates:CreateIntegration' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
a} :: CreateIntegration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateIntegration -> f CreateIntegration)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIntegration
-> f CreateIntegration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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>.
createIntegration_integrationSubtype :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_integrationSubtype :: (Maybe Text -> f (Maybe Text))
-> CreateIntegration -> f CreateIntegration
createIntegration_integrationSubtype = (CreateIntegration -> Maybe Text)
-> (CreateIntegration -> Maybe Text -> CreateIntegration)
-> Lens
     CreateIntegration CreateIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
integrationSubtype :: Maybe Text
$sel:integrationSubtype:CreateIntegration' :: CreateIntegration -> Maybe Text
integrationSubtype} -> Maybe Text
integrationSubtype) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:integrationSubtype:CreateIntegration' :: Maybe Text
integrationSubtype = Maybe Text
a} :: CreateIntegration)

-- | 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.
createIntegration_credentialsArn :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_credentialsArn :: (Maybe Text -> f (Maybe Text))
-> CreateIntegration -> f CreateIntegration
createIntegration_credentialsArn = (CreateIntegration -> Maybe Text)
-> (CreateIntegration -> Maybe Text -> CreateIntegration)
-> Lens
     CreateIntegration CreateIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
credentialsArn :: Maybe Text
$sel:credentialsArn:CreateIntegration' :: CreateIntegration -> Maybe Text
credentialsArn} -> Maybe Text
credentialsArn) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:credentialsArn:CreateIntegration' :: Maybe Text
credentialsArn = Maybe Text
a} :: CreateIntegration)

-- | 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.
createIntegration_integrationUri :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_integrationUri :: (Maybe Text -> f (Maybe Text))
-> CreateIntegration -> f CreateIntegration
createIntegration_integrationUri = (CreateIntegration -> Maybe Text)
-> (CreateIntegration -> Maybe Text -> CreateIntegration)
-> Lens
     CreateIntegration CreateIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
integrationUri :: Maybe Text
$sel:integrationUri:CreateIntegration' :: CreateIntegration -> Maybe Text
integrationUri} -> Maybe Text
integrationUri) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:integrationUri:CreateIntegration' :: Maybe Text
integrationUri = Maybe Text
a} :: CreateIntegration)

-- | 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 integrations without a specified integrationSubtype request
-- parameters are a key-value map specifying how to transform HTTP requests
-- before sending them to the backend. The key should follow the pattern
-- \<action>:\<header|querystring|path>.\<location> where 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>.
createIntegration_requestParameters :: Lens.Lens' CreateIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegration_requestParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIntegration -> f CreateIntegration
createIntegration_requestParameters = (CreateIntegration -> Maybe (HashMap Text Text))
-> (CreateIntegration
    -> Maybe (HashMap Text Text) -> CreateIntegration)
-> Lens
     CreateIntegration
     CreateIntegration
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
$sel:requestParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
requestParameters} -> Maybe (HashMap Text Text)
requestParameters) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe (HashMap Text Text)
a -> CreateIntegration
s {$sel:requestParameters:CreateIntegration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
a} :: CreateIntegration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateIntegration -> f CreateIntegration)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIntegration
-> f CreateIntegration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | 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.
createIntegration_passthroughBehavior :: Lens.Lens' CreateIntegration (Prelude.Maybe PassthroughBehavior)
createIntegration_passthroughBehavior :: (Maybe PassthroughBehavior -> f (Maybe PassthroughBehavior))
-> CreateIntegration -> f CreateIntegration
createIntegration_passthroughBehavior = (CreateIntegration -> Maybe PassthroughBehavior)
-> (CreateIntegration
    -> Maybe PassthroughBehavior -> CreateIntegration)
-> Lens
     CreateIntegration
     CreateIntegration
     (Maybe PassthroughBehavior)
     (Maybe PassthroughBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe PassthroughBehavior
passthroughBehavior :: Maybe PassthroughBehavior
$sel:passthroughBehavior:CreateIntegration' :: CreateIntegration -> Maybe PassthroughBehavior
passthroughBehavior} -> Maybe PassthroughBehavior
passthroughBehavior) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe PassthroughBehavior
a -> CreateIntegration
s {$sel:passthroughBehavior:CreateIntegration' :: Maybe PassthroughBehavior
passthroughBehavior = Maybe PassthroughBehavior
a} :: CreateIntegration)

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

-- | 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.
createIntegration_tlsConfig :: Lens.Lens' CreateIntegration (Prelude.Maybe TlsConfigInput)
createIntegration_tlsConfig :: (Maybe TlsConfigInput -> f (Maybe TlsConfigInput))
-> CreateIntegration -> f CreateIntegration
createIntegration_tlsConfig = (CreateIntegration -> Maybe TlsConfigInput)
-> (CreateIntegration -> Maybe TlsConfigInput -> CreateIntegration)
-> Lens
     CreateIntegration
     CreateIntegration
     (Maybe TlsConfigInput)
     (Maybe TlsConfigInput)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe TlsConfigInput
tlsConfig :: Maybe TlsConfigInput
$sel:tlsConfig:CreateIntegration' :: CreateIntegration -> Maybe TlsConfigInput
tlsConfig} -> Maybe TlsConfigInput
tlsConfig) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe TlsConfigInput
a -> CreateIntegration
s {$sel:tlsConfig:CreateIntegration' :: Maybe TlsConfigInput
tlsConfig = Maybe TlsConfigInput
a} :: CreateIntegration)

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

-- | The template selection expression for the integration.
createIntegration_templateSelectionExpression :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_templateSelectionExpression :: (Maybe Text -> f (Maybe Text))
-> CreateIntegration -> f CreateIntegration
createIntegration_templateSelectionExpression = (CreateIntegration -> Maybe Text)
-> (CreateIntegration -> Maybe Text -> CreateIntegration)
-> Lens
     CreateIntegration CreateIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
templateSelectionExpression :: Maybe Text
$sel:templateSelectionExpression:CreateIntegration' :: CreateIntegration -> Maybe Text
templateSelectionExpression} -> Maybe Text
templateSelectionExpression) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:templateSelectionExpression:CreateIntegration' :: Maybe Text
templateSelectionExpression = Maybe Text
a} :: CreateIntegration)

-- | 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.
createIntegration_timeoutInMillis :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Natural)
createIntegration_timeoutInMillis :: (Maybe Natural -> f (Maybe Natural))
-> CreateIntegration -> f CreateIntegration
createIntegration_timeoutInMillis = (CreateIntegration -> Maybe Natural)
-> (CreateIntegration -> Maybe Natural -> CreateIntegration)
-> Lens
     CreateIntegration CreateIntegration (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Natural
timeoutInMillis :: Maybe Natural
$sel:timeoutInMillis:CreateIntegration' :: CreateIntegration -> Maybe Natural
timeoutInMillis} -> Maybe Natural
timeoutInMillis) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Natural
a -> CreateIntegration
s {$sel:timeoutInMillis:CreateIntegration' :: Maybe Natural
timeoutInMillis = Maybe Natural
a} :: CreateIntegration)

-- | 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.
createIntegration_contentHandlingStrategy :: Lens.Lens' CreateIntegration (Prelude.Maybe ContentHandlingStrategy)
createIntegration_contentHandlingStrategy :: (Maybe ContentHandlingStrategy
 -> f (Maybe ContentHandlingStrategy))
-> CreateIntegration -> f CreateIntegration
createIntegration_contentHandlingStrategy = (CreateIntegration -> Maybe ContentHandlingStrategy)
-> (CreateIntegration
    -> Maybe ContentHandlingStrategy -> CreateIntegration)
-> Lens
     CreateIntegration
     CreateIntegration
     (Maybe ContentHandlingStrategy)
     (Maybe ContentHandlingStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe ContentHandlingStrategy
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:contentHandlingStrategy:CreateIntegration' :: CreateIntegration -> Maybe ContentHandlingStrategy
contentHandlingStrategy} -> Maybe ContentHandlingStrategy
contentHandlingStrategy) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe ContentHandlingStrategy
a -> CreateIntegration
s {$sel:contentHandlingStrategy:CreateIntegration' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
a} :: CreateIntegration)

-- | The description of the integration.
createIntegration_description :: Lens.Lens' CreateIntegration (Prelude.Maybe Prelude.Text)
createIntegration_description :: (Maybe Text -> f (Maybe Text))
-> CreateIntegration -> f CreateIntegration
createIntegration_description = (CreateIntegration -> Maybe Text)
-> (CreateIntegration -> Maybe Text -> CreateIntegration)
-> Lens
     CreateIntegration CreateIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe Text
description :: Maybe Text
$sel:description:CreateIntegration' :: CreateIntegration -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe Text
a -> CreateIntegration
s {$sel:description:CreateIntegration' :: Maybe Text
description = Maybe Text
a} :: CreateIntegration)

-- | 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.
createIntegration_connectionType :: Lens.Lens' CreateIntegration (Prelude.Maybe ConnectionType)
createIntegration_connectionType :: (Maybe ConnectionType -> f (Maybe ConnectionType))
-> CreateIntegration -> f CreateIntegration
createIntegration_connectionType = (CreateIntegration -> Maybe ConnectionType)
-> (CreateIntegration -> Maybe ConnectionType -> CreateIntegration)
-> Lens
     CreateIntegration
     CreateIntegration
     (Maybe ConnectionType)
     (Maybe ConnectionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:CreateIntegration' :: CreateIntegration -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe ConnectionType
a -> CreateIntegration
s {$sel:connectionType:CreateIntegration' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: CreateIntegration)

-- | 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>.
createIntegration_responseParameters :: Lens.Lens' CreateIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)))
createIntegration_responseParameters :: (Maybe (HashMap Text (HashMap Text Text))
 -> f (Maybe (HashMap Text (HashMap Text Text))))
-> CreateIntegration -> f CreateIntegration
createIntegration_responseParameters = (CreateIntegration -> Maybe (HashMap Text (HashMap Text Text)))
-> (CreateIntegration
    -> Maybe (HashMap Text (HashMap Text Text)) -> CreateIntegration)
-> Lens
     CreateIntegration
     CreateIntegration
     (Maybe (HashMap Text (HashMap Text Text)))
     (Maybe (HashMap Text (HashMap Text Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
$sel:responseParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
responseParameters} -> Maybe (HashMap Text (HashMap Text Text))
responseParameters) (\s :: CreateIntegration
s@CreateIntegration' {} Maybe (HashMap Text (HashMap Text Text))
a -> CreateIntegration
s {$sel:responseParameters:CreateIntegration' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
a} :: CreateIntegration) ((Maybe (HashMap Text (HashMap Text Text))
  -> f (Maybe (HashMap Text (HashMap Text Text))))
 -> CreateIntegration -> f CreateIntegration)
-> ((Maybe (HashMap Text (HashMap Text Text))
     -> f (Maybe (HashMap Text (HashMap Text Text))))
    -> Maybe (HashMap Text (HashMap Text Text))
    -> f (Maybe (HashMap Text (HashMap Text Text))))
-> (Maybe (HashMap Text (HashMap Text Text))
    -> f (Maybe (HashMap Text (HashMap Text Text))))
-> CreateIntegration
-> f CreateIntegration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
-> Iso
     (Maybe (HashMap Text (HashMap Text Text)))
     (Maybe (HashMap Text (HashMap Text Text)))
     (Maybe (HashMap Text (HashMap Text Text)))
     (Maybe (HashMap Text (HashMap Text Text)))
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 AnIso
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The API identifier.
createIntegration_apiId :: Lens.Lens' CreateIntegration Prelude.Text
createIntegration_apiId :: (Text -> f Text) -> CreateIntegration -> f CreateIntegration
createIntegration_apiId = (CreateIntegration -> Text)
-> (CreateIntegration -> Text -> CreateIntegration)
-> Lens CreateIntegration CreateIntegration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {Text
apiId :: Text
$sel:apiId:CreateIntegration' :: CreateIntegration -> Text
apiId} -> Text
apiId) (\s :: CreateIntegration
s@CreateIntegration' {} Text
a -> CreateIntegration
s {$sel:apiId:CreateIntegration' :: Text
apiId = Text
a} :: CreateIntegration)

-- | 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. For HTTP API private
-- integrations, use an 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.
createIntegration_integrationType :: Lens.Lens' CreateIntegration IntegrationType
createIntegration_integrationType :: (IntegrationType -> f IntegrationType)
-> CreateIntegration -> f CreateIntegration
createIntegration_integrationType = (CreateIntegration -> IntegrationType)
-> (CreateIntegration -> IntegrationType -> CreateIntegration)
-> Lens
     CreateIntegration CreateIntegration IntegrationType IntegrationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegration' {IntegrationType
integrationType :: IntegrationType
$sel:integrationType:CreateIntegration' :: CreateIntegration -> IntegrationType
integrationType} -> IntegrationType
integrationType) (\s :: CreateIntegration
s@CreateIntegration' {} IntegrationType
a -> CreateIntegration
s {$sel:integrationType:CreateIntegration' :: IntegrationType
integrationType = IntegrationType
a} :: CreateIntegration)

instance Core.AWSRequest CreateIntegration where
  type
    AWSResponse CreateIntegration =
      CreateIntegrationResponse'
  request :: CreateIntegration -> Request CreateIntegration
request = Service -> CreateIntegration -> Request CreateIntegration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateIntegration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateIntegration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateIntegration))
-> Logger
-> Service
-> Proxy CreateIntegration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateIntegration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe PassthroughBehavior
-> Maybe Text
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Bool
-> Maybe ContentHandlingStrategy
-> Maybe IntegrationType
-> Maybe Text
-> Maybe ConnectionType
-> Maybe (HashMap Text (HashMap Text Text))
-> Int
-> CreateIntegrationResponse'
CreateIntegrationResponse''
            (Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe PassthroughBehavior
 -> Maybe Text
 -> Maybe TlsConfig
 -> Maybe Text
 -> Maybe Text
 -> Maybe Natural
 -> Maybe Bool
 -> Maybe ContentHandlingStrategy
 -> Maybe IntegrationType
 -> Maybe Text
 -> Maybe ConnectionType
 -> Maybe (HashMap Text (HashMap Text Text))
 -> Int
 -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe PassthroughBehavior
      -> Maybe Text
      -> Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"integrationResponseSelectionExpression")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe PassthroughBehavior
   -> Maybe Text
   -> Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe PassthroughBehavior
      -> Maybe Text
      -> Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"requestTemplates"
                            Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe PassthroughBehavior
   -> Maybe Text
   -> Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe PassthroughBehavior
      -> Maybe Text
      -> Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"integrationSubtype")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe PassthroughBehavior
   -> Maybe Text
   -> Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe PassthroughBehavior
      -> Maybe Text
      -> Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"credentialsArn")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe PassthroughBehavior
   -> Maybe Text
   -> Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe PassthroughBehavior
      -> Maybe Text
      -> Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"integrationUri")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe PassthroughBehavior
   -> Maybe Text
   -> Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe PassthroughBehavior
      -> Maybe Text
      -> Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"integrationId")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe PassthroughBehavior
   -> Maybe Text
   -> Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe (HashMap Text Text))
-> Either
     String
     (Maybe Text
      -> Maybe PassthroughBehavior
      -> Maybe Text
      -> Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"requestParameters"
                            Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe PassthroughBehavior
   -> Maybe Text
   -> Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe PassthroughBehavior
      -> Maybe Text
      -> Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"connectionId")
            Either
  String
  (Maybe PassthroughBehavior
   -> Maybe Text
   -> Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe PassthroughBehavior)
-> Either
     String
     (Maybe Text
      -> Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe PassthroughBehavior)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"passthroughBehavior")
            Either
  String
  (Maybe Text
   -> Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe TlsConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"integrationMethod")
            Either
  String
  (Maybe TlsConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe TlsConfig)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe TlsConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tlsConfig")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"payloadFormatVersion")
            Either
  String
  (Maybe Text
   -> Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"templateSelectionExpression")
            Either
  String
  (Maybe Natural
   -> Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"timeoutInMillis")
            Either
  String
  (Maybe Bool
   -> Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"apiGatewayManaged")
            Either
  String
  (Maybe ContentHandlingStrategy
   -> Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe ContentHandlingStrategy)
-> Either
     String
     (Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ContentHandlingStrategy)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"contentHandlingStrategy")
            Either
  String
  (Maybe IntegrationType
   -> Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe IntegrationType)
-> Either
     String
     (Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe IntegrationType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"integrationType")
            Either
  String
  (Maybe Text
   -> Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            Either
  String
  (Maybe ConnectionType
   -> Maybe (HashMap Text (HashMap Text Text))
   -> Int
   -> CreateIntegrationResponse')
-> Either String (Maybe ConnectionType)
-> Either
     String
     (Maybe (HashMap Text (HashMap Text Text))
      -> Int -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ConnectionType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"connectionType")
            Either
  String
  (Maybe (HashMap Text (HashMap Text Text))
   -> Int -> CreateIntegrationResponse')
-> Either String (Maybe (HashMap Text (HashMap Text Text)))
-> Either String (Int -> CreateIntegrationResponse')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe (Maybe (HashMap Text (HashMap Text Text))))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"responseParameters"
                            Either String (Maybe (Maybe (HashMap Text (HashMap Text Text))))
-> Maybe (HashMap Text (HashMap Text Text))
-> Either String (Maybe (HashMap Text (HashMap Text Text)))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text (HashMap Text Text))
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> CreateIntegrationResponse')
-> Either String Int -> Either String CreateIntegrationResponse'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateIntegration

instance Prelude.NFData CreateIntegration

instance Core.ToHeaders CreateIntegration where
  toHeaders :: CreateIntegration -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateIntegration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateIntegration where
  toJSON :: CreateIntegration -> Value
toJSON CreateIntegration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe PassthroughBehavior
Maybe TlsConfigInput
Text
IntegrationType
integrationType :: IntegrationType
apiId :: Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
connectionType :: Maybe ConnectionType
description :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
timeoutInMillis :: Maybe Natural
templateSelectionExpression :: Maybe Text
payloadFormatVersion :: Maybe Text
tlsConfig :: Maybe TlsConfigInput
integrationMethod :: Maybe Text
passthroughBehavior :: Maybe PassthroughBehavior
connectionId :: Maybe Text
requestParameters :: Maybe (HashMap Text Text)
integrationUri :: Maybe Text
credentialsArn :: Maybe Text
integrationSubtype :: Maybe Text
requestTemplates :: Maybe (HashMap Text Text)
$sel:integrationType:CreateIntegration' :: CreateIntegration -> IntegrationType
$sel:apiId:CreateIntegration' :: CreateIntegration -> Text
$sel:responseParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
$sel:connectionType:CreateIntegration' :: CreateIntegration -> Maybe ConnectionType
$sel:description:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:contentHandlingStrategy:CreateIntegration' :: CreateIntegration -> Maybe ContentHandlingStrategy
$sel:timeoutInMillis:CreateIntegration' :: CreateIntegration -> Maybe Natural
$sel:templateSelectionExpression:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:payloadFormatVersion:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:tlsConfig:CreateIntegration' :: CreateIntegration -> Maybe TlsConfigInput
$sel:integrationMethod:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:passthroughBehavior:CreateIntegration' :: CreateIntegration -> Maybe PassthroughBehavior
$sel:connectionId:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:requestParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:integrationUri:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:credentialsArn:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationSubtype:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:requestTemplates:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"requestTemplates" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
requestTemplates,
            (Text
"integrationSubtype" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
integrationSubtype,
            (Text
"credentialsArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
credentialsArn,
            (Text
"integrationUri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
integrationUri,
            (Text
"requestParameters" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
requestParameters,
            (Text
"connectionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
connectionId,
            (Text
"passthroughBehavior" Text -> PassthroughBehavior -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (PassthroughBehavior -> Pair)
-> Maybe PassthroughBehavior -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PassthroughBehavior
passthroughBehavior,
            (Text
"integrationMethod" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
integrationMethod,
            (Text
"tlsConfig" Text -> TlsConfigInput -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TlsConfigInput -> Pair) -> Maybe TlsConfigInput -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TlsConfigInput
tlsConfig,
            (Text
"payloadFormatVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
payloadFormatVersion,
            (Text
"templateSelectionExpression" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
templateSelectionExpression,
            (Text
"timeoutInMillis" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
timeoutInMillis,
            (Text
"contentHandlingStrategy" Text -> ContentHandlingStrategy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ContentHandlingStrategy -> Pair)
-> Maybe ContentHandlingStrategy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContentHandlingStrategy
contentHandlingStrategy,
            (Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Text
"connectionType" Text -> ConnectionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ConnectionType -> Pair) -> Maybe ConnectionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ConnectionType
connectionType,
            (Text
"responseParameters" Text -> HashMap Text (HashMap Text Text) -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HashMap Text (HashMap Text Text) -> Pair)
-> Maybe (HashMap Text (HashMap Text Text)) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text (HashMap Text Text))
responseParameters,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"integrationType" Text -> IntegrationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= IntegrationType
integrationType)
          ]
      )

instance Core.ToPath CreateIntegration where
  toPath :: CreateIntegration -> ByteString
toPath CreateIntegration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe PassthroughBehavior
Maybe TlsConfigInput
Text
IntegrationType
integrationType :: IntegrationType
apiId :: Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
connectionType :: Maybe ConnectionType
description :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
timeoutInMillis :: Maybe Natural
templateSelectionExpression :: Maybe Text
payloadFormatVersion :: Maybe Text
tlsConfig :: Maybe TlsConfigInput
integrationMethod :: Maybe Text
passthroughBehavior :: Maybe PassthroughBehavior
connectionId :: Maybe Text
requestParameters :: Maybe (HashMap Text Text)
integrationUri :: Maybe Text
credentialsArn :: Maybe Text
integrationSubtype :: Maybe Text
requestTemplates :: Maybe (HashMap Text Text)
$sel:integrationType:CreateIntegration' :: CreateIntegration -> IntegrationType
$sel:apiId:CreateIntegration' :: CreateIntegration -> Text
$sel:responseParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text (HashMap Text Text))
$sel:connectionType:CreateIntegration' :: CreateIntegration -> Maybe ConnectionType
$sel:description:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:contentHandlingStrategy:CreateIntegration' :: CreateIntegration -> Maybe ContentHandlingStrategy
$sel:timeoutInMillis:CreateIntegration' :: CreateIntegration -> Maybe Natural
$sel:templateSelectionExpression:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:payloadFormatVersion:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:tlsConfig:CreateIntegration' :: CreateIntegration -> Maybe TlsConfigInput
$sel:integrationMethod:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:passthroughBehavior:CreateIntegration' :: CreateIntegration -> Maybe PassthroughBehavior
$sel:connectionId:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:requestParameters:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
$sel:integrationUri:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:credentialsArn:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:integrationSubtype:CreateIntegration' :: CreateIntegration -> Maybe Text
$sel:requestTemplates:CreateIntegration' :: CreateIntegration -> Maybe (HashMap Text Text)
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/v2/apis/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
apiId, ByteString
"/integrations"]

instance Core.ToQuery CreateIntegration where
  toQuery :: CreateIntegration -> QueryString
toQuery = QueryString -> CreateIntegration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreateIntegrationResponse'' smart constructor.
data CreateIntegrationResponse' = CreateIntegrationResponse''
  { -- | 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>.
    CreateIntegrationResponse' -> Maybe Text
integrationResponseSelectionExpression :: Prelude.Maybe 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.
    CreateIntegrationResponse' -> Maybe (HashMap Text Text)
requestTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text 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>.
    CreateIntegrationResponse' -> Maybe Text
integrationSubtype :: Prelude.Maybe Prelude.Text,
    -- | 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.
    CreateIntegrationResponse' -> Maybe Text
credentialsArn :: Prelude.Maybe Prelude.Text,
    -- | 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.
    CreateIntegrationResponse' -> Maybe Text
integrationUri :: Prelude.Maybe Prelude.Text,
    -- | Represents the identifier of an integration.
    CreateIntegrationResponse' -> Maybe Text
integrationId :: 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>.
    CreateIntegrationResponse' -> Maybe (HashMap Text Text)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The ID of the VPC link for a private integration. Supported only for
    -- HTTP APIs.
    CreateIntegrationResponse' -> Maybe Text
connectionId :: 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.
    CreateIntegrationResponse' -> Maybe PassthroughBehavior
passthroughBehavior :: Prelude.Maybe PassthroughBehavior,
    -- | Specifies the integration\'s HTTP method type.
    CreateIntegrationResponse' -> Maybe Text
integrationMethod :: Prelude.Maybe Prelude.Text,
    -- | 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.
    CreateIntegrationResponse' -> Maybe TlsConfig
tlsConfig :: Prelude.Maybe TlsConfig,
    -- | Specifies the format of the payload sent to an integration. Required for
    -- HTTP APIs.
    CreateIntegrationResponse' -> Maybe Text
payloadFormatVersion :: Prelude.Maybe Prelude.Text,
    -- | The template selection expression for the integration. Supported only
    -- for WebSocket APIs.
    CreateIntegrationResponse' -> 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.
    CreateIntegrationResponse' -> Maybe Natural
timeoutInMillis :: Prelude.Maybe Prelude.Natural,
    -- | 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.
    CreateIntegrationResponse' -> Maybe Bool
apiGatewayManaged :: Prelude.Maybe Prelude.Bool,
    -- | 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.
    CreateIntegrationResponse' -> Maybe ContentHandlingStrategy
contentHandlingStrategy :: Prelude.Maybe ContentHandlingStrategy,
    -- | 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.
    CreateIntegrationResponse' -> Maybe IntegrationType
integrationType :: Prelude.Maybe IntegrationType,
    -- | Represents the description of an integration.
    CreateIntegrationResponse' -> Maybe Text
description :: 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.
    CreateIntegrationResponse' -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
    -- | 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>.
    CreateIntegrationResponse'
-> Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | The response's http status code.
    CreateIntegrationResponse' -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
(CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool)
-> (CreateIntegrationResponse'
    -> CreateIntegrationResponse' -> Bool)
-> Eq CreateIntegrationResponse'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
$c/= :: CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
== :: CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
$c== :: CreateIntegrationResponse' -> CreateIntegrationResponse' -> Bool
Prelude.Eq, ReadPrec [CreateIntegrationResponse']
ReadPrec CreateIntegrationResponse'
Int -> ReadS CreateIntegrationResponse'
ReadS [CreateIntegrationResponse']
(Int -> ReadS CreateIntegrationResponse')
-> ReadS [CreateIntegrationResponse']
-> ReadPrec CreateIntegrationResponse'
-> ReadPrec [CreateIntegrationResponse']
-> Read CreateIntegrationResponse'
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIntegrationResponse']
$creadListPrec :: ReadPrec [CreateIntegrationResponse']
readPrec :: ReadPrec CreateIntegrationResponse'
$creadPrec :: ReadPrec CreateIntegrationResponse'
readList :: ReadS [CreateIntegrationResponse']
$creadList :: ReadS [CreateIntegrationResponse']
readsPrec :: Int -> ReadS CreateIntegrationResponse'
$creadsPrec :: Int -> ReadS CreateIntegrationResponse'
Prelude.Read, Int -> CreateIntegrationResponse' -> ShowS
[CreateIntegrationResponse'] -> ShowS
CreateIntegrationResponse' -> String
(Int -> CreateIntegrationResponse' -> ShowS)
-> (CreateIntegrationResponse' -> String)
-> ([CreateIntegrationResponse'] -> ShowS)
-> Show CreateIntegrationResponse'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIntegrationResponse'] -> ShowS
$cshowList :: [CreateIntegrationResponse'] -> ShowS
show :: CreateIntegrationResponse' -> String
$cshow :: CreateIntegrationResponse' -> String
showsPrec :: Int -> CreateIntegrationResponse' -> ShowS
$cshowsPrec :: Int -> CreateIntegrationResponse' -> ShowS
Prelude.Show, (forall x.
 CreateIntegrationResponse' -> Rep CreateIntegrationResponse' x)
-> (forall x.
    Rep CreateIntegrationResponse' x -> CreateIntegrationResponse')
-> Generic CreateIntegrationResponse'
forall x.
Rep CreateIntegrationResponse' x -> CreateIntegrationResponse'
forall x.
CreateIntegrationResponse' -> Rep CreateIntegrationResponse' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateIntegrationResponse' x -> CreateIntegrationResponse'
$cfrom :: forall x.
CreateIntegrationResponse' -> Rep CreateIntegrationResponse' x
Prelude.Generic)

-- |
-- Create a value of 'CreateIntegrationResponse'' 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:
--
-- 'integrationResponseSelectionExpression', 'createIntegrationResponse'_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>.
--
-- 'requestTemplates', 'createIntegrationResponse'_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.
--
-- 'integrationSubtype', 'createIntegrationResponse'_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>.
--
-- 'credentialsArn', 'createIntegrationResponse'_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.
--
-- 'integrationUri', 'createIntegrationResponse'_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.
--
-- 'integrationId', 'createIntegrationResponse'_integrationId' - Represents the identifier of an integration.
--
-- 'requestParameters', 'createIntegrationResponse'_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>.
--
-- 'connectionId', 'createIntegrationResponse'_connectionId' - The ID of the VPC link for a private integration. Supported only for
-- HTTP APIs.
--
-- 'passthroughBehavior', 'createIntegrationResponse'_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.
--
-- 'integrationMethod', 'createIntegrationResponse'_integrationMethod' - Specifies the integration\'s HTTP method type.
--
-- 'tlsConfig', 'createIntegrationResponse'_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.
--
-- 'payloadFormatVersion', 'createIntegrationResponse'_payloadFormatVersion' - Specifies the format of the payload sent to an integration. Required for
-- HTTP APIs.
--
-- 'templateSelectionExpression', 'createIntegrationResponse'_templateSelectionExpression' - The template selection expression for the integration. Supported only
-- for WebSocket APIs.
--
-- 'timeoutInMillis', 'createIntegrationResponse'_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.
--
-- 'apiGatewayManaged', 'createIntegrationResponse'_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.
--
-- 'contentHandlingStrategy', 'createIntegrationResponse'_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.
--
-- 'integrationType', 'createIntegrationResponse'_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.
--
-- 'description', 'createIntegrationResponse'_description' - Represents the description of an integration.
--
-- 'connectionType', 'createIntegrationResponse'_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.
--
-- 'responseParameters', 'createIntegrationResponse'_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>.
--
-- 'httpStatus', 'createIntegrationResponse'_httpStatus' - The response's http status code.
newCreateIntegrationResponse' ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateIntegrationResponse'
newCreateIntegrationResponse' :: Int -> CreateIntegrationResponse'
newCreateIntegrationResponse' Int
pHttpStatus_ =
  CreateIntegrationResponse'' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe PassthroughBehavior
-> Maybe Text
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Bool
-> Maybe ContentHandlingStrategy
-> Maybe IntegrationType
-> Maybe Text
-> Maybe ConnectionType
-> Maybe (HashMap Text (HashMap Text Text))
-> Int
-> CreateIntegrationResponse'
CreateIntegrationResponse''
    { $sel:integrationResponseSelectionExpression:CreateIntegrationResponse'' :: Maybe Text
integrationResponseSelectionExpression =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestTemplates:CreateIntegrationResponse'' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationSubtype:CreateIntegrationResponse'' :: Maybe Text
integrationSubtype = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:credentialsArn:CreateIntegrationResponse'' :: Maybe Text
credentialsArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationUri:CreateIntegrationResponse'' :: Maybe Text
integrationUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationId:CreateIntegrationResponse'' :: Maybe Text
integrationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestParameters:CreateIntegrationResponse'' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionId:CreateIntegrationResponse'' :: Maybe Text
connectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:passthroughBehavior:CreateIntegrationResponse'' :: Maybe PassthroughBehavior
passthroughBehavior = Maybe PassthroughBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationMethod:CreateIntegrationResponse'' :: Maybe Text
integrationMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tlsConfig:CreateIntegrationResponse'' :: Maybe TlsConfig
tlsConfig = Maybe TlsConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:payloadFormatVersion:CreateIntegrationResponse'' :: Maybe Text
payloadFormatVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateSelectionExpression:CreateIntegrationResponse'' :: Maybe Text
templateSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMillis:CreateIntegrationResponse'' :: Maybe Natural
timeoutInMillis = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:apiGatewayManaged:CreateIntegrationResponse'' :: Maybe Bool
apiGatewayManaged = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:contentHandlingStrategy:CreateIntegrationResponse'' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationType:CreateIntegrationResponse'' :: Maybe IntegrationType
integrationType = Maybe IntegrationType
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateIntegrationResponse'' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionType:CreateIntegrationResponse'' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
forall a. Maybe a
Prelude.Nothing,
      $sel:responseParameters:CreateIntegrationResponse'' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateIntegrationResponse'' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | 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>.
createIntegrationResponse'_integrationResponseSelectionExpression :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_integrationResponseSelectionExpression :: (Maybe Text -> f (Maybe Text))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_integrationResponseSelectionExpression = (CreateIntegrationResponse' -> Maybe Text)
-> (CreateIntegrationResponse'
    -> Maybe Text -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
integrationResponseSelectionExpression :: Maybe Text
$sel:integrationResponseSelectionExpression:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
integrationResponseSelectionExpression} -> Maybe Text
integrationResponseSelectionExpression) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:integrationResponseSelectionExpression:CreateIntegrationResponse'' :: Maybe Text
integrationResponseSelectionExpression = Maybe Text
a} :: CreateIntegrationResponse')

-- | 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.
createIntegrationResponse'_requestTemplates :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegrationResponse'_requestTemplates :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_requestTemplates = (CreateIntegrationResponse' -> Maybe (HashMap Text Text))
-> (CreateIntegrationResponse'
    -> Maybe (HashMap Text Text) -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe (HashMap Text Text)
requestTemplates :: Maybe (HashMap Text Text)
$sel:requestTemplates:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe (HashMap Text Text)
requestTemplates} -> Maybe (HashMap Text Text)
requestTemplates) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe (HashMap Text Text)
a -> CreateIntegrationResponse'
s {$sel:requestTemplates:CreateIntegrationResponse'' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
a} :: CreateIntegrationResponse') ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateIntegrationResponse' -> f CreateIntegrationResponse')
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIntegrationResponse'
-> f CreateIntegrationResponse'
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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>.
createIntegrationResponse'_integrationSubtype :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_integrationSubtype :: (Maybe Text -> f (Maybe Text))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_integrationSubtype = (CreateIntegrationResponse' -> Maybe Text)
-> (CreateIntegrationResponse'
    -> Maybe Text -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
integrationSubtype :: Maybe Text
$sel:integrationSubtype:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
integrationSubtype} -> Maybe Text
integrationSubtype) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:integrationSubtype:CreateIntegrationResponse'' :: Maybe Text
integrationSubtype = Maybe Text
a} :: CreateIntegrationResponse')

-- | 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.
createIntegrationResponse'_credentialsArn :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_credentialsArn :: (Maybe Text -> f (Maybe Text))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_credentialsArn = (CreateIntegrationResponse' -> Maybe Text)
-> (CreateIntegrationResponse'
    -> Maybe Text -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
credentialsArn :: Maybe Text
$sel:credentialsArn:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
credentialsArn} -> Maybe Text
credentialsArn) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:credentialsArn:CreateIntegrationResponse'' :: Maybe Text
credentialsArn = Maybe Text
a} :: CreateIntegrationResponse')

-- | 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.
createIntegrationResponse'_integrationUri :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Text)
createIntegrationResponse'_integrationUri :: (Maybe Text -> f (Maybe Text))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_integrationUri = (CreateIntegrationResponse' -> Maybe Text)
-> (CreateIntegrationResponse'
    -> Maybe Text -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Text
integrationUri :: Maybe Text
$sel:integrationUri:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Text
integrationUri} -> Maybe Text
integrationUri) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Text
a -> CreateIntegrationResponse'
s {$sel:integrationUri:CreateIntegrationResponse'' :: Maybe Text
integrationUri = Maybe Text
a} :: CreateIntegrationResponse')

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

-- | 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>.
createIntegrationResponse'_requestParameters :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegrationResponse'_requestParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_requestParameters = (CreateIntegrationResponse' -> Maybe (HashMap Text Text))
-> (CreateIntegrationResponse'
    -> Maybe (HashMap Text Text) -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
$sel:requestParameters:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe (HashMap Text Text)
requestParameters} -> Maybe (HashMap Text Text)
requestParameters) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe (HashMap Text Text)
a -> CreateIntegrationResponse'
s {$sel:requestParameters:CreateIntegrationResponse'' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
a} :: CreateIntegrationResponse') ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateIntegrationResponse' -> f CreateIntegrationResponse')
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateIntegrationResponse'
-> f CreateIntegrationResponse'
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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 AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

-- | 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.
createIntegrationResponse'_passthroughBehavior :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe PassthroughBehavior)
createIntegrationResponse'_passthroughBehavior :: (Maybe PassthroughBehavior -> f (Maybe PassthroughBehavior))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_passthroughBehavior = (CreateIntegrationResponse' -> Maybe PassthroughBehavior)
-> (CreateIntegrationResponse'
    -> Maybe PassthroughBehavior -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe PassthroughBehavior)
     (Maybe PassthroughBehavior)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe PassthroughBehavior
passthroughBehavior :: Maybe PassthroughBehavior
$sel:passthroughBehavior:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe PassthroughBehavior
passthroughBehavior} -> Maybe PassthroughBehavior
passthroughBehavior) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe PassthroughBehavior
a -> CreateIntegrationResponse'
s {$sel:passthroughBehavior:CreateIntegrationResponse'' :: Maybe PassthroughBehavior
passthroughBehavior = Maybe PassthroughBehavior
a} :: CreateIntegrationResponse')

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

-- | 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.
createIntegrationResponse'_tlsConfig :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe TlsConfig)
createIntegrationResponse'_tlsConfig :: (Maybe TlsConfig -> f (Maybe TlsConfig))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_tlsConfig = (CreateIntegrationResponse' -> Maybe TlsConfig)
-> (CreateIntegrationResponse'
    -> Maybe TlsConfig -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe TlsConfig)
     (Maybe TlsConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe TlsConfig
tlsConfig :: Maybe TlsConfig
$sel:tlsConfig:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe TlsConfig
tlsConfig} -> Maybe TlsConfig
tlsConfig) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe TlsConfig
a -> CreateIntegrationResponse'
s {$sel:tlsConfig:CreateIntegrationResponse'' :: Maybe TlsConfig
tlsConfig = Maybe TlsConfig
a} :: CreateIntegrationResponse')

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

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

-- | 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.
createIntegrationResponse'_timeoutInMillis :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Natural)
createIntegrationResponse'_timeoutInMillis :: (Maybe Natural -> f (Maybe Natural))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_timeoutInMillis = (CreateIntegrationResponse' -> Maybe Natural)
-> (CreateIntegrationResponse'
    -> Maybe Natural -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Natural
timeoutInMillis :: Maybe Natural
$sel:timeoutInMillis:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Natural
timeoutInMillis} -> Maybe Natural
timeoutInMillis) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Natural
a -> CreateIntegrationResponse'
s {$sel:timeoutInMillis:CreateIntegrationResponse'' :: Maybe Natural
timeoutInMillis = Maybe Natural
a} :: CreateIntegrationResponse')

-- | 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.
createIntegrationResponse'_apiGatewayManaged :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe Prelude.Bool)
createIntegrationResponse'_apiGatewayManaged :: (Maybe Bool -> f (Maybe Bool))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_apiGatewayManaged = (CreateIntegrationResponse' -> Maybe Bool)
-> (CreateIntegrationResponse'
    -> Maybe Bool -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe Bool
apiGatewayManaged :: Maybe Bool
$sel:apiGatewayManaged:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe Bool
apiGatewayManaged} -> Maybe Bool
apiGatewayManaged) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe Bool
a -> CreateIntegrationResponse'
s {$sel:apiGatewayManaged:CreateIntegrationResponse'' :: Maybe Bool
apiGatewayManaged = Maybe Bool
a} :: CreateIntegrationResponse')

-- | 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.
createIntegrationResponse'_contentHandlingStrategy :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe ContentHandlingStrategy)
createIntegrationResponse'_contentHandlingStrategy :: (Maybe ContentHandlingStrategy
 -> f (Maybe ContentHandlingStrategy))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_contentHandlingStrategy = (CreateIntegrationResponse' -> Maybe ContentHandlingStrategy)
-> (CreateIntegrationResponse'
    -> Maybe ContentHandlingStrategy -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe ContentHandlingStrategy)
     (Maybe ContentHandlingStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe ContentHandlingStrategy
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:contentHandlingStrategy:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe ContentHandlingStrategy
contentHandlingStrategy} -> Maybe ContentHandlingStrategy
contentHandlingStrategy) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe ContentHandlingStrategy
a -> CreateIntegrationResponse'
s {$sel:contentHandlingStrategy:CreateIntegrationResponse'' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
a} :: CreateIntegrationResponse')

-- | 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.
createIntegrationResponse'_integrationType :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe IntegrationType)
createIntegrationResponse'_integrationType :: (Maybe IntegrationType -> f (Maybe IntegrationType))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_integrationType = (CreateIntegrationResponse' -> Maybe IntegrationType)
-> (CreateIntegrationResponse'
    -> Maybe IntegrationType -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe IntegrationType)
     (Maybe IntegrationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe IntegrationType
integrationType :: Maybe IntegrationType
$sel:integrationType:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe IntegrationType
integrationType} -> Maybe IntegrationType
integrationType) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe IntegrationType
a -> CreateIntegrationResponse'
s {$sel:integrationType:CreateIntegrationResponse'' :: Maybe IntegrationType
integrationType = Maybe IntegrationType
a} :: CreateIntegrationResponse')

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

-- | 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.
createIntegrationResponse'_connectionType :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe ConnectionType)
createIntegrationResponse'_connectionType :: (Maybe ConnectionType -> f (Maybe ConnectionType))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_connectionType = (CreateIntegrationResponse' -> Maybe ConnectionType)
-> (CreateIntegrationResponse'
    -> Maybe ConnectionType -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe ConnectionType)
     (Maybe ConnectionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe ConnectionType
a -> CreateIntegrationResponse'
s {$sel:connectionType:CreateIntegrationResponse'' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: CreateIntegrationResponse')

-- | 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>.
createIntegrationResponse'_responseParameters :: Lens.Lens' CreateIntegrationResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)))
createIntegrationResponse'_responseParameters :: (Maybe (HashMap Text (HashMap Text Text))
 -> f (Maybe (HashMap Text (HashMap Text Text))))
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_responseParameters = (CreateIntegrationResponse'
 -> Maybe (HashMap Text (HashMap Text Text)))
-> (CreateIntegrationResponse'
    -> Maybe (HashMap Text (HashMap Text Text))
    -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse'
     CreateIntegrationResponse'
     (Maybe (HashMap Text (HashMap Text Text)))
     (Maybe (HashMap Text (HashMap Text Text)))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
$sel:responseParameters:CreateIntegrationResponse'' :: CreateIntegrationResponse'
-> Maybe (HashMap Text (HashMap Text Text))
responseParameters} -> Maybe (HashMap Text (HashMap Text Text))
responseParameters) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Maybe (HashMap Text (HashMap Text Text))
a -> CreateIntegrationResponse'
s {$sel:responseParameters:CreateIntegrationResponse'' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
a} :: CreateIntegrationResponse') ((Maybe (HashMap Text (HashMap Text Text))
  -> f (Maybe (HashMap Text (HashMap Text Text))))
 -> CreateIntegrationResponse' -> f CreateIntegrationResponse')
-> ((Maybe (HashMap Text (HashMap Text Text))
     -> f (Maybe (HashMap Text (HashMap Text Text))))
    -> Maybe (HashMap Text (HashMap Text Text))
    -> f (Maybe (HashMap Text (HashMap Text Text))))
-> (Maybe (HashMap Text (HashMap Text Text))
    -> f (Maybe (HashMap Text (HashMap Text Text))))
-> CreateIntegrationResponse'
-> f CreateIntegrationResponse'
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
-> Iso
     (Maybe (HashMap Text (HashMap Text Text)))
     (Maybe (HashMap Text (HashMap Text Text)))
     (Maybe (HashMap Text (HashMap Text Text)))
     (Maybe (HashMap Text (HashMap Text Text)))
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 AnIso
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
  (HashMap Text (HashMap Text Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
createIntegrationResponse'_httpStatus :: Lens.Lens' CreateIntegrationResponse' Prelude.Int
createIntegrationResponse'_httpStatus :: (Int -> f Int)
-> CreateIntegrationResponse' -> f CreateIntegrationResponse'
createIntegrationResponse'_httpStatus = (CreateIntegrationResponse' -> Int)
-> (CreateIntegrationResponse'
    -> Int -> CreateIntegrationResponse')
-> Lens
     CreateIntegrationResponse' CreateIntegrationResponse' Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse'' {Int
httpStatus :: Int
$sel:httpStatus:CreateIntegrationResponse'' :: CreateIntegrationResponse' -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateIntegrationResponse'
s@CreateIntegrationResponse'' {} Int
a -> CreateIntegrationResponse'
s {$sel:httpStatus:CreateIntegrationResponse'' :: Int
httpStatus = Int
a} :: CreateIntegrationResponse')

instance Prelude.NFData CreateIntegrationResponse'