{-# 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.Route53Resolver.DeleteResolverQueryLogConfig
(
DeleteResolverQueryLogConfig (..),
newDeleteResolverQueryLogConfig,
deleteResolverQueryLogConfig_resolverQueryLogConfigId,
DeleteResolverQueryLogConfigResponse (..),
newDeleteResolverQueryLogConfigResponse,
deleteResolverQueryLogConfigResponse_resolverQueryLogConfig,
deleteResolverQueryLogConfigResponse_httpStatus,
)
where
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
import Amazonka.Route53Resolver.Types
data DeleteResolverQueryLogConfig = DeleteResolverQueryLogConfig'
{
DeleteResolverQueryLogConfig -> Text
resolverQueryLogConfigId :: Prelude.Text
}
deriving (DeleteResolverQueryLogConfig
-> DeleteResolverQueryLogConfig -> Bool
(DeleteResolverQueryLogConfig
-> DeleteResolverQueryLogConfig -> Bool)
-> (DeleteResolverQueryLogConfig
-> DeleteResolverQueryLogConfig -> Bool)
-> Eq DeleteResolverQueryLogConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteResolverQueryLogConfig
-> DeleteResolverQueryLogConfig -> Bool
$c/= :: DeleteResolverQueryLogConfig
-> DeleteResolverQueryLogConfig -> Bool
== :: DeleteResolverQueryLogConfig
-> DeleteResolverQueryLogConfig -> Bool
$c== :: DeleteResolverQueryLogConfig
-> DeleteResolverQueryLogConfig -> Bool
Prelude.Eq, ReadPrec [DeleteResolverQueryLogConfig]
ReadPrec DeleteResolverQueryLogConfig
Int -> ReadS DeleteResolverQueryLogConfig
ReadS [DeleteResolverQueryLogConfig]
(Int -> ReadS DeleteResolverQueryLogConfig)
-> ReadS [DeleteResolverQueryLogConfig]
-> ReadPrec DeleteResolverQueryLogConfig
-> ReadPrec [DeleteResolverQueryLogConfig]
-> Read DeleteResolverQueryLogConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteResolverQueryLogConfig]
$creadListPrec :: ReadPrec [DeleteResolverQueryLogConfig]
readPrec :: ReadPrec DeleteResolverQueryLogConfig
$creadPrec :: ReadPrec DeleteResolverQueryLogConfig
readList :: ReadS [DeleteResolverQueryLogConfig]
$creadList :: ReadS [DeleteResolverQueryLogConfig]
readsPrec :: Int -> ReadS DeleteResolverQueryLogConfig
$creadsPrec :: Int -> ReadS DeleteResolverQueryLogConfig
Prelude.Read, Int -> DeleteResolverQueryLogConfig -> ShowS
[DeleteResolverQueryLogConfig] -> ShowS
DeleteResolverQueryLogConfig -> String
(Int -> DeleteResolverQueryLogConfig -> ShowS)
-> (DeleteResolverQueryLogConfig -> String)
-> ([DeleteResolverQueryLogConfig] -> ShowS)
-> Show DeleteResolverQueryLogConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteResolverQueryLogConfig] -> ShowS
$cshowList :: [DeleteResolverQueryLogConfig] -> ShowS
show :: DeleteResolverQueryLogConfig -> String
$cshow :: DeleteResolverQueryLogConfig -> String
showsPrec :: Int -> DeleteResolverQueryLogConfig -> ShowS
$cshowsPrec :: Int -> DeleteResolverQueryLogConfig -> ShowS
Prelude.Show, (forall x.
DeleteResolverQueryLogConfig -> Rep DeleteResolverQueryLogConfig x)
-> (forall x.
Rep DeleteResolverQueryLogConfig x -> DeleteResolverQueryLogConfig)
-> Generic DeleteResolverQueryLogConfig
forall x.
Rep DeleteResolverQueryLogConfig x -> DeleteResolverQueryLogConfig
forall x.
DeleteResolverQueryLogConfig -> Rep DeleteResolverQueryLogConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteResolverQueryLogConfig x -> DeleteResolverQueryLogConfig
$cfrom :: forall x.
DeleteResolverQueryLogConfig -> Rep DeleteResolverQueryLogConfig x
Prelude.Generic)
newDeleteResolverQueryLogConfig ::
Prelude.Text ->
DeleteResolverQueryLogConfig
newDeleteResolverQueryLogConfig :: Text -> DeleteResolverQueryLogConfig
newDeleteResolverQueryLogConfig
Text
pResolverQueryLogConfigId_ =
DeleteResolverQueryLogConfig' :: Text -> DeleteResolverQueryLogConfig
DeleteResolverQueryLogConfig'
{ $sel:resolverQueryLogConfigId:DeleteResolverQueryLogConfig' :: Text
resolverQueryLogConfigId =
Text
pResolverQueryLogConfigId_
}
deleteResolverQueryLogConfig_resolverQueryLogConfigId :: Lens.Lens' DeleteResolverQueryLogConfig Prelude.Text
deleteResolverQueryLogConfig_resolverQueryLogConfigId :: (Text -> f Text)
-> DeleteResolverQueryLogConfig -> f DeleteResolverQueryLogConfig
deleteResolverQueryLogConfig_resolverQueryLogConfigId = (DeleteResolverQueryLogConfig -> Text)
-> (DeleteResolverQueryLogConfig
-> Text -> DeleteResolverQueryLogConfig)
-> Lens
DeleteResolverQueryLogConfig DeleteResolverQueryLogConfig Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteResolverQueryLogConfig' {Text
resolverQueryLogConfigId :: Text
$sel:resolverQueryLogConfigId:DeleteResolverQueryLogConfig' :: DeleteResolverQueryLogConfig -> Text
resolverQueryLogConfigId} -> Text
resolverQueryLogConfigId) (\s :: DeleteResolverQueryLogConfig
s@DeleteResolverQueryLogConfig' {} Text
a -> DeleteResolverQueryLogConfig
s {$sel:resolverQueryLogConfigId:DeleteResolverQueryLogConfig' :: Text
resolverQueryLogConfigId = Text
a} :: DeleteResolverQueryLogConfig)
instance Core.AWSRequest DeleteResolverQueryLogConfig where
type
AWSResponse DeleteResolverQueryLogConfig =
DeleteResolverQueryLogConfigResponse
request :: DeleteResolverQueryLogConfig
-> Request DeleteResolverQueryLogConfig
request = Service
-> DeleteResolverQueryLogConfig
-> Request DeleteResolverQueryLogConfig
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteResolverQueryLogConfig
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteResolverQueryLogConfig)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DeleteResolverQueryLogConfig))
-> Logger
-> Service
-> Proxy DeleteResolverQueryLogConfig
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteResolverQueryLogConfig)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe ResolverQueryLogConfig
-> Int -> DeleteResolverQueryLogConfigResponse
DeleteResolverQueryLogConfigResponse'
(Maybe ResolverQueryLogConfig
-> Int -> DeleteResolverQueryLogConfigResponse)
-> Either String (Maybe ResolverQueryLogConfig)
-> Either String (Int -> DeleteResolverQueryLogConfigResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ResolverQueryLogConfig)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResolverQueryLogConfig")
Either String (Int -> DeleteResolverQueryLogConfigResponse)
-> Either String Int
-> Either String DeleteResolverQueryLogConfigResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DeleteResolverQueryLogConfig
instance Prelude.NFData DeleteResolverQueryLogConfig
instance Core.ToHeaders DeleteResolverQueryLogConfig where
toHeaders :: DeleteResolverQueryLogConfig -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteResolverQueryLogConfig -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Route53Resolver.DeleteResolverQueryLogConfig" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteResolverQueryLogConfig where
toJSON :: DeleteResolverQueryLogConfig -> Value
toJSON DeleteResolverQueryLogConfig' {Text
resolverQueryLogConfigId :: Text
$sel:resolverQueryLogConfigId:DeleteResolverQueryLogConfig' :: DeleteResolverQueryLogConfig -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ResolverQueryLogConfigId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resolverQueryLogConfigId
)
]
)
instance Core.ToPath DeleteResolverQueryLogConfig where
toPath :: DeleteResolverQueryLogConfig -> ByteString
toPath = ByteString -> DeleteResolverQueryLogConfig -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteResolverQueryLogConfig where
toQuery :: DeleteResolverQueryLogConfig -> QueryString
toQuery = QueryString -> DeleteResolverQueryLogConfig -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteResolverQueryLogConfigResponse = DeleteResolverQueryLogConfigResponse'
{
DeleteResolverQueryLogConfigResponse
-> Maybe ResolverQueryLogConfig
resolverQueryLogConfig :: Prelude.Maybe ResolverQueryLogConfig,
DeleteResolverQueryLogConfigResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteResolverQueryLogConfigResponse
-> DeleteResolverQueryLogConfigResponse -> Bool
(DeleteResolverQueryLogConfigResponse
-> DeleteResolverQueryLogConfigResponse -> Bool)
-> (DeleteResolverQueryLogConfigResponse
-> DeleteResolverQueryLogConfigResponse -> Bool)
-> Eq DeleteResolverQueryLogConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteResolverQueryLogConfigResponse
-> DeleteResolverQueryLogConfigResponse -> Bool
$c/= :: DeleteResolverQueryLogConfigResponse
-> DeleteResolverQueryLogConfigResponse -> Bool
== :: DeleteResolverQueryLogConfigResponse
-> DeleteResolverQueryLogConfigResponse -> Bool
$c== :: DeleteResolverQueryLogConfigResponse
-> DeleteResolverQueryLogConfigResponse -> Bool
Prelude.Eq, ReadPrec [DeleteResolverQueryLogConfigResponse]
ReadPrec DeleteResolverQueryLogConfigResponse
Int -> ReadS DeleteResolverQueryLogConfigResponse
ReadS [DeleteResolverQueryLogConfigResponse]
(Int -> ReadS DeleteResolverQueryLogConfigResponse)
-> ReadS [DeleteResolverQueryLogConfigResponse]
-> ReadPrec DeleteResolverQueryLogConfigResponse
-> ReadPrec [DeleteResolverQueryLogConfigResponse]
-> Read DeleteResolverQueryLogConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteResolverQueryLogConfigResponse]
$creadListPrec :: ReadPrec [DeleteResolverQueryLogConfigResponse]
readPrec :: ReadPrec DeleteResolverQueryLogConfigResponse
$creadPrec :: ReadPrec DeleteResolverQueryLogConfigResponse
readList :: ReadS [DeleteResolverQueryLogConfigResponse]
$creadList :: ReadS [DeleteResolverQueryLogConfigResponse]
readsPrec :: Int -> ReadS DeleteResolverQueryLogConfigResponse
$creadsPrec :: Int -> ReadS DeleteResolverQueryLogConfigResponse
Prelude.Read, Int -> DeleteResolverQueryLogConfigResponse -> ShowS
[DeleteResolverQueryLogConfigResponse] -> ShowS
DeleteResolverQueryLogConfigResponse -> String
(Int -> DeleteResolverQueryLogConfigResponse -> ShowS)
-> (DeleteResolverQueryLogConfigResponse -> String)
-> ([DeleteResolverQueryLogConfigResponse] -> ShowS)
-> Show DeleteResolverQueryLogConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteResolverQueryLogConfigResponse] -> ShowS
$cshowList :: [DeleteResolverQueryLogConfigResponse] -> ShowS
show :: DeleteResolverQueryLogConfigResponse -> String
$cshow :: DeleteResolverQueryLogConfigResponse -> String
showsPrec :: Int -> DeleteResolverQueryLogConfigResponse -> ShowS
$cshowsPrec :: Int -> DeleteResolverQueryLogConfigResponse -> ShowS
Prelude.Show, (forall x.
DeleteResolverQueryLogConfigResponse
-> Rep DeleteResolverQueryLogConfigResponse x)
-> (forall x.
Rep DeleteResolverQueryLogConfigResponse x
-> DeleteResolverQueryLogConfigResponse)
-> Generic DeleteResolverQueryLogConfigResponse
forall x.
Rep DeleteResolverQueryLogConfigResponse x
-> DeleteResolverQueryLogConfigResponse
forall x.
DeleteResolverQueryLogConfigResponse
-> Rep DeleteResolverQueryLogConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteResolverQueryLogConfigResponse x
-> DeleteResolverQueryLogConfigResponse
$cfrom :: forall x.
DeleteResolverQueryLogConfigResponse
-> Rep DeleteResolverQueryLogConfigResponse x
Prelude.Generic)
newDeleteResolverQueryLogConfigResponse ::
Prelude.Int ->
DeleteResolverQueryLogConfigResponse
newDeleteResolverQueryLogConfigResponse :: Int -> DeleteResolverQueryLogConfigResponse
newDeleteResolverQueryLogConfigResponse Int
pHttpStatus_ =
DeleteResolverQueryLogConfigResponse' :: Maybe ResolverQueryLogConfig
-> Int -> DeleteResolverQueryLogConfigResponse
DeleteResolverQueryLogConfigResponse'
{ $sel:resolverQueryLogConfig:DeleteResolverQueryLogConfigResponse' :: Maybe ResolverQueryLogConfig
resolverQueryLogConfig =
Maybe ResolverQueryLogConfig
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DeleteResolverQueryLogConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
}
deleteResolverQueryLogConfigResponse_resolverQueryLogConfig :: Lens.Lens' DeleteResolverQueryLogConfigResponse (Prelude.Maybe ResolverQueryLogConfig)
deleteResolverQueryLogConfigResponse_resolverQueryLogConfig :: (Maybe ResolverQueryLogConfig -> f (Maybe ResolverQueryLogConfig))
-> DeleteResolverQueryLogConfigResponse
-> f DeleteResolverQueryLogConfigResponse
deleteResolverQueryLogConfigResponse_resolverQueryLogConfig = (DeleteResolverQueryLogConfigResponse
-> Maybe ResolverQueryLogConfig)
-> (DeleteResolverQueryLogConfigResponse
-> Maybe ResolverQueryLogConfig
-> DeleteResolverQueryLogConfigResponse)
-> Lens
DeleteResolverQueryLogConfigResponse
DeleteResolverQueryLogConfigResponse
(Maybe ResolverQueryLogConfig)
(Maybe ResolverQueryLogConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteResolverQueryLogConfigResponse' {Maybe ResolverQueryLogConfig
resolverQueryLogConfig :: Maybe ResolverQueryLogConfig
$sel:resolverQueryLogConfig:DeleteResolverQueryLogConfigResponse' :: DeleteResolverQueryLogConfigResponse
-> Maybe ResolverQueryLogConfig
resolverQueryLogConfig} -> Maybe ResolverQueryLogConfig
resolverQueryLogConfig) (\s :: DeleteResolverQueryLogConfigResponse
s@DeleteResolverQueryLogConfigResponse' {} Maybe ResolverQueryLogConfig
a -> DeleteResolverQueryLogConfigResponse
s {$sel:resolverQueryLogConfig:DeleteResolverQueryLogConfigResponse' :: Maybe ResolverQueryLogConfig
resolverQueryLogConfig = Maybe ResolverQueryLogConfig
a} :: DeleteResolverQueryLogConfigResponse)
deleteResolverQueryLogConfigResponse_httpStatus :: Lens.Lens' DeleteResolverQueryLogConfigResponse Prelude.Int
deleteResolverQueryLogConfigResponse_httpStatus :: (Int -> f Int)
-> DeleteResolverQueryLogConfigResponse
-> f DeleteResolverQueryLogConfigResponse
deleteResolverQueryLogConfigResponse_httpStatus = (DeleteResolverQueryLogConfigResponse -> Int)
-> (DeleteResolverQueryLogConfigResponse
-> Int -> DeleteResolverQueryLogConfigResponse)
-> Lens
DeleteResolverQueryLogConfigResponse
DeleteResolverQueryLogConfigResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteResolverQueryLogConfigResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteResolverQueryLogConfigResponse' :: DeleteResolverQueryLogConfigResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteResolverQueryLogConfigResponse
s@DeleteResolverQueryLogConfigResponse' {} Int
a -> DeleteResolverQueryLogConfigResponse
s {$sel:httpStatus:DeleteResolverQueryLogConfigResponse' :: Int
httpStatus = Int
a} :: DeleteResolverQueryLogConfigResponse)
instance
Prelude.NFData
DeleteResolverQueryLogConfigResponse