{-# 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.DeleteRouteResponse
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes a RouteResponse.
module Amazonka.ApiGatewayV2.DeleteRouteResponse
  ( -- * Creating a Request
    DeleteRouteResponse (..),
    newDeleteRouteResponse,

    -- * Request Lenses
    deleteRouteResponse_routeResponseId,
    deleteRouteResponse_apiId,
    deleteRouteResponse_routeId,

    -- * Destructuring the Response
    DeleteRouteResponseResponse (..),
    newDeleteRouteResponseResponse,
  )
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

-- | /See:/ 'newDeleteRouteResponse' smart constructor.
data DeleteRouteResponse = DeleteRouteResponse'
  { -- | The route response ID.
    DeleteRouteResponse -> Text
routeResponseId :: Prelude.Text,
    -- | The API identifier.
    DeleteRouteResponse -> Text
apiId :: Prelude.Text,
    -- | The route ID.
    DeleteRouteResponse -> Text
routeId :: Prelude.Text
  }
  deriving (DeleteRouteResponse -> DeleteRouteResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRouteResponse -> DeleteRouteResponse -> Bool
$c/= :: DeleteRouteResponse -> DeleteRouteResponse -> Bool
== :: DeleteRouteResponse -> DeleteRouteResponse -> Bool
$c== :: DeleteRouteResponse -> DeleteRouteResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRouteResponse]
ReadPrec DeleteRouteResponse
Int -> ReadS DeleteRouteResponse
ReadS [DeleteRouteResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRouteResponse]
$creadListPrec :: ReadPrec [DeleteRouteResponse]
readPrec :: ReadPrec DeleteRouteResponse
$creadPrec :: ReadPrec DeleteRouteResponse
readList :: ReadS [DeleteRouteResponse]
$creadList :: ReadS [DeleteRouteResponse]
readsPrec :: Int -> ReadS DeleteRouteResponse
$creadsPrec :: Int -> ReadS DeleteRouteResponse
Prelude.Read, Int -> DeleteRouteResponse -> ShowS
[DeleteRouteResponse] -> ShowS
DeleteRouteResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRouteResponse] -> ShowS
$cshowList :: [DeleteRouteResponse] -> ShowS
show :: DeleteRouteResponse -> String
$cshow :: DeleteRouteResponse -> String
showsPrec :: Int -> DeleteRouteResponse -> ShowS
$cshowsPrec :: Int -> DeleteRouteResponse -> ShowS
Prelude.Show, forall x. Rep DeleteRouteResponse x -> DeleteRouteResponse
forall x. DeleteRouteResponse -> Rep DeleteRouteResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteRouteResponse x -> DeleteRouteResponse
$cfrom :: forall x. DeleteRouteResponse -> Rep DeleteRouteResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteRouteResponse' 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:
--
-- 'routeResponseId', 'deleteRouteResponse_routeResponseId' - The route response ID.
--
-- 'apiId', 'deleteRouteResponse_apiId' - The API identifier.
--
-- 'routeId', 'deleteRouteResponse_routeId' - The route ID.
newDeleteRouteResponse ::
  -- | 'routeResponseId'
  Prelude.Text ->
  -- | 'apiId'
  Prelude.Text ->
  -- | 'routeId'
  Prelude.Text ->
  DeleteRouteResponse
newDeleteRouteResponse :: Text -> Text -> Text -> DeleteRouteResponse
newDeleteRouteResponse
  Text
pRouteResponseId_
  Text
pApiId_
  Text
pRouteId_ =
    DeleteRouteResponse'
      { $sel:routeResponseId:DeleteRouteResponse' :: Text
routeResponseId =
          Text
pRouteResponseId_,
        $sel:apiId:DeleteRouteResponse' :: Text
apiId = Text
pApiId_,
        $sel:routeId:DeleteRouteResponse' :: Text
routeId = Text
pRouteId_
      }

-- | The route response ID.
deleteRouteResponse_routeResponseId :: Lens.Lens' DeleteRouteResponse Prelude.Text
deleteRouteResponse_routeResponseId :: Lens' DeleteRouteResponse Text
deleteRouteResponse_routeResponseId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRouteResponse' {Text
routeResponseId :: Text
$sel:routeResponseId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
routeResponseId} -> Text
routeResponseId) (\s :: DeleteRouteResponse
s@DeleteRouteResponse' {} Text
a -> DeleteRouteResponse
s {$sel:routeResponseId:DeleteRouteResponse' :: Text
routeResponseId = Text
a} :: DeleteRouteResponse)

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

-- | The route ID.
deleteRouteResponse_routeId :: Lens.Lens' DeleteRouteResponse Prelude.Text
deleteRouteResponse_routeId :: Lens' DeleteRouteResponse Text
deleteRouteResponse_routeId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRouteResponse' {Text
routeId :: Text
$sel:routeId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
routeId} -> Text
routeId) (\s :: DeleteRouteResponse
s@DeleteRouteResponse' {} Text
a -> DeleteRouteResponse
s {$sel:routeId:DeleteRouteResponse' :: Text
routeId = Text
a} :: DeleteRouteResponse)

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

instance Prelude.Hashable DeleteRouteResponse where
  hashWithSalt :: Int -> DeleteRouteResponse -> Int
hashWithSalt Int
_salt DeleteRouteResponse' {Text
routeId :: Text
apiId :: Text
routeResponseId :: Text
$sel:routeId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
$sel:apiId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
$sel:routeResponseId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
routeResponseId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
apiId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
routeId

instance Prelude.NFData DeleteRouteResponse where
  rnf :: DeleteRouteResponse -> ()
rnf DeleteRouteResponse' {Text
routeId :: Text
apiId :: Text
routeResponseId :: Text
$sel:routeId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
$sel:apiId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
$sel:routeResponseId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
routeResponseId
      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
routeId

instance Data.ToHeaders DeleteRouteResponse where
  toHeaders :: DeleteRouteResponse -> [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 DeleteRouteResponse where
  toPath :: DeleteRouteResponse -> ByteString
toPath DeleteRouteResponse' {Text
routeId :: Text
apiId :: Text
routeResponseId :: Text
$sel:routeId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
$sel:apiId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
$sel:routeResponseId:DeleteRouteResponse' :: DeleteRouteResponse -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v2/apis/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
apiId,
        ByteString
"/routes/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
routeId,
        ByteString
"/routeresponses/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
routeResponseId
      ]

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

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

-- |
-- Create a value of 'DeleteRouteResponseResponse' 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.
newDeleteRouteResponseResponse ::
  DeleteRouteResponseResponse
newDeleteRouteResponseResponse :: DeleteRouteResponseResponse
newDeleteRouteResponseResponse =
  DeleteRouteResponseResponse
DeleteRouteResponseResponse'

instance Prelude.NFData DeleteRouteResponseResponse where
  rnf :: DeleteRouteResponseResponse -> ()
rnf DeleteRouteResponseResponse
_ = ()