{-# 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.ApiGatewayV2.DeleteAccessLogSettings
(
DeleteAccessLogSettings (..),
newDeleteAccessLogSettings,
deleteAccessLogSettings_stageName,
deleteAccessLogSettings_apiId,
DeleteAccessLogSettingsResponse (..),
newDeleteAccessLogSettingsResponse,
)
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
data DeleteAccessLogSettings = DeleteAccessLogSettings'
{
DeleteAccessLogSettings -> Text
stageName :: Prelude.Text,
DeleteAccessLogSettings -> Text
apiId :: Prelude.Text
}
deriving (DeleteAccessLogSettings -> DeleteAccessLogSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAccessLogSettings -> DeleteAccessLogSettings -> Bool
$c/= :: DeleteAccessLogSettings -> DeleteAccessLogSettings -> Bool
== :: DeleteAccessLogSettings -> DeleteAccessLogSettings -> Bool
$c== :: DeleteAccessLogSettings -> DeleteAccessLogSettings -> Bool
Prelude.Eq, ReadPrec [DeleteAccessLogSettings]
ReadPrec DeleteAccessLogSettings
Int -> ReadS DeleteAccessLogSettings
ReadS [DeleteAccessLogSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAccessLogSettings]
$creadListPrec :: ReadPrec [DeleteAccessLogSettings]
readPrec :: ReadPrec DeleteAccessLogSettings
$creadPrec :: ReadPrec DeleteAccessLogSettings
readList :: ReadS [DeleteAccessLogSettings]
$creadList :: ReadS [DeleteAccessLogSettings]
readsPrec :: Int -> ReadS DeleteAccessLogSettings
$creadsPrec :: Int -> ReadS DeleteAccessLogSettings
Prelude.Read, Int -> DeleteAccessLogSettings -> ShowS
[DeleteAccessLogSettings] -> ShowS
DeleteAccessLogSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAccessLogSettings] -> ShowS
$cshowList :: [DeleteAccessLogSettings] -> ShowS
show :: DeleteAccessLogSettings -> String
$cshow :: DeleteAccessLogSettings -> String
showsPrec :: Int -> DeleteAccessLogSettings -> ShowS
$cshowsPrec :: Int -> DeleteAccessLogSettings -> ShowS
Prelude.Show, forall x. Rep DeleteAccessLogSettings x -> DeleteAccessLogSettings
forall x. DeleteAccessLogSettings -> Rep DeleteAccessLogSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteAccessLogSettings x -> DeleteAccessLogSettings
$cfrom :: forall x. DeleteAccessLogSettings -> Rep DeleteAccessLogSettings x
Prelude.Generic)
newDeleteAccessLogSettings ::
Prelude.Text ->
Prelude.Text ->
DeleteAccessLogSettings
newDeleteAccessLogSettings :: Text -> Text -> DeleteAccessLogSettings
newDeleteAccessLogSettings Text
pStageName_ Text
pApiId_ =
DeleteAccessLogSettings'
{ $sel:stageName:DeleteAccessLogSettings' :: Text
stageName = Text
pStageName_,
$sel:apiId:DeleteAccessLogSettings' :: Text
apiId = Text
pApiId_
}
deleteAccessLogSettings_stageName :: Lens.Lens' DeleteAccessLogSettings Prelude.Text
deleteAccessLogSettings_stageName :: Lens' DeleteAccessLogSettings Text
deleteAccessLogSettings_stageName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAccessLogSettings' {Text
stageName :: Text
$sel:stageName:DeleteAccessLogSettings' :: DeleteAccessLogSettings -> Text
stageName} -> Text
stageName) (\s :: DeleteAccessLogSettings
s@DeleteAccessLogSettings' {} Text
a -> DeleteAccessLogSettings
s {$sel:stageName:DeleteAccessLogSettings' :: Text
stageName = Text
a} :: DeleteAccessLogSettings)
deleteAccessLogSettings_apiId :: Lens.Lens' DeleteAccessLogSettings Prelude.Text
deleteAccessLogSettings_apiId :: Lens' DeleteAccessLogSettings Text
deleteAccessLogSettings_apiId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteAccessLogSettings' {Text
apiId :: Text
$sel:apiId:DeleteAccessLogSettings' :: DeleteAccessLogSettings -> Text
apiId} -> Text
apiId) (\s :: DeleteAccessLogSettings
s@DeleteAccessLogSettings' {} Text
a -> DeleteAccessLogSettings
s {$sel:apiId:DeleteAccessLogSettings' :: Text
apiId = Text
a} :: DeleteAccessLogSettings)
instance Core.AWSRequest DeleteAccessLogSettings where
type
AWSResponse DeleteAccessLogSettings =
DeleteAccessLogSettingsResponse
request :: (Service -> Service)
-> DeleteAccessLogSettings -> Request DeleteAccessLogSettings
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 DeleteAccessLogSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteAccessLogSettings)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
DeleteAccessLogSettingsResponse
DeleteAccessLogSettingsResponse'
instance Prelude.Hashable DeleteAccessLogSettings where
hashWithSalt :: Int -> DeleteAccessLogSettings -> Int
hashWithSalt Int
_salt DeleteAccessLogSettings' {Text
apiId :: Text
stageName :: Text
$sel:apiId:DeleteAccessLogSettings' :: DeleteAccessLogSettings -> Text
$sel:stageName:DeleteAccessLogSettings' :: DeleteAccessLogSettings -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
stageName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
apiId
instance Prelude.NFData DeleteAccessLogSettings where
rnf :: DeleteAccessLogSettings -> ()
rnf DeleteAccessLogSettings' {Text
apiId :: Text
stageName :: Text
$sel:apiId:DeleteAccessLogSettings' :: DeleteAccessLogSettings -> Text
$sel:stageName:DeleteAccessLogSettings' :: DeleteAccessLogSettings -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
stageName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
apiId
instance Data.ToHeaders DeleteAccessLogSettings where
toHeaders :: DeleteAccessLogSettings -> [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 DeleteAccessLogSettings where
toPath :: DeleteAccessLogSettings -> ByteString
toPath DeleteAccessLogSettings' {Text
apiId :: Text
stageName :: Text
$sel:apiId:DeleteAccessLogSettings' :: DeleteAccessLogSettings -> Text
$sel:stageName:DeleteAccessLogSettings' :: DeleteAccessLogSettings -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v2/apis/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
apiId,
ByteString
"/stages/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
stageName,
ByteString
"/accesslogsettings"
]
instance Data.ToQuery DeleteAccessLogSettings where
toQuery :: DeleteAccessLogSettings -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteAccessLogSettingsResponse = DeleteAccessLogSettingsResponse'
{
}
deriving (DeleteAccessLogSettingsResponse
-> DeleteAccessLogSettingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteAccessLogSettingsResponse
-> DeleteAccessLogSettingsResponse -> Bool
$c/= :: DeleteAccessLogSettingsResponse
-> DeleteAccessLogSettingsResponse -> Bool
== :: DeleteAccessLogSettingsResponse
-> DeleteAccessLogSettingsResponse -> Bool
$c== :: DeleteAccessLogSettingsResponse
-> DeleteAccessLogSettingsResponse -> Bool
Prelude.Eq, ReadPrec [DeleteAccessLogSettingsResponse]
ReadPrec DeleteAccessLogSettingsResponse
Int -> ReadS DeleteAccessLogSettingsResponse
ReadS [DeleteAccessLogSettingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteAccessLogSettingsResponse]
$creadListPrec :: ReadPrec [DeleteAccessLogSettingsResponse]
readPrec :: ReadPrec DeleteAccessLogSettingsResponse
$creadPrec :: ReadPrec DeleteAccessLogSettingsResponse
readList :: ReadS [DeleteAccessLogSettingsResponse]
$creadList :: ReadS [DeleteAccessLogSettingsResponse]
readsPrec :: Int -> ReadS DeleteAccessLogSettingsResponse
$creadsPrec :: Int -> ReadS DeleteAccessLogSettingsResponse
Prelude.Read, Int -> DeleteAccessLogSettingsResponse -> ShowS
[DeleteAccessLogSettingsResponse] -> ShowS
DeleteAccessLogSettingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteAccessLogSettingsResponse] -> ShowS
$cshowList :: [DeleteAccessLogSettingsResponse] -> ShowS
show :: DeleteAccessLogSettingsResponse -> String
$cshow :: DeleteAccessLogSettingsResponse -> String
showsPrec :: Int -> DeleteAccessLogSettingsResponse -> ShowS
$cshowsPrec :: Int -> DeleteAccessLogSettingsResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteAccessLogSettingsResponse x
-> DeleteAccessLogSettingsResponse
forall x.
DeleteAccessLogSettingsResponse
-> Rep DeleteAccessLogSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteAccessLogSettingsResponse x
-> DeleteAccessLogSettingsResponse
$cfrom :: forall x.
DeleteAccessLogSettingsResponse
-> Rep DeleteAccessLogSettingsResponse x
Prelude.Generic)
newDeleteAccessLogSettingsResponse ::
DeleteAccessLogSettingsResponse
newDeleteAccessLogSettingsResponse :: DeleteAccessLogSettingsResponse
newDeleteAccessLogSettingsResponse =
DeleteAccessLogSettingsResponse
DeleteAccessLogSettingsResponse'
instance
Prelude.NFData
DeleteAccessLogSettingsResponse
where
rnf :: DeleteAccessLogSettingsResponse -> ()
rnf DeleteAccessLogSettingsResponse
_ = ()