{-# 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.APIGateway.DeleteIntegrationResponse
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Represents a delete integration response.
module Amazonka.APIGateway.DeleteIntegrationResponse
  ( -- * Creating a Request
    DeleteIntegrationResponse (..),
    newDeleteIntegrationResponse,

    -- * Request Lenses
    deleteIntegrationResponse_restApiId,
    deleteIntegrationResponse_resourceId,
    deleteIntegrationResponse_httpMethod,
    deleteIntegrationResponse_statusCode,

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

import Amazonka.APIGateway.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

-- | Represents a delete integration response request.
--
-- /See:/ 'newDeleteIntegrationResponse' smart constructor.
data DeleteIntegrationResponse = DeleteIntegrationResponse'
  { -- | The string identifier of the associated RestApi.
    DeleteIntegrationResponse -> Text
restApiId :: Prelude.Text,
    -- | Specifies a delete integration response request\'s resource identifier.
    DeleteIntegrationResponse -> Text
resourceId :: Prelude.Text,
    -- | Specifies a delete integration response request\'s HTTP method.
    DeleteIntegrationResponse -> Text
httpMethod :: Prelude.Text,
    -- | Specifies a delete integration response request\'s status code.
    DeleteIntegrationResponse -> Text
statusCode :: Prelude.Text
  }
  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)

-- |
-- 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:
--
-- 'restApiId', 'deleteIntegrationResponse_restApiId' - The string identifier of the associated RestApi.
--
-- 'resourceId', 'deleteIntegrationResponse_resourceId' - Specifies a delete integration response request\'s resource identifier.
--
-- 'httpMethod', 'deleteIntegrationResponse_httpMethod' - Specifies a delete integration response request\'s HTTP method.
--
-- 'statusCode', 'deleteIntegrationResponse_statusCode' - Specifies a delete integration response request\'s status code.
newDeleteIntegrationResponse ::
  -- | 'restApiId'
  Prelude.Text ->
  -- | 'resourceId'
  Prelude.Text ->
  -- | 'httpMethod'
  Prelude.Text ->
  -- | 'statusCode'
  Prelude.Text ->
  DeleteIntegrationResponse
newDeleteIntegrationResponse :: Text -> Text -> Text -> Text -> DeleteIntegrationResponse
newDeleteIntegrationResponse
  Text
pRestApiId_
  Text
pResourceId_
  Text
pHttpMethod_
  Text
pStatusCode_ =
    DeleteIntegrationResponse'
      { $sel:restApiId:DeleteIntegrationResponse' :: Text
restApiId = Text
pRestApiId_,
        $sel:resourceId:DeleteIntegrationResponse' :: Text
resourceId = Text
pResourceId_,
        $sel:httpMethod:DeleteIntegrationResponse' :: Text
httpMethod = Text
pHttpMethod_,
        $sel:statusCode:DeleteIntegrationResponse' :: Text
statusCode = Text
pStatusCode_
      }

-- | The string identifier of the associated RestApi.
deleteIntegrationResponse_restApiId :: Lens.Lens' DeleteIntegrationResponse Prelude.Text
deleteIntegrationResponse_restApiId :: Lens' DeleteIntegrationResponse Text
deleteIntegrationResponse_restApiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteIntegrationResponse' {Text
restApiId :: Text
$sel:restApiId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
restApiId} -> Text
restApiId) (\s :: DeleteIntegrationResponse
s@DeleteIntegrationResponse' {} Text
a -> DeleteIntegrationResponse
s {$sel:restApiId:DeleteIntegrationResponse' :: Text
restApiId = Text
a} :: DeleteIntegrationResponse)

-- | Specifies a delete integration response request\'s resource identifier.
deleteIntegrationResponse_resourceId :: Lens.Lens' DeleteIntegrationResponse Prelude.Text
deleteIntegrationResponse_resourceId :: Lens' DeleteIntegrationResponse Text
deleteIntegrationResponse_resourceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteIntegrationResponse' {Text
resourceId :: Text
$sel:resourceId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
resourceId} -> Text
resourceId) (\s :: DeleteIntegrationResponse
s@DeleteIntegrationResponse' {} Text
a -> DeleteIntegrationResponse
s {$sel:resourceId:DeleteIntegrationResponse' :: Text
resourceId = Text
a} :: DeleteIntegrationResponse)

