{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.ApiGatewayV2.DeleteIntegrationResponse
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes an IntegrationResponses.
module Amazonka.ApiGatewayV2.DeleteIntegrationResponse
  ( -- * Creating a Request
    DeleteIntegrationResponse (..),
    newDeleteIntegrationResponse,

    -- * Request Lenses
    deleteIntegrationResponse_apiId,
    deleteIntegrationResponse_integrationResponseId,
    deleteIntegrationResponse_integrationId,

    -- * Destructuring the Response
    DeleteIntegrationResponseResponse (..),
    newDeleteIntegrationResponseResponse,
  )
where

import Amazonka.ApiGatewayV2.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newDeleteIntegrationResponse' smart constructor.
data DeleteIntegrationResponse = DeleteIntegrationResponse'
  { -- | The API identifier.
    DeleteIntegrationResponse -> Text
apiId :: Prelude.Text,
    -- | The integration response ID.
    DeleteIntegrationResponse -> Text
integrationResponseId :: Prelude.Text,
    -- | The integration ID.
    DeleteIntegrationResponse -> Text
integrationId :: Prelude.Text
  }
  deriving (DeleteIntegrationResponse -> DeleteIntegrationResponse -> Bool
(DeleteIntegrationResponse -> DeleteIntegrationResponse -> Bool)
-> (DeleteIntegrationResponse -> DeleteIntegrationResponse -> Bool)
-> Eq DeleteIntegrationResponse
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]
(Int -> ReadS DeleteIntegrationResponse)
-> ReadS [DeleteIntegrationResponse]
-> ReadPrec DeleteIntegrationResponse
-> ReadPrec [DeleteIntegrationResponse]
-> Read 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
(Int -> DeleteIntegrationResponse -> ShowS)
-> (DeleteIntegrationResponse -> String)
-> ([DeleteIntegrationResponse] -> ShowS)
-> Show DeleteIntegrationResponse
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.
 DeleteIntegrationResponse -> Rep DeleteIntegrationResponse x)
-> (forall x.
    Rep DeleteIntegrationResponse x -> DeleteIntegrationResponse)
-> Generic DeleteIntegrationResponse
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)

-- |
-- Create a value of 'DeleteIntegrationResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'apiId', 'deleteIntegrationResponse_apiId' - The API identifier.
--
-- 'integrationResponseId', 'deleteIntegrationResponse_integrationResponseId' - The integration response ID.
--
-- 'integrationId', 'deleteIntegrationResponse_integrationId' - The integration ID.
newDeleteIntegrationResponse ::
  -- | 'apiId'
  Prelude.Text ->
  -- | 'integrationResponseId'
  Prelude.Text ->
  -- | 'integrationId'
  Prelude.Text ->
  DeleteIntegrationResponse
newDeleteIntegrationResponse :: Text -> Text -> Text -> DeleteIntegrationResponse
newDeleteIntegrationResponse
  Text
pApiId_
  Text
pIntegrationResponseId_
  Text
pIntegrationId_ =
    DeleteIntegrationResponse' :: Text -> Text -> Text -> DeleteIntegrationResponse
DeleteIntegrationResponse'
      { $sel:apiId:DeleteIntegrationResponse' :: Text
apiId = Text
pApiId_,
        $sel:integrationResponseId:DeleteIntegrationResponse' :: Text
integrationResponseId = Text
pIntegrationResponseId_,
        $sel:integrationId:DeleteIntegrationResponse' :: Text
integrationId = Text
pIntegrationId_
      }

-- | The API identifier.
deleteIntegrationResponse_apiId :: Lens.Lens' DeleteIntegrationResponse Prelude.Text
deleteIntegrationResponse_apiId :: (Text -> f Text)
-> DeleteIntegrationResponse -> f DeleteIntegrationResponse
deleteIntegrationResponse_apiId = (DeleteIntegrationResponse -> Text)
-> (DeleteIntegrationResponse -> Text -> DeleteIntegrationResponse)
-> Lens
     DeleteIntegrationResponse DeleteIntegrationResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteIntegrationResponse' {Text
apiId :: Text
$sel:apiId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
apiId} -> Text
apiId) (\s :: DeleteIntegrationResponse
s@DeleteIntegrationResponse' {} Text
a -> DeleteIntegrationResponse
s {$sel:apiId:DeleteIntegrationResponse' :: Text
apiId = Text
a} :: DeleteIntegrationResponse)

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

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

instance Core.AWSRequest DeleteIntegrationResponse where
  type
    AWSResponse DeleteIntegrationResponse =
      DeleteIntegrationResponseResponse
  request :: DeleteIntegrationResponse -> Request DeleteIntegrationResponse
request = Service
-> DeleteIntegrationResponse -> Request DeleteIntegrationResponse
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteIntegrationResponse
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteIntegrationResponse)))
response =
    AWSResponse DeleteIntegrationResponse
-> Logger
-> Service
-> Proxy DeleteIntegrationResponse
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteIntegrationResponse)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      AWSResponse DeleteIntegrationResponse
DeleteIntegrationResponseResponse
DeleteIntegrationResponseResponse'

