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