{-# 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 #-}
module Amazonka.APIGateway.PutIntegration
(
PutIntegration (..),
newPutIntegration,
putIntegration_requestTemplates,
putIntegration_credentials,
putIntegration_connectionId,
putIntegration_requestParameters,
putIntegration_contentHandling,
putIntegration_passthroughBehavior,
putIntegration_uri,
putIntegration_tlsConfig,
putIntegration_cacheNamespace,
putIntegration_timeoutInMillis,
putIntegration_connectionType,
putIntegration_integrationHttpMethod,
putIntegration_cacheKeyParameters,
putIntegration_restApiId,
putIntegration_resourceId,
putIntegration_httpMethod,
putIntegration_type,
Integration (..),
newIntegration,
integration_httpMethod,
integration_requestTemplates,
integration_credentials,
integration_connectionId,
integration_requestParameters,
integration_contentHandling,
integration_passthroughBehavior,
integration_uri,
integration_integrationResponses,
integration_tlsConfig,
integration_cacheNamespace,
integration_timeoutInMillis,
integration_type,
integration_connectionType,
integration_cacheKeyParameters,
)
where
import Amazonka.APIGateway.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
data PutIntegration = PutIntegration'
{
PutIntegration -> Maybe (HashMap Text Text)
requestTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
PutIntegration -> Maybe Text
credentials :: Prelude.Maybe Prelude.Text,
PutIntegration -> Maybe Text
connectionId :: Prelude.Maybe Prelude.Text,
PutIntegration -> Maybe (HashMap Text Text)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
PutIntegration -> Maybe ContentHandlingStrategy
contentHandling :: Prelude.Maybe ContentHandlingStrategy,
PutIntegration -> Maybe Text
passthroughBehavior :: Prelude.Maybe Prelude.Text,
PutIntegration -> Maybe Text
uri :: Prelude.Maybe Prelude.Text,
PutIntegration -> Maybe TlsConfig
tlsConfig :: Prelude.Maybe TlsConfig,
PutIntegration -> Maybe Text
cacheNamespace :: Prelude.Maybe Prelude.Text,
PutIntegration -> Maybe Int
timeoutInMillis :: Prelude.Maybe Prelude.Int,
PutIntegration -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
PutIntegration -> Maybe Text
integrationHttpMethod :: Prelude.Maybe Prelude.Text,
PutIntegration -> Maybe [Text]
cacheKeyParameters :: Prelude.Maybe [Prelude.Text],
PutIntegration -> Text
restApiId :: Prelude.Text,
PutIntegration -> Text
resourceId :: Prelude.Text,
PutIntegration -> Text
httpMethod :: Prelude.Text,
PutIntegration -> IntegrationType
type' :: IntegrationType
}
deriving (PutIntegration -> PutIntegration -> Bool
(PutIntegration -> PutIntegration -> Bool)
-> (PutIntegration -> PutIntegration -> Bool) -> Eq PutIntegration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutIntegration -> PutIntegration -> Bool
$c/= :: PutIntegration -> PutIntegration -> Bool
== :: PutIntegration -> PutIntegration -> Bool
$c== :: PutIntegration -> PutIntegration -> Bool
Prelude.Eq, ReadPrec [PutIntegration]
ReadPrec PutIntegration
Int -> ReadS PutIntegration
ReadS [PutIntegration]
(Int -> ReadS PutIntegration)
-> ReadS [PutIntegration]
-> ReadPrec PutIntegration
-> ReadPrec [PutIntegration]
-> Read PutIntegration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutIntegration]
$creadListPrec :: ReadPrec [PutIntegration]
readPrec :: ReadPrec PutIntegration
$creadPrec :: ReadPrec PutIntegration
readList :: ReadS [PutIntegration]
$creadList :: ReadS [PutIntegration]
readsPrec :: Int -> ReadS PutIntegration
$creadsPrec :: Int -> ReadS PutIntegration
Prelude.Read, Int -> PutIntegration -> ShowS
[PutIntegration] -> ShowS
PutIntegration -> String
(Int -> PutIntegration -> ShowS)
-> (PutIntegration -> String)
-> ([PutIntegration] -> ShowS)
-> Show PutIntegration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutIntegration] -> ShowS
$cshowList :: [PutIntegration] -> ShowS
show :: PutIntegration -> String
$cshow :: PutIntegration -> String
showsPrec :: Int -> PutIntegration -> ShowS
$cshowsPrec :: Int -> PutIntegration -> ShowS
Prelude.Show, (forall x. PutIntegration -> Rep PutIntegration x)
-> (forall x. Rep PutIntegration x -> PutIntegration)
-> Generic PutIntegration
forall x. Rep PutIntegration x -> PutIntegration
forall x. PutIntegration -> Rep PutIntegration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutIntegration x -> PutIntegration
$cfrom :: forall x. PutIntegration -> Rep PutIntegration x
Prelude.Generic)
newPutIntegration ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
IntegrationType ->
PutIntegration
newPutIntegration :: Text -> Text -> Text -> IntegrationType -> PutIntegration
newPutIntegration
Text
pRestApiId_
Text
pResourceId_
Text
pHttpMethod_
IntegrationType
pType_ =
PutIntegration' :: Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe ConnectionType
-> Maybe Text
-> Maybe [Text]
-> Text
-> Text
-> Text
-> IntegrationType
-> PutIntegration
PutIntegration'
{ $sel:requestTemplates:PutIntegration' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:credentials:PutIntegration' :: Maybe Text
credentials = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:connectionId:PutIntegration' :: Maybe Text
connectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requestParameters:PutIntegration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:contentHandling:PutIntegration' :: Maybe ContentHandlingStrategy
contentHandling = Maybe ContentHandlingStrategy
forall a. Maybe a
Prelude.Nothing,
$sel:passthroughBehavior:PutIntegration' :: Maybe Text
passthroughBehavior = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:uri:PutIntegration' :: Maybe Text
uri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tlsConfig:PutIntegration' :: Maybe TlsConfig
tlsConfig = Maybe TlsConfig
forall a. Maybe a
Prelude.Nothing,
$sel:cacheNamespace:PutIntegration' :: Maybe Text
cacheNamespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timeoutInMillis:PutIntegration' :: Maybe Int
timeoutInMillis = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:connectionType:PutIntegration' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
forall a. Maybe a
Prelude.Nothing,
$sel:integrationHttpMethod:PutIntegration' :: Maybe Text
integrationHttpMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cacheKeyParameters:PutIntegration' :: Maybe [Text]
cacheKeyParameters = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:restApiId:PutIntegration' :: Text
restApiId = Text
pRestApiId_,
$sel:resourceId:PutIntegration' :: Text
resourceId = Text
pResourceId_,
$sel:httpMethod:PutIntegration' :: Text
httpMethod = Text
pHttpMethod_,
$sel:type':PutIntegration' :: IntegrationType
type' = IntegrationType
pType_
}
putIntegration_requestTemplates :: Lens.Lens' PutIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
putIntegration_requestTemplates :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutIntegration -> f PutIntegration
putIntegration_requestTemplates = (PutIntegration -> Maybe (HashMap Text Text))
-> (PutIntegration -> Maybe (HashMap Text Text) -> PutIntegration)
-> Lens
PutIntegration
PutIntegration
(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 (\PutIntegration' {Maybe (HashMap Text Text)
requestTemplates :: Maybe (HashMap Text Text)
$sel:requestTemplates:PutIntegration' :: PutIntegration -> Maybe (HashMap Text Text)
requestTemplates} -> Maybe (HashMap Text Text)
requestTemplates) (\s :: PutIntegration
s@PutIntegration' {} Maybe (HashMap Text Text)
a -> PutIntegration
s {$sel:requestTemplates:PutIntegration' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
a} :: PutIntegration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutIntegration -> f PutIntegration)
-> ((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)))
-> PutIntegration
-> f PutIntegration
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
putIntegration_credentials :: Lens.Lens' PutIntegration (Prelude.Maybe Prelude.Text)
putIntegration_credentials :: (Maybe Text -> f (Maybe Text))
-> PutIntegration -> f PutIntegration
putIntegration_credentials = (PutIntegration -> Maybe Text)
-> (PutIntegration -> Maybe Text -> PutIntegration)
-> Lens PutIntegration PutIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe Text
credentials :: Maybe Text
$sel:credentials:PutIntegration' :: PutIntegration -> Maybe Text
credentials} -> Maybe Text
credentials) (\s :: PutIntegration
s@PutIntegration' {} Maybe Text
a -> PutIntegration
s {$sel:credentials:PutIntegration' :: Maybe Text
credentials = Maybe Text
a} :: PutIntegration)
putIntegration_connectionId :: Lens.Lens' PutIntegration (Prelude.Maybe Prelude.Text)
putIntegration_connectionId :: (Maybe Text -> f (Maybe Text))
-> PutIntegration -> f PutIntegration
putIntegration_connectionId = (PutIntegration -> Maybe Text)
-> (PutIntegration -> Maybe Text -> PutIntegration)
-> Lens PutIntegration PutIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe Text
connectionId :: Maybe Text
$sel:connectionId:PutIntegration' :: PutIntegration -> Maybe Text
connectionId} -> Maybe Text
connectionId) (\s :: PutIntegration
s@PutIntegration' {} Maybe Text
a -> PutIntegration
s {$sel:connectionId:PutIntegration' :: Maybe Text
connectionId = Maybe Text
a} :: PutIntegration)
putIntegration_requestParameters :: Lens.Lens' PutIntegration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
putIntegration_requestParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutIntegration -> f PutIntegration
putIntegration_requestParameters = (PutIntegration -> Maybe (HashMap Text Text))
-> (PutIntegration -> Maybe (HashMap Text Text) -> PutIntegration)
-> Lens
PutIntegration
PutIntegration
(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 (\PutIntegration' {Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
$sel:requestParameters:PutIntegration' :: PutIntegration -> Maybe (HashMap Text Text)
requestParameters} -> Maybe (HashMap Text Text)
requestParameters) (\s :: PutIntegration
s@PutIntegration' {} Maybe (HashMap Text Text)
a -> PutIntegration
s {$sel:requestParameters:PutIntegration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
a} :: PutIntegration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> PutIntegration -> f PutIntegration)
-> ((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)))
-> PutIntegration
-> f PutIntegration
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
putIntegration_contentHandling :: Lens.Lens' PutIntegration (Prelude.Maybe ContentHandlingStrategy)
putIntegration_contentHandling :: (Maybe ContentHandlingStrategy
-> f (Maybe ContentHandlingStrategy))
-> PutIntegration -> f PutIntegration
putIntegration_contentHandling = (PutIntegration -> Maybe ContentHandlingStrategy)
-> (PutIntegration
-> Maybe ContentHandlingStrategy -> PutIntegration)
-> Lens
PutIntegration
PutIntegration
(Maybe ContentHandlingStrategy)
(Maybe ContentHandlingStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe ContentHandlingStrategy
contentHandling :: Maybe ContentHandlingStrategy
$sel:contentHandling:PutIntegration' :: PutIntegration -> Maybe ContentHandlingStrategy
contentHandling} -> Maybe ContentHandlingStrategy
contentHandling) (\s :: PutIntegration
s@PutIntegration' {} Maybe ContentHandlingStrategy
a -> PutIntegration
s {$sel:contentHandling:PutIntegration' :: Maybe ContentHandlingStrategy
contentHandling = Maybe ContentHandlingStrategy
a} :: PutIntegration)
putIntegration_passthroughBehavior :: Lens.Lens' PutIntegration (Prelude.Maybe Prelude.Text)
putIntegration_passthroughBehavior :: (Maybe Text -> f (Maybe Text))
-> PutIntegration -> f PutIntegration
putIntegration_passthroughBehavior = (PutIntegration -> Maybe Text)
-> (PutIntegration -> Maybe Text -> PutIntegration)
-> Lens PutIntegration PutIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe Text
passthroughBehavior :: Maybe Text
$sel:passthroughBehavior:PutIntegration' :: PutIntegration -> Maybe Text
passthroughBehavior} -> Maybe Text
passthroughBehavior) (\s :: PutIntegration
s@PutIntegration' {} Maybe Text
a -> PutIntegration
s {$sel:passthroughBehavior:PutIntegration' :: Maybe Text
passthroughBehavior = Maybe Text
a} :: PutIntegration)
putIntegration_uri :: Lens.Lens' PutIntegration (Prelude.Maybe Prelude.Text)
putIntegration_uri :: (Maybe Text -> f (Maybe Text))
-> PutIntegration -> f PutIntegration
putIntegration_uri = (PutIntegration -> Maybe Text)
-> (PutIntegration -> Maybe Text -> PutIntegration)
-> Lens PutIntegration PutIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe Text
uri :: Maybe Text
$sel:uri:PutIntegration' :: PutIntegration -> Maybe Text
uri} -> Maybe Text
uri) (\s :: PutIntegration
s@PutIntegration' {} Maybe Text
a -> PutIntegration
s {$sel:uri:PutIntegration' :: Maybe Text
uri = Maybe Text
a} :: PutIntegration)
putIntegration_tlsConfig :: Lens.Lens' PutIntegration (Prelude.Maybe TlsConfig)
putIntegration_tlsConfig :: (Maybe TlsConfig -> f (Maybe TlsConfig))
-> PutIntegration -> f PutIntegration
putIntegration_tlsConfig = (PutIntegration -> Maybe TlsConfig)
-> (PutIntegration -> Maybe TlsConfig -> PutIntegration)
-> Lens
PutIntegration PutIntegration (Maybe TlsConfig) (Maybe TlsConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe TlsConfig
tlsConfig :: Maybe TlsConfig
$sel:tlsConfig:PutIntegration' :: PutIntegration -> Maybe TlsConfig
tlsConfig} -> Maybe TlsConfig
tlsConfig) (\s :: PutIntegration
s@PutIntegration' {} Maybe TlsConfig
a -> PutIntegration
s {$sel:tlsConfig:PutIntegration' :: Maybe TlsConfig
tlsConfig = Maybe TlsConfig
a} :: PutIntegration)
putIntegration_cacheNamespace :: Lens.Lens' PutIntegration (Prelude.Maybe Prelude.Text)
putIntegration_cacheNamespace :: (Maybe Text -> f (Maybe Text))
-> PutIntegration -> f PutIntegration
putIntegration_cacheNamespace = (PutIntegration -> Maybe Text)
-> (PutIntegration -> Maybe Text -> PutIntegration)
-> Lens PutIntegration PutIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe Text
cacheNamespace :: Maybe Text
$sel:cacheNamespace:PutIntegration' :: PutIntegration -> Maybe Text
cacheNamespace} -> Maybe Text
cacheNamespace) (\s :: PutIntegration
s@PutIntegration' {} Maybe Text
a -> PutIntegration
s {$sel:cacheNamespace:PutIntegration' :: Maybe Text
cacheNamespace = Maybe Text
a} :: PutIntegration)
putIntegration_timeoutInMillis :: Lens.Lens' PutIntegration (Prelude.Maybe Prelude.Int)
putIntegration_timeoutInMillis :: (Maybe Int -> f (Maybe Int)) -> PutIntegration -> f PutIntegration
putIntegration_timeoutInMillis = (PutIntegration -> Maybe Int)
-> (PutIntegration -> Maybe Int -> PutIntegration)
-> Lens PutIntegration PutIntegration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe Int
timeoutInMillis :: Maybe Int
$sel:timeoutInMillis:PutIntegration' :: PutIntegration -> Maybe Int
timeoutInMillis} -> Maybe Int
timeoutInMillis) (\s :: PutIntegration
s@PutIntegration' {} Maybe Int
a -> PutIntegration
s {$sel:timeoutInMillis:PutIntegration' :: Maybe Int
timeoutInMillis = Maybe Int
a} :: PutIntegration)
putIntegration_connectionType :: Lens.Lens' PutIntegration (Prelude.Maybe ConnectionType)
putIntegration_connectionType :: (Maybe ConnectionType -> f (Maybe ConnectionType))
-> PutIntegration -> f PutIntegration
putIntegration_connectionType = (PutIntegration -> Maybe ConnectionType)
-> (PutIntegration -> Maybe ConnectionType -> PutIntegration)
-> Lens
PutIntegration
PutIntegration
(Maybe ConnectionType)
(Maybe ConnectionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:PutIntegration' :: PutIntegration -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: PutIntegration
s@PutIntegration' {} Maybe ConnectionType
a -> PutIntegration
s {$sel:connectionType:PutIntegration' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: PutIntegration)
putIntegration_integrationHttpMethod :: Lens.Lens' PutIntegration (Prelude.Maybe Prelude.Text)
putIntegration_integrationHttpMethod :: (Maybe Text -> f (Maybe Text))
-> PutIntegration -> f PutIntegration
putIntegration_integrationHttpMethod = (PutIntegration -> Maybe Text)
-> (PutIntegration -> Maybe Text -> PutIntegration)
-> Lens PutIntegration PutIntegration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe Text
integrationHttpMethod :: Maybe Text
$sel:integrationHttpMethod:PutIntegration' :: PutIntegration -> Maybe Text
integrationHttpMethod} -> Maybe Text
integrationHttpMethod) (\s :: PutIntegration
s@PutIntegration' {} Maybe Text
a -> PutIntegration
s {$sel:integrationHttpMethod:PutIntegration' :: Maybe Text
integrationHttpMethod = Maybe Text
a} :: PutIntegration)
putIntegration_cacheKeyParameters :: Lens.Lens' PutIntegration (Prelude.Maybe [Prelude.Text])
putIntegration_cacheKeyParameters :: (Maybe [Text] -> f (Maybe [Text]))
-> PutIntegration -> f PutIntegration
putIntegration_cacheKeyParameters = (PutIntegration -> Maybe [Text])
-> (PutIntegration -> Maybe [Text] -> PutIntegration)
-> Lens PutIntegration PutIntegration (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Maybe [Text]
cacheKeyParameters :: Maybe [Text]
$sel:cacheKeyParameters:PutIntegration' :: PutIntegration -> Maybe [Text]
cacheKeyParameters} -> Maybe [Text]
cacheKeyParameters) (\s :: PutIntegration
s@PutIntegration' {} Maybe [Text]
a -> PutIntegration
s {$sel:cacheKeyParameters:PutIntegration' :: Maybe [Text]
cacheKeyParameters = Maybe [Text]
a} :: PutIntegration) ((Maybe [Text] -> f (Maybe [Text]))
-> PutIntegration -> f PutIntegration)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PutIntegration
-> f PutIntegration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
putIntegration_restApiId :: Lens.Lens' PutIntegration Prelude.Text
putIntegration_restApiId :: (Text -> f Text) -> PutIntegration -> f PutIntegration
putIntegration_restApiId = (PutIntegration -> Text)
-> (PutIntegration -> Text -> PutIntegration)
-> Lens PutIntegration PutIntegration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Text
restApiId :: Text
$sel:restApiId:PutIntegration' :: PutIntegration -> Text
restApiId} -> Text
restApiId) (\s :: PutIntegration
s@PutIntegration' {} Text
a -> PutIntegration
s {$sel:restApiId:PutIntegration' :: Text
restApiId = Text
a} :: PutIntegration)
putIntegration_resourceId :: Lens.Lens' PutIntegration Prelude.Text
putIntegration_resourceId :: (Text -> f Text) -> PutIntegration -> f PutIntegration
putIntegration_resourceId = (PutIntegration -> Text)
-> (PutIntegration -> Text -> PutIntegration)
-> Lens PutIntegration PutIntegration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Text
resourceId :: Text
$sel:resourceId:PutIntegration' :: PutIntegration -> Text
resourceId} -> Text
resourceId) (\s :: PutIntegration
s@PutIntegration' {} Text
a -> PutIntegration
s {$sel:resourceId:PutIntegration' :: Text
resourceId = Text
a} :: PutIntegration)
putIntegration_httpMethod :: Lens.Lens' PutIntegration Prelude.Text
putIntegration_httpMethod :: (Text -> f Text) -> PutIntegration -> f PutIntegration
putIntegration_httpMethod = (PutIntegration -> Text)
-> (PutIntegration -> Text -> PutIntegration)
-> Lens PutIntegration PutIntegration Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {Text
httpMethod :: Text
$sel:httpMethod:PutIntegration' :: PutIntegration -> Text
httpMethod} -> Text
httpMethod) (\s :: PutIntegration
s@PutIntegration' {} Text
a -> PutIntegration
s {$sel:httpMethod:PutIntegration' :: Text
httpMethod = Text
a} :: PutIntegration)
putIntegration_type :: Lens.Lens' PutIntegration IntegrationType
putIntegration_type :: (IntegrationType -> f IntegrationType)
-> PutIntegration -> f PutIntegration
putIntegration_type = (PutIntegration -> IntegrationType)
-> (PutIntegration -> IntegrationType -> PutIntegration)
-> Lens
PutIntegration PutIntegration IntegrationType IntegrationType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutIntegration' {IntegrationType
type' :: IntegrationType
$sel:type':PutIntegration' :: PutIntegration -> IntegrationType
type'} -> IntegrationType
type') (\s :: PutIntegration
s@PutIntegration' {} IntegrationType
a -> PutIntegration
s {$sel:type':PutIntegration' :: IntegrationType
type' = IntegrationType
a} :: PutIntegration)
instance Core.AWSRequest PutIntegration where
type AWSResponse PutIntegration = Integration
request :: PutIntegration -> Request PutIntegration
request = Service -> PutIntegration -> Request PutIntegration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy PutIntegration
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutIntegration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse PutIntegration))
-> Logger
-> Service
-> Proxy PutIntegration
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse PutIntegration)))
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 -> Object -> Either String Integration
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
instance Prelude.Hashable PutIntegration
instance Prelude.NFData PutIntegration
instance Core.ToHeaders PutIntegration where
toHeaders :: PutIntegration -> ResponseHeaders
toHeaders =
ResponseHeaders -> PutIntegration -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Accept"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"application/json" :: Prelude.ByteString)
]
)
instance Core.ToJSON PutIntegration where
toJSON :: PutIntegration -> Value
toJSON PutIntegration' {Maybe Int
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe TlsConfig
Text
IntegrationType
type' :: IntegrationType
httpMethod :: Text
resourceId :: Text
restApiId :: Text
cacheKeyParameters :: Maybe [Text]
integrationHttpMethod :: Maybe Text
connectionType :: Maybe ConnectionType
timeoutInMillis :: Maybe Int
cacheNamespace :: Maybe Text
tlsConfig :: Maybe TlsConfig
uri :: Maybe Text
passthroughBehavior :: Maybe Text
contentHandling :: Maybe ContentHandlingStrategy
requestParameters :: Maybe (HashMap Text Text)
connectionId :: Maybe Text
credentials :: Maybe Text
requestTemplates :: Maybe (HashMap Text Text)
$sel:type':PutIntegration' :: PutIntegration -> IntegrationType
$sel:httpMethod:PutIntegration' :: PutIntegration -> Text
$sel:resourceId:PutIntegration' :: PutIntegration -> Text
$sel:restApiId:PutIntegration' :: PutIntegration -> Text
$sel:cacheKeyParameters:PutIntegration' :: PutIntegration -> Maybe [Text]
$sel:integrationHttpMethod:PutIntegration' :: PutIntegration -> Maybe Text
$sel:connectionType:PutIntegration' :: PutIntegration -> Maybe ConnectionType
$sel:timeoutInMillis:PutIntegration' :: PutIntegration -> Maybe Int
$sel:cacheNamespace:PutIntegration' :: PutIntegration -> Maybe Text
$sel:tlsConfig:PutIntegration' :: PutIntegration -> Maybe TlsConfig
$sel:uri:PutIntegration' :: PutIntegration -> Maybe Text
$sel:passthroughBehavior:PutIntegration' :: PutIntegration -> Maybe Text
$sel:contentHandling:PutIntegration' :: PutIntegration -> Maybe ContentHandlingStrategy
$sel:requestParameters:PutIntegration' :: PutIntegration -> Maybe (HashMap Text Text)
$sel:connectionId:PutIntegration' :: PutIntegration -> Maybe Text
$sel:credentials:PutIntegration' :: PutIntegration -> Maybe Text
$sel:requestTemplates:PutIntegration' :: PutIntegration -> 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
"credentials" 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
credentials,
(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
"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
"contentHandling" 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
contentHandling,
(Text
"passthroughBehavior" 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
passthroughBehavior,
(Text
"uri" 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
uri,
(Text
"tlsConfig" Text -> TlsConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (TlsConfig -> Pair) -> Maybe TlsConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe TlsConfig
tlsConfig,
(Text
"cacheNamespace" 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
cacheNamespace,
(Text
"timeoutInMillis" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
timeoutInMillis,
(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
"httpMethod" 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
integrationHttpMethod,
(Text
"cacheKeyParameters" 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]
cacheKeyParameters,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"type" Text -> IntegrationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= IntegrationType
type')
]
)
instance Core.ToPath PutIntegration where
toPath :: PutIntegration -> ByteString
toPath PutIntegration' {Maybe Int
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe ConnectionType
Maybe ContentHandlingStrategy
Maybe TlsConfig
Text
IntegrationType
type' :: IntegrationType
httpMethod :: Text
resourceId :: Text
restApiId :: Text
cacheKeyParameters :: Maybe [Text]
integrationHttpMethod :: Maybe Text
connectionType :: Maybe ConnectionType
timeoutInMillis :: Maybe Int
cacheNamespace :: Maybe Text
tlsConfig :: Maybe TlsConfig
uri :: Maybe Text
passthroughBehavior :: Maybe Text
contentHandling :: Maybe ContentHandlingStrategy
requestParameters :: Maybe (HashMap Text Text)
connectionId :: Maybe Text
credentials :: Maybe Text
requestTemplates :: Maybe (HashMap Text Text)
$sel:type':PutIntegration' :: PutIntegration -> IntegrationType
$sel:httpMethod:PutIntegration' :: PutIntegration -> Text
$sel:resourceId:PutIntegration' :: PutIntegration -> Text
$sel:restApiId:PutIntegration' :: PutIntegration -> Text
$sel:cacheKeyParameters:PutIntegration' :: PutIntegration -> Maybe [Text]
$sel:integrationHttpMethod:PutIntegration' :: PutIntegration -> Maybe Text
$sel:connectionType:PutIntegration' :: PutIntegration -> Maybe ConnectionType
$sel:timeoutInMillis:PutIntegration' :: PutIntegration -> Maybe Int
$sel:cacheNamespace:PutIntegration' :: PutIntegration -> Maybe Text
$sel:tlsConfig:PutIntegration' :: PutIntegration -> Maybe TlsConfig
$sel:uri:PutIntegration' :: PutIntegration -> Maybe Text
$sel:passthroughBehavior:PutIntegration' :: PutIntegration -> Maybe Text
$sel:contentHandling:PutIntegration' :: PutIntegration -> Maybe ContentHandlingStrategy
$sel:requestParameters:PutIntegration' :: PutIntegration -> Maybe (HashMap Text Text)
$sel:connectionId:PutIntegration' :: PutIntegration -> Maybe Text
$sel:credentials:PutIntegration' :: PutIntegration -> Maybe Text
$sel:requestTemplates:PutIntegration' :: PutIntegration -> Maybe (HashMap Text Text)
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/restapis/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
restApiId,
ByteString
"/resources/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
resourceId,
ByteString
"/methods/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
httpMethod,
ByteString
"/integration"
]
instance Core.ToQuery PutIntegration where
toQuery :: PutIntegration -> QueryString
toQuery = QueryString -> PutIntegration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty