{-# 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.UpdateIntegration
-- 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)
--
-- Updates an Integration.
module Amazonka.ApiGatewayV2.UpdateIntegration
  ( -- * Creating a Request
    UpdateIntegration (..),
    newUpdateIntegration,

    -- * Request Lenses
    updateIntegration_requestTemplates,
    updateIntegration_integrationSubtype,
    updateIntegration_credentialsArn,
    updateIntegration_integrationUri,
    updateIntegration_requestParameters,
    updateIntegration_connectionId,
    updateIntegration_passthroughBehavior,
    updateIntegration_integrationMethod,
    updateIntegration_tlsConfig,
    updateIntegration_payloadFormatVersion,
    updateIntegration_templateSelectionExpression,
    updateIntegration_timeoutInMillis,
    updateIntegration_contentHandlingStrategy,
    updateIntegration_integrationType,
    updateIntegration_description,
    updateIntegration_connectionType,
    updateIntegration_responseParameters,
    updateIntegration_apiId,
    updateIntegration_integrationId,

    -- * Destructuring the Response
    UpdateIntegrationResponse' (..),
    newUpdateIntegrationResponse',

    -- * Response Lenses
    updateIntegrationResponse'_integrationResponseSelectionExpression,
    updateIntegrationResponse'_requestTemplates,
    updateIntegrationResponse'_integrationSubtype,
    updateIntegrationResponse'_credentialsArn,
    updateIntegrationResponse'_integrationUri,
    updateIntegrationResponse'_integrationId,
    updateIntegrationResponse'_requestParameters,
    updateIntegrationResponse'_connectionId,
    updateIntegrationResponse'_passthroughBehavior,
    updateIntegrationResponse'_integrationMethod,
    updateIntegrationResponse'_tlsConfig,
    updateIntegrationResponse'_payloadFormatVersion,
    updateIntegrationResponse'_templateSelectionExpression,
    updateIntegrationResponse'_timeoutInMillis,
    updateIntegrationResponse'_apiGatewayManaged,
    updateIntegrationResponse'_contentHandlingStrategy,
    updateIntegrationResponse'_integrationType,
    updateIntegrationResponse'_description,
    updateIntegrationResponse'_connectionType,
    updateIntegrationResponse'_responseParameters,
    updateIntegrationResponse'_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

-- | Updates an Integration.
--
-- /See:/ 'newUpdateIntegration' smart constructor.
data UpdateIntegration = UpdateIntegration'
  { -- | 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.
    UpdateIntegration -> 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>.
    UpdateIntegration -> 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.
    UpdateIntegration -> 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.
    UpdateIntegration -> 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. Transforming API requests and responses>.
    UpdateIntegration -> 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.
    UpdateIntegration -> 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.
    UpdateIntegration -> Maybe PassthroughBehavior
passthroughBehavior :: Prelude.Maybe PassthroughBehavior,
    -- | Specifies the integration\'s HTTP method type.
    UpdateIntegration -> 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.
    UpdateIntegration -> Maybe TlsConfigInput
tlsConfig :: Prelude.Maybe TlsConfigInput,
    -- | Specifies the format of the payload sent to an integration. Required for
    -- HTTP APIs.
    UpdateIntegration -> Maybe Text
payloadFormatVersion :: Prelude.Maybe Prelude.Text,
    -- | The template selection expression for the integration.
    UpdateIntegration -> 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.
    UpdateIntegration -> 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.
    UpdateIntegration -> 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. 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.
    UpdateIntegration -> Maybe IntegrationType
integrationType :: Prelude.Maybe IntegrationType,
    -- | The description of the integration
    UpdateIntegration -> 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.
    UpdateIntegration -> 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>.
    UpdateIntegration -> Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)),
    -- | The API identifier.
    UpdateIntegration -> Text
apiId :: Prelude.Text,
    -- | The integration ID.
    UpdateIntegration -> Text