-- | Specifies a delete integration response request\'s HTTP method.
deleteIntegrationResponse_httpMethod :: Lens.Lens' DeleteIntegrationResponse Prelude.Text
deleteIntegrationResponse_httpMethod :: Lens' DeleteIntegrationResponse Text
deleteIntegrationResponse_httpMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteIntegrationResponse' {Text
httpMethod :: Text
$sel:httpMethod:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
httpMethod} -> Text
httpMethod) (\s :: DeleteIntegrationResponse
s@DeleteIntegrationResponse' {} Text
a -> DeleteIntegrationResponse
s {$sel:httpMethod:DeleteIntegrationResponse' :: Text
httpMethod = Text
a} :: DeleteIntegrationResponse)

-- | Specifies a delete integration response request\'s status code.
deleteIntegrationResponse_statusCode :: Lens.Lens' DeleteIntegrationResponse Prelude.Text
deleteIntegrationResponse_statusCode :: Lens' DeleteIntegrationResponse Text
deleteIntegrationResponse_statusCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteIntegrationResponse' {Text
statusCode :: Text
$sel:statusCode:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
statusCode} -> Text
statusCode) (\s :: DeleteIntegrationResponse
s@DeleteIntegrationResponse' {} Text
a -> DeleteIntegrationResponse
s {$sel:statusCode:DeleteIntegrationResponse' :: Text
statusCode = Text
a} :: DeleteIntegrationResponse)

instance Core.AWSRequest DeleteIntegrationResponse where
  type
    AWSResponse DeleteIntegrationResponse =
      DeleteIntegrationResponseResponse
  request :: (Service -> Service)
-> DeleteIntegrationResponse -> Request DeleteIntegrationResponse
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 DeleteIntegrationResponse
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteIntegrationResponse)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
      DeleteIntegrationResponseResponse
DeleteIntegrationResponseResponse'

instance Prelude.Hashable DeleteIntegrationResponse where
  hashWithSalt :: Int -> DeleteIntegrationResponse -> Int
hashWithSalt Int
_salt DeleteIntegrationResponse' {Text
statusCode :: Text
httpMethod :: Text
resourceId :: Text
restApiId :: Text
$sel:statusCode:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:httpMethod:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:resourceId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:restApiId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
restApiId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
httpMethod
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
statusCode

instance Prelude.NFData DeleteIntegrationResponse where
  rnf :: DeleteIntegrationResponse -> ()
rnf DeleteIntegrationResponse' {Text
statusCode :: Text
httpMethod :: Text
resourceId :: Text
restApiId :: Text
$sel:statusCode:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:httpMethod:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:resourceId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:restApiId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
restApiId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
httpMethod
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
statusCode

instance Data.ToHeaders DeleteIntegrationResponse where
  toHeaders :: DeleteIntegrationResponse -> [Header]
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Accept"
              forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# (ByteString
"application/json" :: Prelude.ByteString)
          ]
      )

instance Data.ToPath DeleteIntegrationResponse where
  toPath :: DeleteIntegrationResponse -> ByteString
toPath DeleteIntegrationResponse' {Text
statusCode :: Text
httpMethod :: Text
resourceId :: Text
restApiId :: Text
$sel:statusCode:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:httpMethod:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:resourceId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
$sel:restApiId:DeleteIntegrationResponse' :: DeleteIntegrationResponse -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/restapis/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
restApiId,
        ByteString
"/resources/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
resourceId,
        ByteString
"/methods/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
httpMethod,
        ByteString
"/integration/responses/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
statusCode
      ]

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

-- | /See:/ 'newDeleteIntegrationResponseResponse' smart constructor.
data DeleteIntegrationResponseResponse = DeleteIntegrationResponseResponse'
  {
  }
  deriving (DeleteIntegrationResponseResponse
-> DeleteIntegrationResponseResponse -> Bool
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]
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
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.
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
  where
  rnf :: DeleteIntegrationResponseResponse -> ()
rnf DeleteIntegrationResponseResponse
_ = ()