{-# 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.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
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
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]
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
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. 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'
{ $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 :: Lens' DeleteMethodResponse Text
deleteMethodResponse_restApiId = 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 :: Lens' DeleteMethodResponse Text
deleteMethodResponse_resourceId = 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 :: Lens' DeleteMethodResponse Text
deleteMethodResponse_httpMethod = 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 :: Lens' DeleteMethodResponse Text
deleteMethodResponse_statusCode = 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 :: (Service -> Service)
-> DeleteMethodResponse -> Request DeleteMethodResponse
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 DeleteMethodResponse
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteMethodResponse)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteMethodResponseResponse
DeleteMethodResponseResponse'
instance Prelude.Hashable DeleteMethodResponse where
hashWithSalt :: Int -> DeleteMethodResponse -> Int
hashWithSalt Int
_salt 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
..} =
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 DeleteMethodResponse where
rnf :: DeleteMethodResponse -> ()
rnf 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
..} =
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 DeleteMethodResponse where
toHeaders :: DeleteMethodResponse -> [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 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
..} =
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
"/responses/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
statusCode
]
instance Data.ToQuery DeleteMethodResponse where
toQuery :: DeleteMethodResponse -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteMethodResponseResponse = DeleteMethodResponseResponse'
{
}
deriving (DeleteMethodResponseResponse
-> DeleteMethodResponseResponse -> Bool
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]
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
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.
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 where
rnf :: DeleteMethodResponseResponse -> ()
rnf DeleteMethodResponseResponse
_ = ()