{-# 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.APIGateway.DeleteMethodResponse
(
DeleteMethodResponse (..),
newDeleteMethodResponse,
deleteMethodResponse_restApiId,
deleteMethodResponse_resourceId,
deleteMethodResponse_httpMethod,
deleteMethodResponse_statusCode,
DeleteMethodResponseResponse (..),
newDeleteMethodResponseResponse,
)
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
data DeleteMethodResponse = DeleteMethodResponse'
{
DeleteMethodResponse -> Text
restApiId :: Prelude.Text,
DeleteMethodResponse -> Text
resourceId :: Prelude.Text,
DeleteMethodResponse -> Text
httpMethod :: Prelude.Text,
DeleteMethodResponse -> Text
statusCode :: Prelude.Text
}
deriving (DeleteMethodResponse -> DeleteMethodResponse -> Bool
(DeleteMethodResponse -> DeleteMethodResponse -> Bool)
-> (DeleteMethodResponse -> DeleteMethodResponse -> Bool)
-> Eq DeleteMethodResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMethodResponse -> DeleteMethodResponse -> Bool
$c/= :: DeleteMethodResponse -> DeleteMethodResponse -> Bool
== :: DeleteMethodResponse -> DeleteMethodResponse -> Bool
$c== :: DeleteMethodResponse -> DeleteMethodResponse -> Bool
Prelude.Eq, ReadPrec [DeleteMethodResponse]
ReadPrec DeleteMethodResponse
Int -> ReadS DeleteMethodResponse
ReadS [DeleteMethodResponse]
(Int -> ReadS DeleteMethodResponse)
-> ReadS [DeleteMethodResponse]
-> ReadPrec DeleteMethodResponse
-> ReadPrec [DeleteMethodResponse]
-> Read DeleteMethodResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMethodResponse]
$creadListPrec :: ReadPrec [DeleteMethodResponse]
readPrec :: ReadPrec DeleteMethodResponse
$creadPrec :: ReadPrec DeleteMethodResponse
readList :: ReadS [DeleteMethodResponse]
$creadList :: ReadS [DeleteMethodResponse]
readsPrec :: Int -> ReadS DeleteMethodResponse
$creadsPrec :: Int -> ReadS DeleteMethodResponse
Prelude.Read, Int -> DeleteMethodResponse -> ShowS
[DeleteMethodResponse] -> ShowS
DeleteMethodResponse -> String
(Int -> DeleteMethodResponse -> ShowS)
-> (DeleteMethodResponse -> String)
-> ([DeleteMethodResponse] -> ShowS)
-> Show DeleteMethodResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMethodResponse] -> ShowS
$cshowList :: [DeleteMethodResponse] -> ShowS
show :: DeleteMethodResponse -> String
$cshow :: DeleteMethodResponse -> String
showsPrec :: Int -> DeleteMethodResponse -> ShowS
$cshowsPrec :: Int -> DeleteMethodResponse -> ShowS
Prelude.Show, (forall x. DeleteMethodResponse -> Rep DeleteMethodResponse x)
-> (forall x. Rep DeleteMethodResponse x -> DeleteMethodResponse)
-> Generic DeleteMethodResponse
forall x. Rep DeleteMethodResponse x -> DeleteMethodResponse
forall x. DeleteMethodResponse -> Rep DeleteMethodResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteMethodResponse x -> DeleteMethodResponse
$cfrom :: forall x. DeleteMethodResponse -> Rep DeleteMethodResponse x
Prelude.Generic)
newDeleteMethodResponse ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteMethodResponse
newDeleteMethodResponse :: Text -> Text -> Text -> Text -> DeleteMethodResponse
newDeleteMethodResponse
Text
pRestApiId_
Text
pResourceId_
Text
pHttpMethod_
Text
pStatusCode_ =
DeleteMethodResponse' :: Text -> Text -> Text -> Text -> DeleteMethodResponse
DeleteMethodResponse'
{ $sel:restApiId:DeleteMethodResponse' :: Text
restApiId = Text
pRestApiId_,
$sel:resourceId:DeleteMethodResponse' :: Text
resourceId = Text
pResourceId_,
$sel:httpMethod:DeleteMethodResponse' :: Text
httpMethod = Text
pHttpMethod_,
$sel:statusCode:DeleteMethodResponse' :: Text
statusCode = Text
pStatusCode_
}
deleteMethodResponse_restApiId :: Lens.Lens' DeleteMethodResponse Prelude.Text
deleteMethodResponse_restApiId :: (Text -> f Text) -> DeleteMethodResponse -> f DeleteMethodResponse
deleteMethodResponse_restApiId = (DeleteMethodResponse -> Text)
-> (DeleteMethodResponse -> Text -> DeleteMethodResponse)
-> Lens DeleteMethodResponse DeleteMethodResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMethodResponse' {Text
restApiId :: Text
$sel:restApiId:DeleteMethodResponse' :: DeleteMethodResponse -> Text
restApiId} -> Text
restApiId) (\s :: DeleteMethodResponse
s@DeleteMethodResponse' {} Text
a -> DeleteMethodResponse
s {$sel:restApiId:DeleteMethodResponse' :: Text
restApiId = Text
a} :: DeleteMethodResponse)
deleteMethodResponse_resourceId :: Lens.Lens' DeleteMethodResponse Prelude.Text
deleteMethodResponse_resourceId :: (Text -> f Text) -> DeleteMethodResponse -> f DeleteMethodResponse
deleteMethodResponse_resourceId = (DeleteMethodResponse -> Text)
-> (DeleteMethodResponse -> Text -> DeleteMethodResponse)
-> Lens DeleteMethodResponse DeleteMethodResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMethodResponse' {Text
resourceId :: Text
$sel:resourceId:DeleteMethodResponse' :: DeleteMethodResponse -> Text
resourceId} -> Text
resourceId) (\s :: DeleteMethodResponse
s@DeleteMethodResponse' {} Text
a -> DeleteMethodResponse
s {$sel:resourceId:DeleteMethodResponse' :: Text
resourceId = Text
a} :: DeleteMethodResponse)
deleteMethodResponse_httpMethod :: Lens.Lens' DeleteMethodResponse Prelude.Text
deleteMethodResponse_httpMethod :: (Text -> f Text) -> DeleteMethodResponse -> f DeleteMethodResponse
deleteMethodResponse_httpMethod = (DeleteMethodResponse -> Text)
-> (DeleteMethodResponse -> Text -> DeleteMethodResponse)
-> Lens DeleteMethodResponse DeleteMethodResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMethodResponse' {Text
httpMethod :: Text
$sel:httpMethod:DeleteMethodResponse' :: DeleteMethodResponse -> Text
httpMethod} -> Text
httpMethod) (\s :: DeleteMethodResponse
s@DeleteMethodResponse' {} Text
a -> DeleteMethodResponse
s {$sel:httpMethod:DeleteMethodResponse' :: Text
httpMethod = Text
a} :: DeleteMethodResponse)
deleteMethodResponse_statusCode :: Lens.Lens' DeleteMethodResponse Prelude.Text
deleteMethodResponse_statusCode :: (Text -> f Text) -> DeleteMethodResponse -> f DeleteMethodResponse
deleteMethodResponse_statusCode = (DeleteMethodResponse -> Text)
-> (DeleteMethodResponse -> Text -> DeleteMethodResponse)
-> Lens DeleteMethodResponse DeleteMethodResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMethodResponse' {Text
statusCode :: Text
$sel:statusCode:DeleteMethodResponse' :: DeleteMethodResponse -> Text
statusCode} -> Text
statusCode) (\s :: DeleteMethodResponse
s@DeleteMethodResponse' {} Text
a -> DeleteMethodResponse
s {$sel:statusCode:DeleteMethodResponse' :: Text
statusCode = Text
a} :: DeleteMethodResponse)
instance Core.AWSRequest DeleteMethodResponse where
type
AWSResponse DeleteMethodResponse =
DeleteMethodResponseResponse
request :: DeleteMethodResponse -> Request DeleteMethodResponse
request = Service -> DeleteMethodResponse -> Request DeleteMethodResponse
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteMethodResponse
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteMethodResponse)))
response =
AWSResponse DeleteMethodResponse
-> Logger
-> Service
-> Proxy DeleteMethodResponse
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteMethodResponse)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteMethodResponse
DeleteMethodResponseResponse
DeleteMethodResponseResponse'
instance Prelude.Hashable DeleteMethodResponse
instance Prelude.NFData DeleteMethodResponse
instance Core.ToHeaders DeleteMethodResponse where
toHeaders :: DeleteMethodResponse -> [Header]
toHeaders =
[Header] -> DeleteMethodResponse -> [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 DeleteMethodResponse where
toPath :: DeleteMethodResponse -> ByteString
toPath DeleteMethodResponse' {Text
statusCode :: Text
httpMethod :: Text
resourceId :: Text
restApiId :: Text
$sel:statusCode:DeleteMethodResponse' :: DeleteMethodResponse -> Text
$sel:httpMethod:DeleteMethodResponse' :: DeleteMethodResponse -> Text
$sel:resourceId:DeleteMethodResponse' :: DeleteMethodResponse -> Text
$sel:restApiId:DeleteMethodResponse' :: DeleteMethodResponse -> 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
"/responses/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
statusCode
]
instance Core.ToQuery DeleteMethodResponse where
toQuery :: DeleteMethodResponse -> QueryString
toQuery = QueryString -> DeleteMethodResponse -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteMethodResponseResponse = DeleteMethodResponseResponse'
{
}
deriving (DeleteMethodResponseResponse
-> DeleteMethodResponseResponse -> Bool
(DeleteMethodResponseResponse
-> DeleteMethodResponseResponse -> Bool)
-> (DeleteMethodResponseResponse
-> DeleteMethodResponseResponse -> Bool)
-> Eq DeleteMethodResponseResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMethodResponseResponse
-> DeleteMethodResponseResponse -> Bool
$c/= :: DeleteMethodResponseResponse
-> DeleteMethodResponseResponse -> Bool
== :: DeleteMethodResponseResponse
-> DeleteMethodResponseResponse -> Bool
$c== :: DeleteMethodResponseResponse
-> DeleteMethodResponseResponse -> Bool
Prelude.Eq, ReadPrec [DeleteMethodResponseResponse]
ReadPrec DeleteMethodResponseResponse
Int -> ReadS DeleteMethodResponseResponse
ReadS [DeleteMethodResponseResponse]
(Int -> ReadS DeleteMethodResponseResponse)
-> ReadS [DeleteMethodResponseResponse]
-> ReadPrec DeleteMethodResponseResponse
-> ReadPrec [DeleteMethodResponseResponse]
-> Read DeleteMethodResponseResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMethodResponseResponse]
$creadListPrec :: ReadPrec [DeleteMethodResponseResponse]
readPrec :: ReadPrec DeleteMethodResponseResponse
$creadPrec :: ReadPrec DeleteMethodResponseResponse
readList :: ReadS [DeleteMethodResponseResponse]
$creadList :: ReadS [DeleteMethodResponseResponse]
readsPrec :: Int -> ReadS DeleteMethodResponseResponse
$creadsPrec :: Int -> ReadS DeleteMethodResponseResponse
Prelude.Read, Int -> DeleteMethodResponseResponse -> ShowS
[DeleteMethodResponseResponse] -> ShowS
DeleteMethodResponseResponse -> String
(Int -> DeleteMethodResponseResponse -> ShowS)
-> (DeleteMethodResponseResponse -> String)
-> ([DeleteMethodResponseResponse] -> ShowS)
-> Show DeleteMethodResponseResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMethodResponseResponse] -> ShowS
$cshowList :: [DeleteMethodResponseResponse] -> ShowS
show :: DeleteMethodResponseResponse -> String
$cshow :: DeleteMethodResponseResponse -> String
showsPrec :: Int -> DeleteMethodResponseResponse -> ShowS
$cshowsPrec :: Int -> DeleteMethodResponseResponse -> ShowS
Prelude.Show, (forall x.
DeleteMethodResponseResponse -> Rep DeleteMethodResponseResponse x)
-> (forall x.
Rep DeleteMethodResponseResponse x -> DeleteMethodResponseResponse)
-> Generic DeleteMethodResponseResponse
forall x.
Rep DeleteMethodResponseResponse x -> DeleteMethodResponseResponse
forall x.
DeleteMethodResponseResponse -> Rep DeleteMethodResponseResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteMethodResponseResponse x -> DeleteMethodResponseResponse
$cfrom :: forall x.
DeleteMethodResponseResponse -> Rep DeleteMethodResponseResponse x
Prelude.Generic)
newDeleteMethodResponseResponse ::
DeleteMethodResponseResponse
newDeleteMethodResponseResponse :: DeleteMethodResponseResponse
newDeleteMethodResponseResponse =
DeleteMethodResponseResponse
DeleteMethodResponseResponse'
instance Prelude.NFData DeleteMethodResponseResponse