integrationId :: Prelude.Text
  }
  deriving (UpdateIntegration -> UpdateIntegration -> Bool
(UpdateIntegration -> UpdateIntegration -> Bool)
-> (UpdateIntegration -> UpdateIntegration -> Bool)
-> Eq UpdateIntegration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateIntegration -> UpdateIntegration -> Bool
$c/= :: UpdateIntegration -> UpdateIntegration -> Bool
== :: UpdateIntegration -> UpdateIntegration -> Bool
$c== :: UpdateIntegration -> UpdateIntegration -> Bool
Prelude.Eq, ReadPrec [UpdateIntegration]
ReadPrec UpdateIntegration
Int -> ReadS UpdateIntegration
ReadS [UpdateIntegration]
(Int -> ReadS UpdateIntegration)
-> ReadS [UpdateIntegration]
-> ReadPrec UpdateIntegration
-> ReadPrec [UpdateIntegration]
-> Read UpdateIntegration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateIntegration]
$creadListPrec :: ReadPrec [UpdateIntegration]
readPrec :: ReadPrec UpdateIntegration
$creadPrec :: ReadPrec UpdateIntegration
readList :: ReadS [UpdateIntegration]
$creadList :: ReadS [UpdateIntegration]
readsPrec :: Int -> ReadS UpdateIntegration
$creadsPrec :: Int -> ReadS UpdateIntegration
Prelude.Read, Int -> UpdateIntegration -> ShowS
[UpdateIntegration] -> ShowS
UpdateIntegration -> String
(Int -> UpdateIntegration -> ShowS)
-> (UpdateIntegration -> String)
-> ([UpdateIntegration] -> ShowS)
-> Show UpdateIntegration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateIntegration] -> ShowS
$cshowList :: [UpdateIntegration] -> ShowS
show :: UpdateIntegration -> String
$cshow :: UpdateIntegration -> String
showsPrec :: Int -> UpdateIntegration -> ShowS
$cshowsPrec :: Int -> UpdateIntegration -> ShowS
Prelude.Show, (forall x. UpdateIntegration -> Rep UpdateIntegration x)
-> (forall x. Rep UpdateIntegration x -> UpdateIntegration)
-> Generic UpdateIntegration
forall x. Rep UpdateIntegration x -> UpdateIntegration
forall x. UpdateIntegration -> Rep UpdateIntegration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateIntegration x -> UpdateIntegration
$cfrom :: forall x. UpdateIntegration -> Rep UpdateIntegration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateIntegration' 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', 'updateIntegration_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', 'updateIntegration_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', 'updateIntegration_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', 'updateIntegration_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', 'updateIntegration_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. Transforming API requests and responses>.
--
-- 'connectionId', 'updateIntegration_connectionId' - The ID of the VPC link for a private integration. Supported only for
-- HTTP APIs.
--
-- 'passthroughBehavior', 'updateIntegration_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', 'updateIntegration_integrationMethod' - Specifies the integration\'s HTTP method type.
--
-- 'tlsConfig', 'updateIntegration_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', 'updateIntegration_payloadFormatVersion' - Specifies the format of the payload sent to an integration. Required for
-- HTTP APIs.
--
-- 'templateSelectionExpression', 'updateIntegration_templateSelectionExpression' - The template selection expression for the integration.
--
-- 'timeoutInMillis', 'updateIntegration_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', 'updateIntegration_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', 'updateIntegration_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.
--
-- 'description', 'updateIntegration_description' - The description of the integration
--
-- 'connectionType', 'updateIntegration_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', 'updateIntegration_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', 'updateIntegration_apiId' - The API identifier.
--
-- 'integrationId', 'updateIntegration_integrationId' - The integration ID.
newUpdateIntegration ::
  -- | 'apiId'
  Prelude.Text ->
  -- | 'integrationId'
  Prelude.Text ->
  UpdateIntegration
newUpdateIntegration :: Text -> Text -> UpdateIntegration
newUpdateIntegration Text
pApiId_ Text
pIntegrationId_ =
  UpdateIntegration' :: 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 IntegrationType
