{-# 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.Shield.DisassociateDRTLogBucket
(
DisassociateDRTLogBucket (..),
newDisassociateDRTLogBucket,
disassociateDRTLogBucket_logBucket,
DisassociateDRTLogBucketResponse (..),
newDisassociateDRTLogBucketResponse,
disassociateDRTLogBucketResponse_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.Shield.Types
data DisassociateDRTLogBucket = DisassociateDRTLogBucket'
{
DisassociateDRTLogBucket -> Text
logBucket :: Prelude.Text
}
deriving (DisassociateDRTLogBucket -> DisassociateDRTLogBucket -> Bool
(DisassociateDRTLogBucket -> DisassociateDRTLogBucket -> Bool)
-> (DisassociateDRTLogBucket -> DisassociateDRTLogBucket -> Bool)
-> Eq DisassociateDRTLogBucket
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateDRTLogBucket -> DisassociateDRTLogBucket -> Bool
$c/= :: DisassociateDRTLogBucket -> DisassociateDRTLogBucket -> Bool
== :: DisassociateDRTLogBucket -> DisassociateDRTLogBucket -> Bool
$c== :: DisassociateDRTLogBucket -> DisassociateDRTLogBucket -> Bool
Prelude.Eq, ReadPrec [DisassociateDRTLogBucket]
ReadPrec DisassociateDRTLogBucket
Int -> ReadS DisassociateDRTLogBucket
ReadS [DisassociateDRTLogBucket]
(Int -> ReadS DisassociateDRTLogBucket)
-> ReadS [DisassociateDRTLogBucket]
-> ReadPrec DisassociateDRTLogBucket
-> ReadPrec [DisassociateDRTLogBucket]
-> Read DisassociateDRTLogBucket
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateDRTLogBucket]
$creadListPrec :: ReadPrec [DisassociateDRTLogBucket]
readPrec :: ReadPrec DisassociateDRTLogBucket
$creadPrec :: ReadPrec DisassociateDRTLogBucket
readList :: ReadS [DisassociateDRTLogBucket]
$creadList :: ReadS [DisassociateDRTLogBucket]
readsPrec :: Int -> ReadS DisassociateDRTLogBucket
$creadsPrec :: Int -> ReadS DisassociateDRTLogBucket
Prelude.Read, Int -> DisassociateDRTLogBucket -> ShowS
[DisassociateDRTLogBucket] -> ShowS
DisassociateDRTLogBucket -> String
(Int -> DisassociateDRTLogBucket -> ShowS)
-> (DisassociateDRTLogBucket -> String)
-> ([DisassociateDRTLogBucket] -> ShowS)
-> Show DisassociateDRTLogBucket
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateDRTLogBucket] -> ShowS
$cshowList :: [DisassociateDRTLogBucket] -> ShowS
show :: DisassociateDRTLogBucket -> String
$cshow :: DisassociateDRTLogBucket -> String
showsPrec :: Int -> DisassociateDRTLogBucket -> ShowS
$cshowsPrec :: Int -> DisassociateDRTLogBucket -> ShowS
Prelude.Show, (forall x.
DisassociateDRTLogBucket -> Rep DisassociateDRTLogBucket x)
-> (forall x.
Rep DisassociateDRTLogBucket x -> DisassociateDRTLogBucket)
-> Generic DisassociateDRTLogBucket
forall x.
Rep DisassociateDRTLogBucket x -> DisassociateDRTLogBucket
forall x.
DisassociateDRTLogBucket -> Rep DisassociateDRTLogBucket x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateDRTLogBucket x -> DisassociateDRTLogBucket
$cfrom :: forall x.
DisassociateDRTLogBucket -> Rep DisassociateDRTLogBucket x
Prelude.Generic)
newDisassociateDRTLogBucket ::
Prelude.Text ->
DisassociateDRTLogBucket
newDisassociateDRTLogBucket :: Text -> DisassociateDRTLogBucket
newDisassociateDRTLogBucket Text
pLogBucket_ =
DisassociateDRTLogBucket' :: Text -> DisassociateDRTLogBucket
DisassociateDRTLogBucket' {$sel:logBucket:DisassociateDRTLogBucket' :: Text
logBucket = Text
pLogBucket_}
disassociateDRTLogBucket_logBucket :: Lens.Lens' DisassociateDRTLogBucket Prelude.Text
disassociateDRTLogBucket_logBucket :: (Text -> f Text)
-> DisassociateDRTLogBucket -> f DisassociateDRTLogBucket
disassociateDRTLogBucket_logBucket = (DisassociateDRTLogBucket -> Text)
-> (DisassociateDRTLogBucket -> Text -> DisassociateDRTLogBucket)
-> Lens DisassociateDRTLogBucket DisassociateDRTLogBucket Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateDRTLogBucket' {Text
logBucket :: Text
$sel:logBucket:DisassociateDRTLogBucket' :: DisassociateDRTLogBucket -> Text
logBucket} -> Text
logBucket) (\s :: DisassociateDRTLogBucket
s@DisassociateDRTLogBucket' {} Text
a -> DisassociateDRTLogBucket
s {$sel:logBucket:DisassociateDRTLogBucket' :: Text
logBucket = Text
a} :: DisassociateDRTLogBucket)
instance Core.AWSRequest DisassociateDRTLogBucket where
type
AWSResponse DisassociateDRTLogBucket =
DisassociateDRTLogBucketResponse
request :: DisassociateDRTLogBucket -> Request DisassociateDRTLogBucket
request = Service
-> DisassociateDRTLogBucket -> Request DisassociateDRTLogBucket
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateDRTLogBucket
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateDRTLogBucket)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DisassociateDRTLogBucket))
-> Logger
-> Service
-> Proxy DisassociateDRTLogBucket
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateDRTLogBucket)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateDRTLogBucketResponse
DisassociateDRTLogBucketResponse'
(Int -> DisassociateDRTLogBucketResponse)
-> Either String Int
-> Either String DisassociateDRTLogBucketResponse
forall (f :: * -> *) a b. Functor 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 DisassociateDRTLogBucket
instance Prelude.NFData DisassociateDRTLogBucket
instance Core.ToHeaders DisassociateDRTLogBucket where
toHeaders :: DisassociateDRTLogBucket -> ResponseHeaders
toHeaders =
ResponseHeaders -> DisassociateDRTLogBucket -> 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
"AWSShield_20160616.DisassociateDRTLogBucket" ::
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 DisassociateDRTLogBucket where
toJSON :: DisassociateDRTLogBucket -> Value
toJSON DisassociateDRTLogBucket' {Text
logBucket :: Text
$sel:logBucket:DisassociateDRTLogBucket' :: DisassociateDRTLogBucket -> 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
"LogBucket" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
logBucket)]
)
instance Core.ToPath DisassociateDRTLogBucket where
toPath :: DisassociateDRTLogBucket -> ByteString
toPath = ByteString -> DisassociateDRTLogBucket -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DisassociateDRTLogBucket where
toQuery :: DisassociateDRTLogBucket -> QueryString
toQuery = QueryString -> DisassociateDRTLogBucket -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateDRTLogBucketResponse = DisassociateDRTLogBucketResponse'
{
DisassociateDRTLogBucketResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateDRTLogBucketResponse
-> DisassociateDRTLogBucketResponse -> Bool
(DisassociateDRTLogBucketResponse
-> DisassociateDRTLogBucketResponse -> Bool)
-> (DisassociateDRTLogBucketResponse
-> DisassociateDRTLogBucketResponse -> Bool)
-> Eq DisassociateDRTLogBucketResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateDRTLogBucketResponse
-> DisassociateDRTLogBucketResponse -> Bool
$c/= :: DisassociateDRTLogBucketResponse
-> DisassociateDRTLogBucketResponse -> Bool
== :: DisassociateDRTLogBucketResponse
-> DisassociateDRTLogBucketResponse -> Bool
$c== :: DisassociateDRTLogBucketResponse
-> DisassociateDRTLogBucketResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateDRTLogBucketResponse]
ReadPrec DisassociateDRTLogBucketResponse
Int -> ReadS DisassociateDRTLogBucketResponse
ReadS [DisassociateDRTLogBucketResponse]
(Int -> ReadS DisassociateDRTLogBucketResponse)
-> ReadS [DisassociateDRTLogBucketResponse]
-> ReadPrec DisassociateDRTLogBucketResponse
-> ReadPrec [DisassociateDRTLogBucketResponse]
-> Read DisassociateDRTLogBucketResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateDRTLogBucketResponse]
$creadListPrec :: ReadPrec [DisassociateDRTLogBucketResponse]
readPrec :: ReadPrec DisassociateDRTLogBucketResponse
$creadPrec :: ReadPrec DisassociateDRTLogBucketResponse
readList :: ReadS [DisassociateDRTLogBucketResponse]
$creadList :: ReadS [DisassociateDRTLogBucketResponse]
readsPrec :: Int -> ReadS DisassociateDRTLogBucketResponse
$creadsPrec :: Int -> ReadS DisassociateDRTLogBucketResponse
Prelude.Read, Int -> DisassociateDRTLogBucketResponse -> ShowS
[DisassociateDRTLogBucketResponse] -> ShowS
DisassociateDRTLogBucketResponse -> String
(Int -> DisassociateDRTLogBucketResponse -> ShowS)
-> (DisassociateDRTLogBucketResponse -> String)
-> ([DisassociateDRTLogBucketResponse] -> ShowS)
-> Show DisassociateDRTLogBucketResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateDRTLogBucketResponse] -> ShowS
$cshowList :: [DisassociateDRTLogBucketResponse] -> ShowS
show :: DisassociateDRTLogBucketResponse -> String
$cshow :: DisassociateDRTLogBucketResponse -> String
showsPrec :: Int -> DisassociateDRTLogBucketResponse -> ShowS
$cshowsPrec :: Int -> DisassociateDRTLogBucketResponse -> ShowS
Prelude.Show, (forall x.
DisassociateDRTLogBucketResponse
-> Rep DisassociateDRTLogBucketResponse x)
-> (forall x.
Rep DisassociateDRTLogBucketResponse x
-> DisassociateDRTLogBucketResponse)
-> Generic DisassociateDRTLogBucketResponse
forall x.
Rep DisassociateDRTLogBucketResponse x
-> DisassociateDRTLogBucketResponse
forall x.
DisassociateDRTLogBucketResponse
-> Rep DisassociateDRTLogBucketResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateDRTLogBucketResponse x
-> DisassociateDRTLogBucketResponse
$cfrom :: forall x.
DisassociateDRTLogBucketResponse
-> Rep DisassociateDRTLogBucketResponse x
Prelude.Generic)
newDisassociateDRTLogBucketResponse ::
Prelude.Int ->
DisassociateDRTLogBucketResponse
newDisassociateDRTLogBucketResponse :: Int -> DisassociateDRTLogBucketResponse
newDisassociateDRTLogBucketResponse Int
pHttpStatus_ =
DisassociateDRTLogBucketResponse' :: Int -> DisassociateDRTLogBucketResponse
DisassociateDRTLogBucketResponse'
{ $sel:httpStatus:DisassociateDRTLogBucketResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateDRTLogBucketResponse_httpStatus :: Lens.Lens' DisassociateDRTLogBucketResponse Prelude.Int
disassociateDRTLogBucketResponse_httpStatus :: (Int -> f Int)
-> DisassociateDRTLogBucketResponse
-> f DisassociateDRTLogBucketResponse
disassociateDRTLogBucketResponse_httpStatus = (DisassociateDRTLogBucketResponse -> Int)
-> (DisassociateDRTLogBucketResponse
-> Int -> DisassociateDRTLogBucketResponse)
-> Lens
DisassociateDRTLogBucketResponse
DisassociateDRTLogBucketResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateDRTLogBucketResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateDRTLogBucketResponse' :: DisassociateDRTLogBucketResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateDRTLogBucketResponse
s@DisassociateDRTLogBucketResponse' {} Int
a -> DisassociateDRTLogBucketResponse
s {$sel:httpStatus:DisassociateDRTLogBucketResponse' :: Int
httpStatus = Int
a} :: DisassociateDRTLogBucketResponse)
instance
Prelude.NFData
DisassociateDRTLogBucketResponse