instance Prelude.Hashable DeleteIntegrationResponse

instance Prelude.NFData DeleteIntegrationResponse

instance Core.ToHeaders DeleteIntegrationResponse where
  toHeaders :: DeleteIntegrationResponse -> [Header]
toHeaders =
    [Header] -> DeleteIntegrationResponse -> [Header]
forall a b. a -> b -> a
Prelude.const
      ( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath DeleteIntegrationResponse where
  toPath :: DeleteIntegrationResponse -> ByteString
toPath DeleteIntegrationResponse' {Text
integrationId :: Text
integrationResponseId :: Text
apiId :: Text
$sel:integrationId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:integrationResponseId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:apiId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v2/apis/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
apiId,
        ByteString
"/integrations/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
integrationId,
        ByteString
"/integrationresponses/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
integrationResponseId
      ]

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

-- | /See:/ 'newDeleteIntegrationResponseResponse' smart constructor.
data DeleteIntegrationResponseResponse = DeleteIntegrationResponseResponse'
  {
  }
  deriving (DeleteIntegrationResponseResponse
-> DeleteIntegrationResponseResponse -> Bool
(DeleteIntegrationResponseResponse
 -> DeleteIntegrationResponseResponse -> Bool)
-> (DeleteIntegrationResponseResponse
    -> DeleteIntegrationResponseResponse -> Bool)
-> Eq DeleteIntegrationResponseResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteIntegrationResponseResponse
-> DeleteIntegrationResponseResponse -> Bool
$c/= :: DeleteIntegrationResponseResponse
-> DeleteIntegrationResponseResponse -> Bool
== :: DeleteIntegrationResponseResponse
-> DeleteIntegrationResponseResponse -> Bool
$c== :: DeleteIntegrationResponseResponse
-> DeleteIntegrationResponseResponse -> Bool
Prelude.Eq, ReadPrec [DeleteIntegrationResponseResponse]
ReadPrec DeleteIntegrationResponseResponse
Int -> ReadS DeleteIntegrationResponseResponse
ReadS [DeleteIntegrationResponseResponse]
(Int -> ReadS DeleteIntegrationResponseResponse)
-> ReadS [DeleteIntegrationResponseResponse]
-> ReadPrec DeleteIntegrationResponseResponse
-> ReadPrec [DeleteIntegrationResponseResponse]
-> Read DeleteIntegrationResponseResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteIntegrationResponseResponse]
$creadListPrec :: ReadPrec [DeleteIntegrationResponseResponse]
readPrec :: ReadPrec DeleteIntegrationResponseResponse
$creadPrec :: ReadPrec DeleteIntegrationResponseResponse
readList :: ReadS [DeleteIntegrationResponseResponse]
$creadList :: ReadS [DeleteIntegrationResponseResponse]
readsPrec :: Int -> ReadS DeleteIntegrationResponseResponse
$creadsPrec :: Int -> ReadS DeleteIntegrationResponseResponse
Prelude.Read, Int -> DeleteIntegrationResponseResponse -> ShowS
[DeleteIntegrationResponseResponse] -> ShowS
DeleteIntegrationResponseResponse -> String
(Int -> DeleteIntegrationResponseResponse -> ShowS)
-> (DeleteIntegrationResponseResponse -> String)
-> ([DeleteIntegrationResponseResponse] -> ShowS)
-> Show DeleteIntegrationResponseResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteIntegrationResponseResponse] -> ShowS
$cshowList :: [DeleteIntegrationResponseResponse] -> ShowS
show :: DeleteIntegrationResponseResponse -> String
$cshow :: DeleteIntegrationResponseResponse -> String
showsPrec :: Int -> DeleteIntegrationResponseResponse -> ShowS
$cshowsPrec :: Int -> DeleteIntegrationResponseResponse -> ShowS
Prelude.Show, (forall x.
 DeleteIntegrationResponseResponse
 -> Rep DeleteIntegrationResponseResponse x)
-> (forall x.
    Rep DeleteIntegrationResponseResponse x
    -> DeleteIntegrationResponseResponse)
-> Generic DeleteIntegrationResponseResponse
forall x.
Rep DeleteIntegrationResponseResponse x
-> DeleteIntegrationResponseResponse
forall x.
DeleteIntegrationResponseResponse
-> Rep DeleteIntegrationResponseResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteIntegrationResponseResponse x
-> DeleteIntegrationResponseResponse
$cfrom :: forall x.
DeleteIntegrationResponseResponse
-> Rep DeleteIntegrationResponseResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteIntegrationResponseResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newDeleteIntegrationResponseResponse ::
  DeleteIntegrationResponseResponse
newDeleteIntegrationResponseResponse :: DeleteIntegrationResponseResponse
newDeleteIntegrationResponseResponse =
  DeleteIntegrationResponseResponse
DeleteIntegrationResponseResponse'

instance
  Prelude.NFData
    DeleteIntegrationResponseResponse