-> Maybe Text
-> Maybe ConnectionType
-> Maybe (HashMap Text (HashMap Text Text))
-> Text
-> Text
-> UpdateIntegration
UpdateIntegration'
    { $sel:requestTemplates:UpdateIntegration' :: Maybe (HashMap Text Text)
requestTemplates =
        Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationSubtype:UpdateIntegration' :: Maybe Text
integrationSubtype = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:credentialsArn:UpdateIntegration' :: Maybe Text
credentialsArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationUri:UpdateIntegration' :: Maybe Text
integrationUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:requestParameters:UpdateIntegration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionId:UpdateIntegration' :: Maybe Text
connectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:passthroughBehavior:UpdateIntegration' :: Maybe PassthroughBehavior
passthroughBehavior = Maybe PassthroughBehavior
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationMethod:UpdateIntegration' :: Maybe Text
integrationMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tlsConfig:UpdateIntegration' :: Maybe TlsConfigInput
tlsConfig = Maybe TlsConfigInput
forall a. Maybe a
Prelude.Nothing,
      $sel:payloadFormatVersion:UpdateIntegration' :: Maybe Text
payloadFormatVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:templateSelectionExpression:UpdateIntegration' :: Maybe Text
templateSelectionExpression = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:timeoutInMillis:UpdateIntegration' :: Maybe Natural
timeoutInMillis = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:contentHandlingStrategy:UpdateIntegration' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
forall a. Maybe a
Prelude.Nothing,
      $sel:integrationType:UpdateIntegration' :: Maybe IntegrationType
integrationType = Maybe IntegrationType
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateIntegration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionType:UpdateIntegration' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
forall a. Maybe a
Prelude.Nothing,
      $sel:responseParameters:UpdateIntegration' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
forall a. Maybe a
Prelude.Nothing,
      $sel:apiId:UpdateIntegration' :: Text
apiId = Text
pApiId_,
      $sel:integrationId:UpdateIntegration' :: Text
integrationId = Text
pIntegrationId_
    }

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

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

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

-- | 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. Transforming API requests and responses>.
updateIntegration_requestParameters :: Lens.Lens' UpdateIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateIntegration_requestParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateIntegration -> f UpdateIntegration
updateIntegration_requestParameters = (UpdateIntegration -> Maybe (HashMap Text Text))
-> (UpdateIntegration
    -> Maybe (HashMap Text Text) -> UpdateIntegration)
-> Lens
     UpdateIntegration
     UpdateIntegration
     (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 (\UpdateIntegration' {Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
$sel:requestParameters:UpdateIntegration' :: UpdateIntegration -> Maybe (HashMap Text Text)
requestParameters} -> Maybe (HashMap Text Text)
requestParameters) (\s :: UpdateIntegration
s@UpdateIntegration' {} Maybe (HashMap Text Text)
a -> UpdateIntegration
s {$sel:requestParameters:UpdateIntegration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
a} :: UpdateIntegration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateIntegration -> f UpdateIntegration)
-> ((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)))
-> UpdateIntegration
-> f UpdateIntegration
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.
updateIntegration_connectionId :: Lens.Lens' UpdateIntegration (Prelude.Maybe Prelude.Text)
updateIntegration_connectionId :: (Maybe Text -> f (Maybe Text))
-> UpdateIntegration -> f UpdateIntegration
updateIntegration_connectionId = (UpdateIntegration -> Maybe Text)
-> (UpdateIntegration -> Maybe Text -> UpdateIntegration)
-> Lens
     UpdateIntegration UpdateIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIntegration' {Maybe Text
connectionId :: Maybe Text
$sel:connectionId:UpdateIntegration' :: UpdateIntegration -> Maybe Text
connectionId} -> Maybe Text
connectionId) (\s :: UpdateIntegration
s@UpdateIntegration' {} Maybe Text
a -> UpdateIntegration
s {$sel:connectionId:UpdateIntegration' :: Maybe Text
connectionId = Maybe Text
a} :: UpdateIntegration)

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

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

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

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

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

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

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

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

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

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

-- | 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>.
updateIntegration_responseParameters :: Lens.Lens' UpdateIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)))
updateIntegration_responseParameters :: (Maybe (HashMap Text (HashMap Text Text))
 -> f (Maybe (HashMap Text (HashMap Text Text))))
-> UpdateIntegration -> f UpdateIntegration
updateIntegration_responseParameters = (UpdateIntegration -> Maybe (HashMap Text (HashMap Text Text)))
-> (UpdateIntegration
    -> Maybe (HashMap Text (HashMap Text Text)) -> UpdateIntegration)
-> Lens
     UpdateIntegration
     UpdateIntegration
     (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 (\UpdateIntegration' {Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
$sel:responseParameters:UpdateIntegration' :: UpdateIntegration -> Maybe (HashMap Text (HashMap Text Text))
responseParameters} -> Maybe (HashMap Text (HashMap Text Text))
responseParameters) (\s :: UpdateIntegration
s@UpdateIntegration' {} Maybe (HashMap Text (HashMap Text Text))
a -> UpdateIntegration
s {$sel:responseParameters:UpdateIntegration' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
a} :: UpdateIntegration) ((Maybe (HashMap Text (HashMap Text Text))
  -> f (Maybe (HashMap Text (HashMap Text Text))))
 -> UpdateIntegration -> f UpdateIntegration)
-> ((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))))
-> UpdateIntegration
-> f UpdateIntegration
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.
updateIntegration_apiId :: Lens.Lens' UpdateIntegration Prelude.Text
updateIntegration_apiId :: (Text -> f Text) -> UpdateIntegration -> f UpdateIntegration
updateIntegration_apiId = (UpdateIntegration -> Text)
-> (UpdateIntegration -> Text -> UpdateIntegration)
-> Lens UpdateIntegration UpdateIntegration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIntegration' {Text
apiId :: Text
$sel:apiId:UpdateIntegration' :: UpdateIntegration -> Text
apiId} -> Text
apiId) (\s :: UpdateIntegration
s@UpdateIntegration' {} Text
a -> UpdateIntegration
s {$sel:apiId:UpdateIntegration' :: Text
apiId = Text
a} :: UpdateIntegration)

-- | The integration ID.
updateIntegration_integrationId :: Lens.Lens' UpdateIntegration Prelude.Text
updateIntegration_integrationId :: (Text -> f Text) -> UpdateIntegration -> f UpdateIntegration
updateIntegration_integrationId = (UpdateIntegration -> Text)
-> (UpdateIntegration -> Text -> UpdateIntegration)
-> Lens UpdateIntegration UpdateIntegration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIntegration' {Text
integrationId :: Text
$sel:integrationId:UpdateIntegration' :: UpdateIntegration -> Text
integrationId} -> Text
integrationId) (\s :: UpdateIntegration
s@UpdateIntegration' {} Text
a -> UpdateIntegration
s {$sel:integrationId:UpdateIntegration' :: Text
integrationId = Text
a} :: UpdateIntegration)

instance Core.AWSRequest UpdateIntegration where
  type
    AWSResponse UpdateIntegration =
      UpdateIntegrationResponse'
  request :: UpdateIntegration -> Request UpdateIntegration
