{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.APIGateway.Types.Integration where
import Amazonka.APIGateway.Types.ConnectionType
import Amazonka.APIGateway.Types.ContentHandlingStrategy
import Amazonka.APIGateway.Types.IntegrationResponse
import Amazonka.APIGateway.Types.IntegrationType
import Amazonka.APIGateway.Types.TlsConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data Integration = Integration'
{
Integration -> Maybe Text
httpMethod :: Prelude.Maybe Prelude.Text,
Integration -> Maybe (HashMap Text Text)
requestTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Integration -> Maybe Text
credentials :: Prelude.Maybe Prelude.Text,
Integration -> Maybe Text
connectionId :: Prelude.Maybe Prelude.Text,
Integration -> Maybe (HashMap Text Text)
requestParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
Integration -> Maybe ContentHandlingStrategy
contentHandling :: Prelude.Maybe ContentHandlingStrategy,
Integration -> Maybe Text
passthroughBehavior :: Prelude.Maybe Prelude.Text,
Integration -> Maybe Text
uri :: Prelude.Maybe Prelude.Text,
Integration -> Maybe (HashMap Text IntegrationResponse)
integrationResponses :: Prelude.Maybe (Prelude.HashMap Prelude.Text IntegrationResponse),
Integration -> Maybe TlsConfig
tlsConfig :: Prelude.Maybe TlsConfig,
Integration -> Maybe Text
cacheNamespace :: Prelude.Maybe Prelude.Text,
Integration -> Maybe Int
timeoutInMillis :: Prelude.Maybe Prelude.Int,
Integration -> Maybe IntegrationType
type' :: Prelude.Maybe IntegrationType,
Integration -> Maybe ConnectionType
connectionType :: Prelude.Maybe ConnectionType,
Integration -> Maybe [Text]
cacheKeyParameters :: Prelude.Maybe [Prelude.Text]
}
deriving (Integration -> Integration -> Bool
(Integration -> Integration -> Bool)
-> (Integration -> Integration -> Bool) -> Eq Integration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Integration -> Integration -> Bool
$c/= :: Integration -> Integration -> Bool
== :: Integration -> Integration -> Bool
$c== :: Integration -> Integration -> Bool
Prelude.Eq, ReadPrec [Integration]
ReadPrec Integration
Int -> ReadS Integration
ReadS [Integration]
(Int -> ReadS Integration)
-> ReadS [Integration]
-> ReadPrec Integration
-> ReadPrec [Integration]
-> Read Integration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Integration]
$creadListPrec :: ReadPrec [Integration]
readPrec :: ReadPrec Integration
$creadPrec :: ReadPrec Integration
readList :: ReadS [Integration]
$creadList :: ReadS [Integration]
readsPrec :: Int -> ReadS Integration
$creadsPrec :: Int -> ReadS Integration
Prelude.Read, Int -> Integration -> ShowS
[Integration] -> ShowS
Integration -> String
(Int -> Integration -> ShowS)
-> (Integration -> String)
-> ([Integration] -> ShowS)
-> Show Integration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Integration] -> ShowS
$cshowList :: [Integration] -> ShowS
show :: Integration -> String
$cshow :: Integration -> String
showsPrec :: Int -> Integration -> ShowS
$cshowsPrec :: Int -> Integration -> ShowS
Prelude.Show, (forall x. Integration -> Rep Integration x)
-> (forall x. Rep Integration x -> Integration)
-> Generic Integration
forall x. Rep Integration x -> Integration
forall x. Integration -> Rep Integration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Integration x -> Integration
$cfrom :: forall x. Integration -> Rep Integration x
Prelude.Generic)
newIntegration ::
Integration
newIntegration :: Integration
newIntegration =
Integration' :: Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration
Integration'
{ $sel:httpMethod:Integration' :: Maybe Text
httpMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requestTemplates:Integration' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:credentials:Integration' :: Maybe Text
credentials = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:connectionId:Integration' :: Maybe Text
connectionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:requestParameters:Integration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:contentHandling:Integration' :: Maybe ContentHandlingStrategy
contentHandling = Maybe ContentHandlingStrategy
forall a. Maybe a
Prelude.Nothing,
$sel:passthroughBehavior:Integration' :: Maybe Text
passthroughBehavior = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:uri:Integration' :: Maybe Text
uri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:integrationResponses:Integration' :: Maybe (HashMap Text IntegrationResponse)
integrationResponses = Maybe (HashMap Text IntegrationResponse)
forall a. Maybe a
Prelude.Nothing,
$sel:tlsConfig:Integration' :: Maybe TlsConfig
tlsConfig = Maybe TlsConfig
forall a. Maybe a
Prelude.Nothing,
$sel:cacheNamespace:Integration' :: Maybe Text
cacheNamespace = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:timeoutInMillis:Integration' :: Maybe Int
timeoutInMillis = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:type':Integration' :: Maybe IntegrationType
type' = Maybe IntegrationType
forall a. Maybe a
Prelude.Nothing,
$sel:connectionType:Integration' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
forall a. Maybe a
Prelude.Nothing,
$sel:cacheKeyParameters:Integration' :: Maybe [Text]
cacheKeyParameters = Maybe [Text]
forall a. Maybe a
Prelude.Nothing
}
integration_httpMethod :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_httpMethod :: (Maybe Text -> f (Maybe Text)) -> Integration -> f Integration
integration_httpMethod = (Integration -> Maybe Text)
-> (Integration -> Maybe Text -> Integration)
-> Lens Integration Integration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
httpMethod :: Maybe Text
$sel:httpMethod:Integration' :: Integration -> Maybe Text
httpMethod} -> Maybe Text
httpMethod) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:httpMethod:Integration' :: Maybe Text
httpMethod = Maybe Text
a} :: Integration)
integration_requestTemplates :: Lens.Lens' Integration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
integration_requestTemplates :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Integration -> f Integration
integration_requestTemplates = (Integration -> Maybe (HashMap Text Text))
-> (Integration -> Maybe (HashMap Text Text) -> Integration)
-> Lens
Integration
Integration
(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 (\Integration' {Maybe (HashMap Text Text)
requestTemplates :: Maybe (HashMap Text Text)
$sel:requestTemplates:Integration' :: Integration -> Maybe (HashMap Text Text)
requestTemplates} -> Maybe (HashMap Text Text)
requestTemplates) (\s :: Integration
s@Integration' {} Maybe (HashMap Text Text)
a -> Integration
s {$sel:requestTemplates:Integration' :: Maybe (HashMap Text Text)
requestTemplates = Maybe (HashMap Text Text)
a} :: Integration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Integration -> f Integration)
-> ((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)))
-> Integration
-> f Integration
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
integration_credentials :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_credentials :: (Maybe Text -> f (Maybe Text)) -> Integration -> f Integration
integration_credentials = (Integration -> Maybe Text)
-> (Integration -> Maybe Text -> Integration)
-> Lens Integration Integration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
credentials :: Maybe Text
$sel:credentials:Integration' :: Integration -> Maybe Text
credentials} -> Maybe Text
credentials) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:credentials:Integration' :: Maybe Text
credentials = Maybe Text
a} :: Integration)
integration_connectionId :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_connectionId :: (Maybe Text -> f (Maybe Text)) -> Integration -> f Integration
integration_connectionId = (Integration -> Maybe Text)
-> (Integration -> Maybe Text -> Integration)
-> Lens Integration Integration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
connectionId :: Maybe Text
$sel:connectionId:Integration' :: Integration -> Maybe Text
connectionId} -> Maybe Text
connectionId) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:connectionId:Integration' :: Maybe Text
connectionId = Maybe Text
a} :: Integration)
integration_requestParameters :: Lens.Lens' Integration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
integration_requestParameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Integration -> f Integration
integration_requestParameters = (Integration -> Maybe (HashMap Text Text))
-> (Integration -> Maybe (HashMap Text Text) -> Integration)
-> Lens
Integration
Integration
(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 (\Integration' {Maybe (HashMap Text Text)
requestParameters :: Maybe (HashMap Text Text)
$sel:requestParameters:Integration' :: Integration -> Maybe (HashMap Text Text)
requestParameters} -> Maybe (HashMap Text Text)
requestParameters) (\s :: Integration
s@Integration' {} Maybe (HashMap Text Text)
a -> Integration
s {$sel:requestParameters:Integration' :: Maybe (HashMap Text Text)
requestParameters = Maybe (HashMap Text Text)
a} :: Integration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Integration -> f Integration)
-> ((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)))
-> Integration
-> f Integration
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
integration_contentHandling :: Lens.Lens' Integration (Prelude.Maybe ContentHandlingStrategy)
integration_contentHandling :: (Maybe ContentHandlingStrategy
-> f (Maybe ContentHandlingStrategy))
-> Integration -> f Integration
integration_contentHandling = (Integration -> Maybe ContentHandlingStrategy)
-> (Integration -> Maybe ContentHandlingStrategy -> Integration)
-> Lens
Integration
Integration
(Maybe ContentHandlingStrategy)
(Maybe ContentHandlingStrategy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe ContentHandlingStrategy
contentHandling :: Maybe ContentHandlingStrategy
$sel:contentHandling:Integration' :: Integration -> Maybe ContentHandlingStrategy
contentHandling} -> Maybe ContentHandlingStrategy
contentHandling) (\s :: Integration
s@Integration' {} Maybe ContentHandlingStrategy
a -> Integration
s {$sel:contentHandling:Integration' :: Maybe ContentHandlingStrategy
contentHandling = Maybe ContentHandlingStrategy
a} :: Integration)
integration_passthroughBehavior :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_passthroughBehavior :: (Maybe Text -> f (Maybe Text)) -> Integration -> f Integration
integration_passthroughBehavior = (Integration -> Maybe Text)
-> (Integration -> Maybe Text -> Integration)
-> Lens Integration Integration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
passthroughBehavior :: Maybe Text
$sel:passthroughBehavior:Integration' :: Integration -> Maybe Text
passthroughBehavior} -> Maybe Text
passthroughBehavior) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:passthroughBehavior:Integration' :: Maybe Text
passthroughBehavior = Maybe Text
a} :: Integration)
integration_uri :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_uri :: (Maybe Text -> f (Maybe Text)) -> Integration -> f Integration
integration_uri = (Integration -> Maybe Text)
-> (Integration -> Maybe Text -> Integration)
-> Lens Integration Integration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
uri :: Maybe Text
$sel:uri:Integration' :: Integration -> Maybe Text
uri} -> Maybe Text
uri) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:uri:Integration' :: Maybe Text
uri = Maybe Text
a} :: Integration)
integration_integrationResponses :: Lens.Lens' Integration (Prelude.Maybe (Prelude.HashMap Prelude.Text IntegrationResponse))
integration_integrationResponses :: (Maybe (HashMap Text IntegrationResponse)
-> f (Maybe (HashMap Text IntegrationResponse)))
-> Integration -> f Integration
integration_integrationResponses = (Integration -> Maybe (HashMap Text IntegrationResponse))
-> (Integration
-> Maybe (HashMap Text IntegrationResponse) -> Integration)
-> Lens
Integration
Integration
(Maybe (HashMap Text IntegrationResponse))
(Maybe (HashMap Text IntegrationResponse))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe (HashMap Text IntegrationResponse)
integrationResponses :: Maybe (HashMap Text IntegrationResponse)
$sel:integrationResponses:Integration' :: Integration -> Maybe (HashMap Text IntegrationResponse)
integrationResponses} -> Maybe (HashMap Text IntegrationResponse)
integrationResponses) (\s :: Integration
s@Integration' {} Maybe (HashMap Text IntegrationResponse)
a -> Integration
s {$sel:integrationResponses:Integration' :: Maybe (HashMap Text IntegrationResponse)
integrationResponses = Maybe (HashMap Text IntegrationResponse)
a} :: Integration) ((Maybe (HashMap Text IntegrationResponse)
-> f (Maybe (HashMap Text IntegrationResponse)))
-> Integration -> f Integration)
-> ((Maybe (HashMap Text IntegrationResponse)
-> f (Maybe (HashMap Text IntegrationResponse)))
-> Maybe (HashMap Text IntegrationResponse)
-> f (Maybe (HashMap Text IntegrationResponse)))
-> (Maybe (HashMap Text IntegrationResponse)
-> f (Maybe (HashMap Text IntegrationResponse)))
-> Integration
-> f Integration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text IntegrationResponse)
(HashMap Text IntegrationResponse)
(HashMap Text IntegrationResponse)
(HashMap Text IntegrationResponse)
-> Iso
(Maybe (HashMap Text IntegrationResponse))
(Maybe (HashMap Text IntegrationResponse))
(Maybe (HashMap Text IntegrationResponse))
(Maybe (HashMap Text IntegrationResponse))
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 IntegrationResponse)
(HashMap Text IntegrationResponse)
(HashMap Text IntegrationResponse)
(HashMap Text IntegrationResponse)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
integration_tlsConfig :: Lens.Lens' Integration (Prelude.Maybe TlsConfig)
integration_tlsConfig :: (Maybe TlsConfig -> f (Maybe TlsConfig))
-> Integration -> f Integration
integration_tlsConfig = (Integration -> Maybe TlsConfig)
-> (Integration -> Maybe TlsConfig -> Integration)
-> Lens Integration Integration (Maybe TlsConfig) (Maybe TlsConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe TlsConfig
tlsConfig :: Maybe TlsConfig
$sel:tlsConfig:Integration' :: Integration -> Maybe TlsConfig
tlsConfig} -> Maybe TlsConfig
tlsConfig) (\s :: Integration
s@Integration' {} Maybe TlsConfig
a -> Integration
s {$sel:tlsConfig:Integration' :: Maybe TlsConfig
tlsConfig = Maybe TlsConfig
a} :: Integration)
integration_cacheNamespace :: Lens.Lens' Integration (Prelude.Maybe Prelude.Text)
integration_cacheNamespace :: (Maybe Text -> f (Maybe Text)) -> Integration -> f Integration
integration_cacheNamespace = (Integration -> Maybe Text)
-> (Integration -> Maybe Text -> Integration)
-> Lens Integration Integration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Text
cacheNamespace :: Maybe Text
$sel:cacheNamespace:Integration' :: Integration -> Maybe Text
cacheNamespace} -> Maybe Text
cacheNamespace) (\s :: Integration
s@Integration' {} Maybe Text
a -> Integration
s {$sel:cacheNamespace:Integration' :: Maybe Text
cacheNamespace = Maybe Text
a} :: Integration)
integration_timeoutInMillis :: Lens.Lens' Integration (Prelude.Maybe Prelude.Int)
integration_timeoutInMillis :: (Maybe Int -> f (Maybe Int)) -> Integration -> f Integration
integration_timeoutInMillis = (Integration -> Maybe Int)
-> (Integration -> Maybe Int -> Integration)
-> Lens Integration Integration (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe Int
timeoutInMillis :: Maybe Int
$sel:timeoutInMillis:Integration' :: Integration -> Maybe Int
timeoutInMillis} -> Maybe Int
timeoutInMillis) (\s :: Integration
s@Integration' {} Maybe Int
a -> Integration
s {$sel:timeoutInMillis:Integration' :: Maybe Int
timeoutInMillis = Maybe Int
a} :: Integration)
integration_type :: Lens.Lens' Integration (Prelude.Maybe IntegrationType)
integration_type :: (Maybe IntegrationType -> f (Maybe IntegrationType))
-> Integration -> f Integration
integration_type = (Integration -> Maybe IntegrationType)
-> (Integration -> Maybe IntegrationType -> Integration)
-> Lens
Integration
Integration
(Maybe IntegrationType)
(Maybe IntegrationType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe IntegrationType
type' :: Maybe IntegrationType
$sel:type':Integration' :: Integration -> Maybe IntegrationType
type'} -> Maybe IntegrationType
type') (\s :: Integration
s@Integration' {} Maybe IntegrationType
a -> Integration
s {$sel:type':Integration' :: Maybe IntegrationType
type' = Maybe IntegrationType
a} :: Integration)
integration_connectionType :: Lens.Lens' Integration (Prelude.Maybe ConnectionType)
integration_connectionType :: (Maybe ConnectionType -> f (Maybe ConnectionType))
-> Integration -> f Integration
integration_connectionType = (Integration -> Maybe ConnectionType)
-> (Integration -> Maybe ConnectionType -> Integration)
-> Lens
Integration
Integration
(Maybe ConnectionType)
(Maybe ConnectionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe ConnectionType
connectionType :: Maybe ConnectionType
$sel:connectionType:Integration' :: Integration -> Maybe ConnectionType
connectionType} -> Maybe ConnectionType
connectionType) (\s :: Integration
s@Integration' {} Maybe ConnectionType
a -> Integration
s {$sel:connectionType:Integration' :: Maybe ConnectionType
connectionType = Maybe ConnectionType
a} :: Integration)
integration_cacheKeyParameters :: Lens.Lens' Integration (Prelude.Maybe [Prelude.Text])
integration_cacheKeyParameters :: (Maybe [Text] -> f (Maybe [Text])) -> Integration -> f Integration
integration_cacheKeyParameters = (Integration -> Maybe [Text])
-> (Integration -> Maybe [Text] -> Integration)
-> Lens Integration Integration (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Integration' {Maybe [Text]
cacheKeyParameters :: Maybe [Text]
$sel:cacheKeyParameters:Integration' :: Integration -> Maybe [Text]
cacheKeyParameters} -> Maybe [Text]
cacheKeyParameters) (\s :: Integration
s@Integration' {} Maybe [Text]
a -> Integration
s {$sel:cacheKeyParameters:Integration' :: Maybe [Text]
cacheKeyParameters = Maybe [Text]
a} :: Integration) ((Maybe [Text] -> f (Maybe [Text]))
-> Integration -> f Integration)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Integration
-> f Integration
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
instance Core.FromJSON Integration where
parseJSON :: Value -> Parser Integration
parseJSON =
String
-> (Object -> Parser Integration) -> Value -> Parser Integration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Integration"
( \Object
x ->
Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration
Integration'
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"httpMethod")
Parser
(Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"requestTemplates"
Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"credentials")
Parser
(Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"connectionId")
Parser
(Maybe (HashMap Text Text)
-> Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe (HashMap Text Text))
-> Parser
(Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"requestParameters"
Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe ContentHandlingStrategy)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ContentHandlingStrategy)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"contentHandling")
Parser
(Maybe Text
-> Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"passthroughBehavior")
Parser
(Maybe Text
-> Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe Text)
-> Parser
(Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"uri")
Parser
(Maybe (HashMap Text IntegrationResponse)
-> Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe (HashMap Text IntegrationResponse))
-> Parser
(Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe (HashMap Text IntegrationResponse)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"integrationResponses"
Parser (Maybe (Maybe (HashMap Text IntegrationResponse)))
-> Maybe (HashMap Text IntegrationResponse)
-> Parser (Maybe (HashMap Text IntegrationResponse))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text IntegrationResponse)
forall a. Monoid a => a
Prelude.mempty
)
Parser
(Maybe TlsConfig
-> Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe TlsConfig)
-> Parser
(Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe TlsConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"tlsConfig")
Parser
(Maybe Text
-> Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe Text)
-> Parser
(Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cacheNamespace")
Parser
(Maybe Int
-> Maybe IntegrationType
-> Maybe ConnectionType
-> Maybe [Text]
-> Integration)
-> Parser (Maybe Int)
-> Parser
(Maybe IntegrationType
-> Maybe ConnectionType -> Maybe [Text] -> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"timeoutInMillis")
Parser
(Maybe IntegrationType
-> Maybe ConnectionType -> Maybe [Text] -> Integration)
-> Parser (Maybe IntegrationType)
-> Parser (Maybe ConnectionType -> Maybe [Text] -> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IntegrationType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser (Maybe ConnectionType -> Maybe [Text] -> Integration)
-> Parser (Maybe ConnectionType)
-> Parser (Maybe [Text] -> Integration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConnectionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"connectionType")
Parser (Maybe [Text] -> Integration)
-> Parser (Maybe [Text]) -> Parser Integration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"cacheKeyParameters"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable Integration
instance Prelude.NFData Integration