{-# 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.DeleteIntegration
(
DeleteIntegration (..),
newDeleteIntegration,
deleteIntegration_apiId,
deleteIntegration_integrationId,
DeleteIntegrationResponse' (..),
newDeleteIntegrationResponse',
)
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 DeleteIntegration = DeleteIntegration'
{
DeleteIntegration -> Text
apiId :: Prelude.Text,
DeleteIntegration -> Text
integrationId :: Prelude.Text
}
deriving (DeleteIntegration -> DeleteIntegration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteIntegration -> DeleteIntegration -> Bool
$c/= :: DeleteIntegration -> DeleteIntegration -> Bool
== :: DeleteIntegration -> DeleteIntegration -> Bool
$c== :: DeleteIntegration -> DeleteIntegration -> Bool
Prelude.Eq, ReadPrec [DeleteIntegration]
ReadPrec DeleteIntegration
Int -> ReadS DeleteIntegration
ReadS [DeleteIntegration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteIntegration]
$creadListPrec :: ReadPrec [DeleteIntegration]
readPrec :: ReadPrec DeleteIntegration
$creadPrec :: ReadPrec DeleteIntegration
readList :: ReadS [DeleteIntegration]
$creadList :: ReadS [DeleteIntegration]
readsPrec :: Int -> ReadS DeleteIntegration
$creadsPrec :: Int -> ReadS DeleteIntegration
Prelude.Read, Int -> DeleteIntegration -> ShowS
[DeleteIntegration] -> ShowS
DeleteIntegration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteIntegration] -> ShowS
$cshowList :: [DeleteIntegration] -> ShowS
show :: DeleteIntegration -> String
$cshow :: DeleteIntegration -> String
showsPrec :: Int -> DeleteIntegration -> ShowS
$cshowsPrec :: Int -> DeleteIntegration -> ShowS
Prelude.Show, forall x. Rep DeleteIntegration x -> DeleteIntegration
forall x. DeleteIntegration -> Rep DeleteIntegration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteIntegration x -> DeleteIntegration
$cfrom :: forall x. DeleteIntegration -> Rep DeleteIntegration x
Prelude.Generic)
newDeleteIntegration ::
Prelude.Text ->
Prelude.Text ->
DeleteIntegration
newDeleteIntegration :: Text -> Text -> DeleteIntegration
newDeleteIntegration Text
pApiId_ Text
pIntegrationId_ =
DeleteIntegration'
{ $sel:apiId:DeleteIntegration' :: Text
apiId = Text
pApiId_,
$sel:integrationId:DeleteIntegration' :: Text
integrationId = Text
pIntegrationId_
}
deleteIntegration_apiId :: Lens.Lens' DeleteIntegration Prelude.Text
deleteIntegration_apiId :: Lens' DeleteIntegration Text
deleteIntegration_apiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteIntegration' {Text
apiId :: Text
$sel:apiId:DeleteIntegration' :: DeleteIntegration -> Text
apiId} -> Text
apiId) (\s :: DeleteIntegration
s@DeleteIntegration' {} Text
a -> DeleteIntegration
s {$sel:apiId:DeleteIntegration' :: Text
apiId = Text
a} :: DeleteIntegration)
deleteIntegration_integrationId :: Lens.Lens' DeleteIntegration Prelude.Text
deleteIntegration_integrationId :: Lens' DeleteIntegration Text
deleteIntegration_integrationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteIntegration' {Text
integrationId :: Text
$sel:integrationId:DeleteIntegration' :: DeleteIntegration -> Text
integrationId} -> Text
integrationId) (\s :: DeleteIntegration
s@DeleteIntegration' {} Text
a -> DeleteIntegration
s {$sel:integrationId:DeleteIntegration' :: Text
integrationId = Text
a} :: DeleteIntegration)
instance Core.AWSRequest DeleteIntegration where
type
AWSResponse DeleteIntegration =
DeleteIntegrationResponse'
request :: (Service -> Service)
-> DeleteIntegration -> Request DeleteIntegration
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteIntegration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteIntegration)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteIntegrationResponse'
DeleteIntegrationResponse''
instance Prelude.Hashable DeleteIntegration where
hashWithSalt :: Int -> DeleteIntegration -> Int
hashWithSalt Int
_salt DeleteIntegration' {Text
integrationId :: Text
apiId :: Text
$sel:integrationId:DeleteIntegration' :: DeleteIntegration -> Text
$sel:apiId:DeleteIntegration' :: DeleteIntegration -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
apiId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
integrationId
instance Prelude.NFData DeleteIntegration where
rnf :: DeleteIntegration -> ()
rnf DeleteIntegration' {Text
integrationId :: Text
apiId :: Text
$sel:integrationId:DeleteIntegration' :: DeleteIntegration -> Text
$sel:apiId:DeleteIntegration' :: DeleteIntegration -> Text
..} =
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
instance Data.ToHeaders DeleteIntegration where
toHeaders :: DeleteIntegration -> [Header]
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 -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DeleteIntegration where
toPath :: DeleteIntegration -> ByteString
toPath DeleteIntegration' {Text
integrationId :: Text
apiId :: Text
$sel:integrationId:DeleteIntegration' :: DeleteIntegration -> Text
$sel:apiId:DeleteIntegration' :: DeleteIntegration -> Text
..} =
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
]
instance Data.ToQuery DeleteIntegration where
toQuery :: DeleteIntegration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteIntegrationResponse' = DeleteIntegrationResponse''
{
}
deriving (DeleteIntegrationResponse' -> DeleteIntegrationResponse' -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteIntegrationResponse' -> DeleteIntegrationResponse' -> Bool
$c/= :: DeleteIntegrationResponse' -> DeleteIntegrationResponse' -> Bool
== :: DeleteIntegrationResponse' -> DeleteIntegrationResponse' -> Bool
$c== :: DeleteIntegrationResponse' -> DeleteIntegrationResponse' -> Bool
Prelude.Eq, ReadPrec [DeleteIntegrationResponse']
ReadPrec DeleteIntegrationResponse'
Int -> ReadS DeleteIntegrationResponse'
ReadS [DeleteIntegrationResponse']
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteIntegrationResponse']
$creadListPrec :: ReadPrec [DeleteIntegrationResponse']
readPrec :: ReadPrec DeleteIntegrationResponse'
$creadPrec :: ReadPrec DeleteIntegrationResponse'
readList :: ReadS [DeleteIntegrationResponse']
$creadList :: ReadS [DeleteIntegrationResponse']
readsPrec :: Int -> ReadS DeleteIntegrationResponse'
$creadsPrec :: Int -> ReadS DeleteIntegrationResponse'
Prelude.Read, Int -> DeleteIntegrationResponse' -> ShowS
[DeleteIntegrationResponse'] -> ShowS
DeleteIntegrationResponse' -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteIntegrationResponse'] -> ShowS
$cshowList :: [DeleteIntegrationResponse'] -> ShowS
show :: DeleteIntegrationResponse' -> String
$cshow :: DeleteIntegrationResponse' -> String
showsPrec :: Int -> DeleteIntegrationResponse' -> ShowS
$cshowsPrec :: Int -> DeleteIntegrationResponse' -> ShowS
Prelude.Show, forall x.
Rep DeleteIntegrationResponse' x -> DeleteIntegrationResponse'
forall x.
DeleteIntegrationResponse' -> Rep DeleteIntegrationResponse' x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteIntegrationResponse' x -> DeleteIntegrationResponse'
$cfrom :: forall x.
DeleteIntegrationResponse' -> Rep DeleteIntegrationResponse' x
Prelude.Generic)
newDeleteIntegrationResponse' ::
DeleteIntegrationResponse'
newDeleteIntegrationResponse' :: DeleteIntegrationResponse'
newDeleteIntegrationResponse' =
DeleteIntegrationResponse'
DeleteIntegrationResponse''
instance Prelude.NFData DeleteIntegrationResponse' where
rnf :: DeleteIntegrationResponse' -> ()
rnf DeleteIntegrationResponse'
_ = ()