request = Service -> UpdateIntegration -> Request UpdateIntegration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateIntegration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateIntegration)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateIntegration))
-> Logger
-> Service
-> Proxy UpdateIntegration
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateIntegration)))
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
-> UpdateIntegrationResponse'
UpdateIntegrationResponse''
            (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
 -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> 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
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Bool
      -> Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe ContentHandlingStrategy
      -> Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> Either String (Maybe ContentHandlingStrategy)
-> Either
     String
     (Maybe IntegrationType
      -> Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> Either String (Maybe IntegrationType)
-> Either
     String
     (Maybe Text
      -> Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ConnectionType
      -> Maybe (HashMap Text (HashMap Text Text))
      -> Int
      -> UpdateIntegrationResponse')
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
   -> UpdateIntegrationResponse')
-> Either String (Maybe ConnectionType)
-> Either
     String
     (Maybe (HashMap Text (HashMap Text Text))
      -> Int -> UpdateIntegrationResponse')
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 -> UpdateIntegrationResponse')
-> Either String (Maybe (HashMap Text (HashMap Text Text)))
-> Either String (Int -> UpdateIntegrationResponse')
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 -> UpdateIntegrationResponse')
-> Either String Int -> Either String UpdateIntegrationResponse'
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 UpdateIntegration

instance Prelude.NFData UpdateIntegration

instance Core.ToHeaders UpdateIntegration where
  toHeaders :: UpdateIntegration -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateIntegration -> 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 UpdateIntegration where
  toJSON :: UpdateIntegration -> Value
toJSON UpdateIntegration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe IntegrationType
Maybe PassthroughBehavior
Maybe TlsConfigInput
Text
integrationId :: Text
apiId :: Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
connectionType :: Maybe ConnectionType
description :: Maybe Text
integrationType :: Maybe IntegrationType
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:integrationId:UpdateIntegration' :: UpdateIntegration -> Text
$sel:apiId:UpdateIntegration' :: UpdateIntegration -> Text
$sel:responseParameters:UpdateIntegration' :: UpdateIntegration -> Maybe (HashMap Text (HashMap Text Text))
$sel:connectionType:UpdateIntegration' :: UpdateIntegration -> Maybe ConnectionType
$sel:description:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:integrationType:UpdateIntegration' :: UpdateIntegration -> Maybe IntegrationType
$sel:contentHandlingStrategy:UpdateIntegration' :: UpdateIntegration -> Maybe ContentHandlingStrategy
$sel:timeoutInMillis:UpdateIntegration' :: UpdateIntegration -> Maybe Natural
$sel:templateSelectionExpression:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:payloadFormatVersion:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:tlsConfig:UpdateIntegration' :: UpdateIntegration -> Maybe TlsConfigInput
$sel:integrationMethod:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:passthroughBehavior:UpdateIntegration' :: UpdateIntegration -> Maybe PassthroughBehavior
$sel:connectionId:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:requestParameters:UpdateIntegration' :: UpdateIntegration -> Maybe (HashMap Text Text)
$sel:integrationUri:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:credentialsArn:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:integrationSubtype:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:requestTemplates:UpdateIntegration' :: UpdateIntegration -> 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
"integrationType" Text -> IntegrationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (IntegrationType -> Pair) -> Maybe IntegrationType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IntegrationType
integrationType,
            (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
          ]
      )

instance Core.ToPath UpdateIntegration where
  toPath :: UpdateIntegration -> ByteString
toPath UpdateIntegration' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe (HashMap Text (HashMap Text Text))
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe IntegrationType
Maybe PassthroughBehavior
Maybe TlsConfigInput
Text
integrationId :: Text
apiId :: Text
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
connectionType :: Maybe ConnectionType
description :: Maybe Text
integrationType :: Maybe IntegrationType
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:integrationId:UpdateIntegration' :: UpdateIntegration -> Text
$sel:apiId:UpdateIntegration' :: UpdateIntegration -> Text
$sel:responseParameters:UpdateIntegration' :: UpdateIntegration -> Maybe (HashMap Text (HashMap Text Text))
$sel:connectionType:UpdateIntegration' :: UpdateIntegration -> Maybe ConnectionType
$sel:description:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:integrationType:UpdateIntegration' :: UpdateIntegration -> Maybe IntegrationType
$sel:contentHandlingStrategy:UpdateIntegration' :: UpdateIntegration -> Maybe ContentHandlingStrategy
$sel:timeoutInMillis:UpdateIntegration' :: UpdateIntegration -> Maybe Natural
$sel:templateSelectionExpression:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:payloadFormatVersion:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:tlsConfig:UpdateIntegration' :: UpdateIntegration -> Maybe TlsConfigInput
$sel:integrationMethod:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:passthroughBehavior:UpdateIntegration' :: UpdateIntegration -> Maybe PassthroughBehavior
$sel:connectionId:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:requestParameters:UpdateIntegration' :: UpdateIntegration -> Maybe (HashMap Text Text)
$sel:integrationUri:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:credentialsArn:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:integrationSubtype:UpdateIntegration' :: UpdateIntegration -> Maybe Text
$sel:requestTemplates:UpdateIntegration' :: UpdateIntegration -> 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/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
integrationId
      ]

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

-- | /See:/ 'newUpdateIntegrationResponse'' smart constructor.
data UpdateIntegrationResponse' = UpdateIntegrationResponse''
  { -- | 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>.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> 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>.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> Maybe Text
integrationUri :: Prelude.Maybe Prelude.Text,
    -- | Represents the identifier of an integration.
    UpdateIntegrationResponse' -> 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>.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> Maybe PassthroughBehavior
passthroughBehavior :: Prelude.Maybe PassthroughBehavior,
    -- | Specifies the integration\'s HTTP method type.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> Maybe TlsConfig
tlsConfig :: Prelude.Maybe TlsConfig,
    -- | Specifies the format of the payload sent to an integration. Required for
    -- HTTP APIs.
    UpdateIntegrationResponse' -> Maybe Text
payloadFormatVersion :: Prelude.Maybe Prelude.Text,
    -- | The template selection expression for the integration. Supported only
    -- for WebSocket APIs.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> Maybe IntegrationType
integrationType :: Prelude.Maybe IntegrationType,
    -- | Represents the description of an integration.
    UpdateIntegrationResponse' -> 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.
    UpdateIntegrationResponse' -> 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>.
    UpdateIntegrationResponse'
-> 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.
    UpdateIntegrationResponse' -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateIntegrationResponse' -> UpdateIntegrationResponse' -> Bool
(UpdateIntegrationResponse' -> UpdateIntegrationResponse' -> Bool)
-> (UpdateIntegrationResponse'
    -> UpdateIntegrationResponse' -> Bool)
-> Eq UpdateIntegrationResponse'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateIntegrationResponse' -> UpdateIntegrationResponse' -> Bool
$c/= :: UpdateIntegrationResponse' -> UpdateIntegrationResponse' -> Bool
== :: UpdateIntegrationResponse' -> UpdateIntegrationResponse' -> Bool
$c== :: UpdateIntegrationResponse' -> UpdateIntegrationResponse' -> Bool
Prelude.Eq, ReadPrec [UpdateIntegrationResponse']
ReadPrec UpdateIntegrationResponse'
Int -> ReadS UpdateIntegrationResponse'
ReadS [UpdateIntegrationResponse']
(Int -> ReadS UpdateIntegrationResponse')
-> ReadS [UpdateIntegrationResponse']
-> ReadPrec UpdateIntegrationResponse'
-> ReadPrec [UpdateIntegrationResponse']
-> Read UpdateIntegrationResponse'
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateIntegrationResponse']
$creadListPrec :: ReadPrec [UpdateIntegrationResponse']
readPrec :: ReadPrec UpdateIntegrationResponse'
$creadPrec :: ReadPrec UpdateIntegrationResponse'
readList :: ReadS [UpdateIntegrationResponse']
$creadList :: ReadS [UpdateIntegrationResponse']
readsPrec :: Int -> ReadS UpdateIntegrationResponse'
$creadsPrec :: Int -> ReadS UpdateIntegrationResponse'
Prelude.Read, Int -> UpdateIntegrationResponse' -> ShowS
[UpdateIntegrationResponse'] -> ShowS
UpdateIntegrationResponse' -> String
(Int -> UpdateIntegrationResponse' -> ShowS)
-> (UpdateIntegrationResponse' -> String)
-> ([UpdateIntegrationResponse'] -> ShowS)
-> Show UpdateIntegrationResponse'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateIntegrationResponse'] -> ShowS
$cshowList :: [UpdateIntegrationResponse'] -> ShowS
show :: UpdateIntegrationResponse' -> String
$cshow :: UpdateIntegrationResponse' -> String
showsPrec :: Int -> UpdateIntegrationResponse' -> ShowS
$cshowsPrec :: Int -> UpdateIntegrationResponse' -> ShowS
Prelude.Show, (forall x.
 UpdateIntegrationResponse' -> Rep UpdateIntegrationResponse' x)
-> (forall x.
    Rep UpdateIntegrationResponse' x -> UpdateIntegrationResponse')
-> Generic UpdateIntegrationResponse'
forall x.
Rep UpdateIntegrationResponse' x -> UpdateIntegrationResponse'
forall x.
UpdateIntegrationResponse' -> Rep UpdateIntegrationResponse' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateIntegrationResponse' x -> UpdateIntegrationResponse'
$cfrom :: forall x.
UpdateIntegrationResponse' -> Rep UpdateIntegrationResponse' x
Prelude.Generic)

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

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

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

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

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

-- | 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>.
updateIntegrationResponse'_requestParameters :: Lens.Lens' UpdateIntegrationResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateIntegrationResponse'_requestParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateIntegrationResponse' -> f UpdateIntegrationResponse'
updateIntegrationResponse'_requestParameters = (UpdateIntegrationResponse' -> Maybe (HashMap Text Text))
-> (UpdateIntegrationResponse'
    -> Maybe (HashMap Text Text) -> UpdateIntegrationResponse')
-> Lens
     UpdateIntegrationResponse'
     UpdateIntegrationResponse'
     (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 (\UpdateIntegrationResponse'' {Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
$sel:requestParameters:UpdateIntegrationResponse'' :: UpdateIntegrationResponse' -> Maybe (HashMap Text Text)
requestParameters} -> Maybe (HashMap Text Text)
requestParameters) (\s :: UpdateIntegrationResponse'
s@UpdateIntegrationResponse'' {} Maybe (HashMap Text Text)
a -> UpdateIntegrationResponse'
s {$sel:requestParameters:UpdateIntegrationResponse'' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
a} :: UpdateIntegrationResponse') ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateIntegrationResponse' -> f UpdateIntegrationResponse')
-> ((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)))
-> UpdateIntegrationResponse'
-> f UpdateIntegrationResponse'
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.
updateIntegrationResponse'_connectionId :: Lens.Lens' UpdateIntegrationResponse' (Prelude.Maybe Prelude.Text)
updateIntegrationResponse'_connectionId :: (Maybe Text -> f (Maybe Text))
-> UpdateIntegrationResponse' -> f UpdateIntegrationResponse'
updateIntegrationResponse'_connectionId = (UpdateIntegrationResponse' -> Maybe Text)
-> (UpdateIntegrationResponse'
    -> Maybe Text -> UpdateIntegrationResponse')
-> Lens
     UpdateIntegrationResponse'
     UpdateIntegrationResponse'
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIntegrationResponse'' {Maybe Text
connectionId :: Maybe Text
$sel:connectionId:UpdateIntegrationResponse'' :: UpdateIntegrationResponse' -> Maybe Text
connectionId} -> Maybe Text
connectionId) (\s :: UpdateIntegrationResponse'
s@UpdateIntegrationResponse'' {} Maybe Text
a -> UpdateIntegrationResponse'
s {$sel:connectionId:UpdateIntegrationResponse'' :: Maybe Text
connectionId = Maybe Text
a} :: UpdateIntegrationResponse')

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

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

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

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

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

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

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

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

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

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

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

-- | 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>.
updateIntegrationResponse'_responseParameters :: Lens.Lens' UpdateIntegrationResponse' (Prelude.Maybe (Prelude.HashMap Prelude.Text (Prelude.HashMap Prelude.Text Prelude.Text)))
updateIntegrationResponse'_responseParameters :: (Maybe (HashMap Text (HashMap Text Text))
 -> f (Maybe (HashMap Text (HashMap Text Text))))
-> UpdateIntegrationResponse' -> f UpdateIntegrationResponse'
updateIntegrationResponse'_responseParameters = (UpdateIntegrationResponse'
 -> Maybe (HashMap Text (HashMap Text Text)))
-> (UpdateIntegrationResponse'
    -> Maybe (HashMap Text (HashMap Text Text))
    -> UpdateIntegrationResponse')
-> Lens
     UpdateIntegrationResponse'
     UpdateIntegrationResponse'
     (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 (\UpdateIntegrationResponse'' {Maybe (HashMap Text (HashMap Text Text))
responseParameters :: Maybe (HashMap Text (HashMap Text Text))
$sel:responseParameters:UpdateIntegrationResponse'' :: UpdateIntegrationResponse'
-> Maybe (HashMap Text (HashMap Text Text))
responseParameters} -> Maybe (HashMap Text (HashMap Text Text))
responseParameters) (\s :: UpdateIntegrationResponse'
s@UpdateIntegrationResponse'' {} Maybe (HashMap Text (HashMap Text Text))
a -> UpdateIntegrationResponse'
s {$sel:responseParameters:UpdateIntegrationResponse'' :: Maybe (HashMap Text (HashMap Text Text))
responseParameters = Maybe (HashMap Text (HashMap Text Text))
a} :: UpdateIntegrationResponse') ((Maybe (HashMap Text (HashMap Text Text))
  -> f (Maybe (HashMap Text (HashMap Text Text))))
 -> UpdateIntegrationResponse' -> f UpdateIntegrationResponse')
-> ((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))))
-> UpdateIntegrationResponse'
-> f UpdateIntegrationResponse'
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.
updateIntegrationResponse'_httpStatus :: Lens.Lens' UpdateIntegrationResponse' Prelude.Int
updateIntegrationResponse'_httpStatus :: (Int -> f Int)
-> UpdateIntegrationResponse' -> f UpdateIntegrationResponse'
updateIntegrationResponse'_httpStatus = (UpdateIntegrationResponse' -> Int)
-> (UpdateIntegrationResponse'
    -> Int -> UpdateIntegrationResponse')
-> Lens
     UpdateIntegrationResponse' UpdateIntegrationResponse' Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateIntegrationResponse'' {Int
httpStatus :: Int
$sel:httpStatus:UpdateIntegrationResponse'' :: UpdateIntegrationResponse' -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateIntegrationResponse'
s@UpdateIntegrationResponse'' {} Int
a -> UpdateIntegrationResponse'
s {$sel:httpStatus:UpdateIntegrationResponse'' :: Int
httpStatus = Int
a} :: UpdateIntegrationResponse')

instance Prelude.NFData UpdateIntegrationResponse'