{-# 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.ApiGatewayV2.CreateIntegrationResponse
(
CreateIntegrationResponse (..),
newCreateIntegrationResponse,
createIntegrationResponse_contentHandlingStrategy,
createIntegrationResponse_responseParameters,
createIntegrationResponse_responseTemplates,
createIntegrationResponse_templateSelectionExpression,
createIntegrationResponse_apiId,
createIntegrationResponse_integrationId,
createIntegrationResponse_integrationResponseKey,
CreateIntegrationResponseResponse (..),
newCreateIntegrationResponseResponse,
createIntegrationResponseResponse_contentHandlingStrategy,
createIntegrationResponseResponse_integrationResponseId,
createIntegrationResponseResponse_integrationResponseKey,
createIntegrationResponseResponse_responseParameters,
createIntegrationResponseResponse_responseTemplates,
createIntegrationResponseResponse_templateSelectionExpression,
createIntegrationResponseResponse_httpStatus,
)
where
import Amazonka.ApiGatewayV2.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateIntegrationResponse = CreateIntegrationResponse'
{
CreateIntegrationResponse -> Maybe ContentHandlingStrategy
contentHandlingStrategy :: Prelude.Maybe ContentHandlingStrategy,
CreateIntegrationResponse -> Maybe (HashMap Text Text)
responseParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateIntegrationResponse -> Maybe (HashMap Text Text)
responseTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateIntegrationResponse -> Maybe Text
templateSelectionExpression :: Prelude.Maybe Prelude.Text,
CreateIntegrationResponse -> Text
apiId :: Prelude.Text,
CreateIntegrationResponse -> Text
integrationId :: Prelude.Text,
CreateIntegrationResponse -> Text
integrationResponseKey :: Prelude.Text
}
deriving (CreateIntegrationResponse -> CreateIntegrationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIntegrationResponse -> CreateIntegrationResponse -> Bool
$c/= :: CreateIntegrationResponse -> CreateIntegrationResponse -> Bool
== :: CreateIntegrationResponse -> CreateIntegrationResponse -> Bool
$c== :: CreateIntegrationResponse -> CreateIntegrationResponse -> Bool
Prelude.Eq, ReadPrec [CreateIntegrationResponse]
ReadPrec CreateIntegrationResponse
Int -> ReadS CreateIntegrationResponse
ReadS [CreateIntegrationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIntegrationResponse]
$creadListPrec :: ReadPrec [CreateIntegrationResponse]
readPrec :: ReadPrec CreateIntegrationResponse
$creadPrec :: ReadPrec CreateIntegrationResponse
readList :: ReadS [CreateIntegrationResponse]
$creadList :: ReadS [CreateIntegrationResponse]
readsPrec :: Int -> ReadS CreateIntegrationResponse
$creadsPrec :: Int -> ReadS CreateIntegrationResponse
Prelude.Read, Int -> CreateIntegrationResponse -> ShowS
[CreateIntegrationResponse] -> ShowS
CreateIntegrationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIntegrationResponse] -> ShowS
$cshowList :: [CreateIntegrationResponse] -> ShowS
show :: CreateIntegrationResponse -> String
$cshow :: CreateIntegrationResponse -> String
showsPrec :: Int -> CreateIntegrationResponse -> ShowS
$cshowsPrec :: Int -> CreateIntegrationResponse -> ShowS
Prelude.Show, forall x.
Rep CreateIntegrationResponse x -> CreateIntegrationResponse
forall x.
CreateIntegrationResponse -> Rep CreateIntegrationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateIntegrationResponse x -> CreateIntegrationResponse
$cfrom :: forall x.
CreateIntegrationResponse -> Rep CreateIntegrationResponse x
Prelude.Generic)
newCreateIntegrationResponse ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateIntegrationResponse
newCreateIntegrationResponse :: Text -> Text -> Text -> CreateIntegrationResponse
newCreateIntegrationResponse
Text
pApiId_
Text
pIntegrationId_
Text
pIntegrationResponseKey_ =
CreateIntegrationResponse'
{ $sel:contentHandlingStrategy:CreateIntegrationResponse' :: Maybe ContentHandlingStrategy
contentHandlingStrategy =
forall a. Maybe a
Prelude.Nothing,
$sel:responseParameters:CreateIntegrationResponse' :: Maybe (HashMap Text Text)
responseParameters = forall a. Maybe a
Prelude.Nothing,
$sel:responseTemplates:CreateIntegrationResponse' :: Maybe (HashMap Text Text)
responseTemplates = forall a. Maybe a
Prelude.Nothing,
$sel:templateSelectionExpression:CreateIntegrationResponse' :: Maybe Text
templateSelectionExpression = forall a. Maybe a
Prelude.Nothing,
$sel:apiId:CreateIntegrationResponse' :: Text
apiId = Text
pApiId_,
$sel:integrationId:CreateIntegrationResponse' :: Text
integrationId = Text
pIntegrationId_,
$sel:integrationResponseKey:CreateIntegrationResponse' :: Text
integrationResponseKey =
Text
pIntegrationResponseKey_
}
createIntegrationResponse_contentHandlingStrategy :: Lens.Lens' CreateIntegrationResponse (Prelude.Maybe ContentHandlingStrategy)
createIntegrationResponse_contentHandlingStrategy :: Lens' CreateIntegrationResponse (Maybe ContentHandlingStrategy)
createIntegrationResponse_contentHandlingStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse' {Maybe ContentHandlingStrategy
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:contentHandlingStrategy:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe ContentHandlingStrategy
contentHandlingStrategy} -> Maybe ContentHandlingStrategy
contentHandlingStrategy) (\s :: CreateIntegrationResponse
s@CreateIntegrationResponse' {} Maybe ContentHandlingStrategy
a -> CreateIntegrationResponse
s {$sel:contentHandlingStrategy:CreateIntegrationResponse' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
a} :: CreateIntegrationResponse)
createIntegrationResponse_responseParameters :: Lens.Lens' CreateIntegrationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegrationResponse_responseParameters :: Lens' CreateIntegrationResponse (Maybe (HashMap Text Text))
createIntegrationResponse_responseParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse' {Maybe (HashMap Text Text)
responseParameters :: Maybe (HashMap Text Text)
$sel:responseParameters:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
responseParameters} -> Maybe (HashMap Text Text)
responseParameters) (\s :: CreateIntegrationResponse
s@CreateIntegrationResponse' {} Maybe (HashMap Text Text)
a -> CreateIntegrationResponse
s {$sel:responseParameters:CreateIntegrationResponse' :: Maybe (HashMap Text Text)
responseParameters = Maybe (HashMap Text Text)
a} :: CreateIntegrationResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIntegrationResponse_responseTemplates :: Lens.Lens' CreateIntegrationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegrationResponse_responseTemplates :: Lens' CreateIntegrationResponse (Maybe (HashMap Text Text))
createIntegrationResponse_responseTemplates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse' {Maybe (HashMap Text Text)
responseTemplates :: Maybe (HashMap Text Text)
$sel:responseTemplates:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
responseTemplates} -> Maybe (HashMap Text Text)
responseTemplates) (\s :: CreateIntegrationResponse
s@CreateIntegrationResponse' {} Maybe (HashMap Text Text)
a -> CreateIntegrationResponse
s {$sel:responseTemplates:CreateIntegrationResponse' :: Maybe (HashMap Text Text)
responseTemplates = Maybe (HashMap Text Text)
a} :: CreateIntegrationResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIntegrationResponse_templateSelectionExpression :: Lens.Lens' CreateIntegrationResponse (Prelude.Maybe Prelude.Text)
createIntegrationResponse_templateSelectionExpression :: Lens' CreateIntegrationResponse (Maybe Text)
createIntegrationResponse_templateSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse' {Maybe Text
templateSelectionExpression :: Maybe Text
$sel:templateSelectionExpression:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe Text
templateSelectionExpression} -> Maybe Text
templateSelectionExpression) (\s :: CreateIntegrationResponse
s@CreateIntegrationResponse' {} Maybe Text
a -> CreateIntegrationResponse
s {$sel:templateSelectionExpression:CreateIntegrationResponse' :: Maybe Text
templateSelectionExpression = Maybe Text
a} :: CreateIntegrationResponse)
createIntegrationResponse_apiId :: Lens.Lens' CreateIntegrationResponse Prelude.Text
createIntegrationResponse_apiId :: Lens' CreateIntegrationResponse Text
createIntegrationResponse_apiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse' {Text
apiId :: Text
$sel:apiId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
apiId} -> Text
apiId) (\s :: CreateIntegrationResponse
s@CreateIntegrationResponse' {} Text
a -> CreateIntegrationResponse
s {$sel:apiId:CreateIntegrationResponse' :: Text
apiId = Text
a} :: CreateIntegrationResponse)
createIntegrationResponse_integrationId :: Lens.Lens' CreateIntegrationResponse Prelude.Text
createIntegrationResponse_integrationId :: Lens' CreateIntegrationResponse Text
createIntegrationResponse_integrationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse' {Text
integrationId :: Text
$sel:integrationId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
integrationId} -> Text
integrationId) (\s :: CreateIntegrationResponse
s@CreateIntegrationResponse' {} Text
a -> CreateIntegrationResponse
s {$sel:integrationId:CreateIntegrationResponse' :: Text
integrationId = Text
a} :: CreateIntegrationResponse)
createIntegrationResponse_integrationResponseKey :: Lens.Lens' CreateIntegrationResponse Prelude.Text
createIntegrationResponse_integrationResponseKey :: Lens' CreateIntegrationResponse Text
createIntegrationResponse_integrationResponseKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponse' {Text
integrationResponseKey :: Text
$sel:integrationResponseKey:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
integrationResponseKey} -> Text
integrationResponseKey) (\s :: CreateIntegrationResponse
s@CreateIntegrationResponse' {} Text
a -> CreateIntegrationResponse
s {$sel:integrationResponseKey:CreateIntegrationResponse' :: Text
integrationResponseKey = Text
a} :: CreateIntegrationResponse)
instance Core.AWSRequest CreateIntegrationResponse where
type
AWSResponse CreateIntegrationResponse =
CreateIntegrationResponseResponse
request :: (Service -> Service)
-> CreateIntegrationResponse -> Request CreateIntegrationResponse
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateIntegrationResponse
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateIntegrationResponse)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe ContentHandlingStrategy
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Int
-> CreateIntegrationResponseResponse
CreateIntegrationResponseResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"contentHandlingStrategy")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"integrationResponseId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"integrationResponseKey")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"responseParameters"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"responseTemplates"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"templateSelectionExpression")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable CreateIntegrationResponse where
hashWithSalt :: Int -> CreateIntegrationResponse -> Int
hashWithSalt Int
_salt CreateIntegrationResponse' {Maybe Text
Maybe (HashMap Text Text)
Maybe ContentHandlingStrategy
Text
integrationResponseKey :: Text
integrationId :: Text
apiId :: Text
templateSelectionExpression :: Maybe Text
responseTemplates :: Maybe (HashMap Text Text)
responseParameters :: Maybe (HashMap Text Text)
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:integrationResponseKey:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:integrationId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:apiId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:templateSelectionExpression:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe Text
$sel:responseTemplates:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
$sel:responseParameters:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
$sel:contentHandlingStrategy:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe ContentHandlingStrategy
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ContentHandlingStrategy
contentHandlingStrategy
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
responseParameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
responseTemplates
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
templateSelectionExpression
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
apiId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
integrationId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
integrationResponseKey
instance Prelude.NFData CreateIntegrationResponse where
rnf :: CreateIntegrationResponse -> ()
rnf CreateIntegrationResponse' {Maybe Text
Maybe (HashMap Text Text)
Maybe ContentHandlingStrategy
Text
integrationResponseKey :: Text
integrationId :: Text
apiId :: Text
templateSelectionExpression :: Maybe Text
responseTemplates :: Maybe (HashMap Text Text)
responseParameters :: Maybe (HashMap Text Text)
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:integrationResponseKey:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:integrationId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:apiId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:templateSelectionExpression:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe Text
$sel:responseTemplates:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
$sel:responseParameters:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
$sel:contentHandlingStrategy:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe ContentHandlingStrategy
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ContentHandlingStrategy
contentHandlingStrategy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
responseParameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
responseTemplates
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateSelectionExpression
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
apiId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
integrationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
integrationResponseKey
instance Data.ToHeaders CreateIntegrationResponse where
toHeaders :: CreateIntegrationResponse -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON CreateIntegrationResponse where
toJSON :: CreateIntegrationResponse -> Value
toJSON CreateIntegrationResponse' {Maybe Text
Maybe (HashMap Text Text)
Maybe ContentHandlingStrategy
Text
integrationResponseKey :: Text
integrationId :: Text
apiId :: Text
templateSelectionExpression :: Maybe Text
responseTemplates :: Maybe (HashMap Text Text)
responseParameters :: Maybe (HashMap Text Text)
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:integrationResponseKey:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:integrationId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:apiId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:templateSelectionExpression:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe Text
$sel:responseTemplates:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
$sel:responseParameters:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
$sel:contentHandlingStrategy:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe ContentHandlingStrategy
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"contentHandlingStrategy" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContentHandlingStrategy
contentHandlingStrategy,
(Key
"responseParameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
responseParameters,
(Key
"responseTemplates" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
responseTemplates,
(Key
"templateSelectionExpression" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
templateSelectionExpression,
forall a. a -> Maybe a
Prelude.Just
( Key
"integrationResponseKey"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
integrationResponseKey
)
]
)
instance Data.ToPath CreateIntegrationResponse where
toPath :: CreateIntegrationResponse -> ByteString
toPath CreateIntegrationResponse' {Maybe Text
Maybe (HashMap Text Text)
Maybe ContentHandlingStrategy
Text
integrationResponseKey :: Text
integrationId :: Text
apiId :: Text
templateSelectionExpression :: Maybe Text
responseTemplates :: Maybe (HashMap Text Text)
responseParameters :: Maybe (HashMap Text Text)
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:integrationResponseKey:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:integrationId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:apiId:CreateIntegrationResponse' :: CreateIntegrationResponse -> Text
$sel:templateSelectionExpression:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe Text
$sel:responseTemplates:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
$sel:responseParameters:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe (HashMap Text Text)
$sel:contentHandlingStrategy:CreateIntegrationResponse' :: CreateIntegrationResponse -> Maybe ContentHandlingStrategy
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v2/apis/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
apiId,
ByteString
"/integrations/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
integrationId,
ByteString
"/integrationresponses"
]
instance Data.ToQuery CreateIntegrationResponse where
toQuery :: CreateIntegrationResponse -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data CreateIntegrationResponseResponse = CreateIntegrationResponseResponse'
{
CreateIntegrationResponseResponse -> Maybe ContentHandlingStrategy
contentHandlingStrategy :: Prelude.Maybe ContentHandlingStrategy,
CreateIntegrationResponseResponse -> Maybe Text
integrationResponseId :: Prelude.Maybe Prelude.Text,
CreateIntegrationResponseResponse -> Maybe Text
integrationResponseKey :: Prelude.Maybe Prelude.Text,
CreateIntegrationResponseResponse -> Maybe (HashMap Text Text)
responseParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateIntegrationResponseResponse -> Maybe (HashMap Text Text)
responseTemplates :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateIntegrationResponseResponse -> Maybe Text
templateSelectionExpression :: Prelude.Maybe Prelude.Text,
CreateIntegrationResponseResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateIntegrationResponseResponse
-> CreateIntegrationResponseResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateIntegrationResponseResponse
-> CreateIntegrationResponseResponse -> Bool
$c/= :: CreateIntegrationResponseResponse
-> CreateIntegrationResponseResponse -> Bool
== :: CreateIntegrationResponseResponse
-> CreateIntegrationResponseResponse -> Bool
$c== :: CreateIntegrationResponseResponse
-> CreateIntegrationResponseResponse -> Bool
Prelude.Eq, ReadPrec [CreateIntegrationResponseResponse]
ReadPrec CreateIntegrationResponseResponse
Int -> ReadS CreateIntegrationResponseResponse
ReadS [CreateIntegrationResponseResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateIntegrationResponseResponse]
$creadListPrec :: ReadPrec [CreateIntegrationResponseResponse]
readPrec :: ReadPrec CreateIntegrationResponseResponse
$creadPrec :: ReadPrec CreateIntegrationResponseResponse
readList :: ReadS [CreateIntegrationResponseResponse]
$creadList :: ReadS [CreateIntegrationResponseResponse]
readsPrec :: Int -> ReadS CreateIntegrationResponseResponse
$creadsPrec :: Int -> ReadS CreateIntegrationResponseResponse
Prelude.Read, Int -> CreateIntegrationResponseResponse -> ShowS
[CreateIntegrationResponseResponse] -> ShowS
CreateIntegrationResponseResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateIntegrationResponseResponse] -> ShowS
$cshowList :: [CreateIntegrationResponseResponse] -> ShowS
show :: CreateIntegrationResponseResponse -> String
$cshow :: CreateIntegrationResponseResponse -> String
showsPrec :: Int -> CreateIntegrationResponseResponse -> ShowS
$cshowsPrec :: Int -> CreateIntegrationResponseResponse -> ShowS
Prelude.Show, forall x.
Rep CreateIntegrationResponseResponse x
-> CreateIntegrationResponseResponse
forall x.
CreateIntegrationResponseResponse
-> Rep CreateIntegrationResponseResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateIntegrationResponseResponse x
-> CreateIntegrationResponseResponse
$cfrom :: forall x.
CreateIntegrationResponseResponse
-> Rep CreateIntegrationResponseResponse x
Prelude.Generic)
newCreateIntegrationResponseResponse ::
Prelude.Int ->
CreateIntegrationResponseResponse
newCreateIntegrationResponseResponse :: Int -> CreateIntegrationResponseResponse
newCreateIntegrationResponseResponse Int
pHttpStatus_ =
CreateIntegrationResponseResponse'
{ $sel:contentHandlingStrategy:CreateIntegrationResponseResponse' :: Maybe ContentHandlingStrategy
contentHandlingStrategy =
forall a. Maybe a
Prelude.Nothing,
$sel:integrationResponseId:CreateIntegrationResponseResponse' :: Maybe Text
integrationResponseId = forall a. Maybe a
Prelude.Nothing,
$sel:integrationResponseKey:CreateIntegrationResponseResponse' :: Maybe Text
integrationResponseKey = forall a. Maybe a
Prelude.Nothing,
$sel:responseParameters:CreateIntegrationResponseResponse' :: Maybe (HashMap Text Text)
responseParameters = forall a. Maybe a
Prelude.Nothing,
$sel:responseTemplates:CreateIntegrationResponseResponse' :: Maybe (HashMap Text Text)
responseTemplates = forall a. Maybe a
Prelude.Nothing,
$sel:templateSelectionExpression:CreateIntegrationResponseResponse' :: Maybe Text
templateSelectionExpression =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateIntegrationResponseResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createIntegrationResponseResponse_contentHandlingStrategy :: Lens.Lens' CreateIntegrationResponseResponse (Prelude.Maybe ContentHandlingStrategy)
createIntegrationResponseResponse_contentHandlingStrategy :: Lens'
CreateIntegrationResponseResponse (Maybe ContentHandlingStrategy)
createIntegrationResponseResponse_contentHandlingStrategy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponseResponse' {Maybe ContentHandlingStrategy
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:contentHandlingStrategy:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe ContentHandlingStrategy
contentHandlingStrategy} -> Maybe ContentHandlingStrategy
contentHandlingStrategy) (\s :: CreateIntegrationResponseResponse
s@CreateIntegrationResponseResponse' {} Maybe ContentHandlingStrategy
a -> CreateIntegrationResponseResponse
s {$sel:contentHandlingStrategy:CreateIntegrationResponseResponse' :: Maybe ContentHandlingStrategy
contentHandlingStrategy = Maybe ContentHandlingStrategy
a} :: CreateIntegrationResponseResponse)
createIntegrationResponseResponse_integrationResponseId :: Lens.Lens' CreateIntegrationResponseResponse (Prelude.Maybe Prelude.Text)
createIntegrationResponseResponse_integrationResponseId :: Lens' CreateIntegrationResponseResponse (Maybe Text)
createIntegrationResponseResponse_integrationResponseId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponseResponse' {Maybe Text
integrationResponseId :: Maybe Text
$sel:integrationResponseId:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe Text
integrationResponseId} -> Maybe Text
integrationResponseId) (\s :: CreateIntegrationResponseResponse
s@CreateIntegrationResponseResponse' {} Maybe Text
a -> CreateIntegrationResponseResponse
s {$sel:integrationResponseId:CreateIntegrationResponseResponse' :: Maybe Text
integrationResponseId = Maybe Text
a} :: CreateIntegrationResponseResponse)
createIntegrationResponseResponse_integrationResponseKey :: Lens.Lens' CreateIntegrationResponseResponse (Prelude.Maybe Prelude.Text)
createIntegrationResponseResponse_integrationResponseKey :: Lens' CreateIntegrationResponseResponse (Maybe Text)
createIntegrationResponseResponse_integrationResponseKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponseResponse' {Maybe Text
integrationResponseKey :: Maybe Text
$sel:integrationResponseKey:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe Text
integrationResponseKey} -> Maybe Text
integrationResponseKey) (\s :: CreateIntegrationResponseResponse
s@CreateIntegrationResponseResponse' {} Maybe Text
a -> CreateIntegrationResponseResponse
s {$sel:integrationResponseKey:CreateIntegrationResponseResponse' :: Maybe Text
integrationResponseKey = Maybe Text
a} :: CreateIntegrationResponseResponse)
createIntegrationResponseResponse_responseParameters :: Lens.Lens' CreateIntegrationResponseResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegrationResponseResponse_responseParameters :: Lens' CreateIntegrationResponseResponse (Maybe (HashMap Text Text))
createIntegrationResponseResponse_responseParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponseResponse' {Maybe (HashMap Text Text)
responseParameters :: Maybe (HashMap Text Text)
$sel:responseParameters:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe (HashMap Text Text)
responseParameters} -> Maybe (HashMap Text Text)
responseParameters) (\s :: CreateIntegrationResponseResponse
s@CreateIntegrationResponseResponse' {} Maybe (HashMap Text Text)
a -> CreateIntegrationResponseResponse
s {$sel:responseParameters:CreateIntegrationResponseResponse' :: Maybe (HashMap Text Text)
responseParameters = Maybe (HashMap Text Text)
a} :: CreateIntegrationResponseResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIntegrationResponseResponse_responseTemplates :: Lens.Lens' CreateIntegrationResponseResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createIntegrationResponseResponse_responseTemplates :: Lens' CreateIntegrationResponseResponse (Maybe (HashMap Text Text))
createIntegrationResponseResponse_responseTemplates = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponseResponse' {Maybe (HashMap Text Text)
responseTemplates :: Maybe (HashMap Text Text)
$sel:responseTemplates:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe (HashMap Text Text)
responseTemplates} -> Maybe (HashMap Text Text)
responseTemplates) (\s :: CreateIntegrationResponseResponse
s@CreateIntegrationResponseResponse' {} Maybe (HashMap Text Text)
a -> CreateIntegrationResponseResponse
s {$sel:responseTemplates:CreateIntegrationResponseResponse' :: Maybe (HashMap Text Text)
responseTemplates = Maybe (HashMap Text Text)
a} :: CreateIntegrationResponseResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createIntegrationResponseResponse_templateSelectionExpression :: Lens.Lens' CreateIntegrationResponseResponse (Prelude.Maybe Prelude.Text)
createIntegrationResponseResponse_templateSelectionExpression :: Lens' CreateIntegrationResponseResponse (Maybe Text)
createIntegrationResponseResponse_templateSelectionExpression = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponseResponse' {Maybe Text
templateSelectionExpression :: Maybe Text
$sel:templateSelectionExpression:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe Text
templateSelectionExpression} -> Maybe Text
templateSelectionExpression) (\s :: CreateIntegrationResponseResponse
s@CreateIntegrationResponseResponse' {} Maybe Text
a -> CreateIntegrationResponseResponse
s {$sel:templateSelectionExpression:CreateIntegrationResponseResponse' :: Maybe Text
templateSelectionExpression = Maybe Text
a} :: CreateIntegrationResponseResponse)
createIntegrationResponseResponse_httpStatus :: Lens.Lens' CreateIntegrationResponseResponse Prelude.Int
createIntegrationResponseResponse_httpStatus :: Lens' CreateIntegrationResponseResponse Int
createIntegrationResponseResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateIntegrationResponseResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateIntegrationResponseResponse
s@CreateIntegrationResponseResponse' {} Int
a -> CreateIntegrationResponseResponse
s {$sel:httpStatus:CreateIntegrationResponseResponse' :: Int
httpStatus = Int
a} :: CreateIntegrationResponseResponse)
instance
Prelude.NFData
CreateIntegrationResponseResponse
where
rnf :: CreateIntegrationResponseResponse -> ()
rnf CreateIntegrationResponseResponse' {Int
Maybe Text
Maybe (HashMap Text Text)
Maybe ContentHandlingStrategy
httpStatus :: Int
templateSelectionExpression :: Maybe Text
responseTemplates :: Maybe (HashMap Text Text)
responseParameters :: Maybe (HashMap Text Text)
integrationResponseKey :: Maybe Text
integrationResponseId :: Maybe Text
contentHandlingStrategy :: Maybe ContentHandlingStrategy
$sel:httpStatus:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Int
$sel:templateSelectionExpression:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe Text
$sel:responseTemplates:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe (HashMap Text Text)
$sel:responseParameters:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe (HashMap Text Text)
$sel:integrationResponseKey:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe Text
$sel:integrationResponseId:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe Text
$sel:contentHandlingStrategy:CreateIntegrationResponseResponse' :: CreateIntegrationResponseResponse -> Maybe ContentHandlingStrategy
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ContentHandlingStrategy
contentHandlingStrategy
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationResponseId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
integrationResponseKey
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
responseParameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
responseTemplates
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
templateSelectionExpression
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus