{-# 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-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)
--
-- 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.Lens as Lens
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'
  { -- | [Required] The string identifier of the associated RestApi.
    DeleteIntegrationResponse -> Text
restApiId :: Prelude.Text,
    -- | [Required] Specifies a delete integration response request\'s resource
    -- identifier.
    DeleteIntegrationResponse -> Text
resourceId :: Prelude.Text,
    -- | [Required] Specifies a delete integration response request\'s HTTP
    -- method.
    DeleteIntegrationResponse -> Text
httpMethod :: Prelude.Text,
    -- | [Required] Specifies a delete integration response request\'s status
    -- code.
    DeleteIntegrationResponse -> Text
statusCode :: 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:
--
-- 'restApiId', 'deleteIntegrationResponse_restApiId' - [Required] The string identifier of the associated RestApi.
--
-- 'resourceId', 'deleteIntegrationResponse_resourceId' - [Required] Specifies a delete integration response request\'s resource
-- identifier.
--
-- 'httpMethod', 'deleteIntegrationResponse_httpMethod' - [Required] Specifies a delete integration response request\'s HTTP
-- method.
--
-- 'statusCode', 'deleteIntegrationResponse_statusCode' - [Required] 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' :: Text -> Text -> Text -> Text -> DeleteIntegrationResponse
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_
      }

-- | [Required] The string identifier of the associated RestApi.
deleteIntegrationResponse_restApiId :: Lens.Lens' DeleteIntegrationResponse Prelude.Text
deleteIntegrationResponse_restApiId :: (Text -> f Text)
-> DeleteIntegrationResponse -> f DeleteIntegrationResponse
deleteIntegrationResponse_restApiId = (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
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)

-- | [Required] Specifies a delete integration response request\'s resource
-- identifier.
deleteIntegrationResponse_resourceId :: Lens.Lens' DeleteIntegrationResponse Prelude.Text
deleteIntegrationResponse_resourceId :: (Text -> f Text)
-> DeleteIntegrationResponse -> f DeleteIntegrationResponse
deleteIntegrationResponse_resourceId = (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
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)

-- | [Required] Specifies a delete integration response request\'s HTTP
-- method.
deleteIntegrationResponse_httpMethod :: Lens.Lens' DeleteIntegrationResponse Prelude.Text
deleteIntegrationResponse_httpMethod :: (Text -> f Text)
-> DeleteIntegrationResponse -> f DeleteIntegrationResponse
deleteIntegrationResponse_httpMethod = (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
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)

-- | [Required] Specifies a delete integration response request\'s status
-- code.
deleteIntegrationResponse_statusCode :: Lens.Lens' DeleteIntegrationResponse Prelude.Text
deleteIntegrationResponse_statusCode :: (Text -> f Text)
-> DeleteIntegrationResponse -> f DeleteIntegrationResponse
deleteIntegrationResponse_statusCode = (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
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 :: 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
"Accept"
              HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# (ByteString
"application/json" :: Prelude.ByteString)
          ]
      )

instance Core.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
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/restapis/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
restApiId,
        ByteString
"/resources/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
resourceId,
        ByteString
"/methods/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
httpMethod,
        ByteString
"/integration/responses/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
statusCode
      ]

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