{-# 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.SecurityHub.DisableSecurityHub
(
DisableSecurityHub (..),
newDisableSecurityHub,
DisableSecurityHubResponse (..),
newDisableSecurityHubResponse,
disableSecurityHubResponse_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.SecurityHub.Types
data DisableSecurityHub = DisableSecurityHub'
{
}
deriving (DisableSecurityHub -> DisableSecurityHub -> Bool
(DisableSecurityHub -> DisableSecurityHub -> Bool)
-> (DisableSecurityHub -> DisableSecurityHub -> Bool)
-> Eq DisableSecurityHub
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableSecurityHub -> DisableSecurityHub -> Bool
$c/= :: DisableSecurityHub -> DisableSecurityHub -> Bool
== :: DisableSecurityHub -> DisableSecurityHub -> Bool
$c== :: DisableSecurityHub -> DisableSecurityHub -> Bool
Prelude.Eq, ReadPrec [DisableSecurityHub]
ReadPrec DisableSecurityHub
Int -> ReadS DisableSecurityHub
ReadS [DisableSecurityHub]
(Int -> ReadS DisableSecurityHub)
-> ReadS [DisableSecurityHub]
-> ReadPrec DisableSecurityHub
-> ReadPrec [DisableSecurityHub]
-> Read DisableSecurityHub
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableSecurityHub]
$creadListPrec :: ReadPrec [DisableSecurityHub]
readPrec :: ReadPrec DisableSecurityHub
$creadPrec :: ReadPrec DisableSecurityHub
readList :: ReadS [DisableSecurityHub]
$creadList :: ReadS [DisableSecurityHub]
readsPrec :: Int -> ReadS DisableSecurityHub
$creadsPrec :: Int -> ReadS DisableSecurityHub
Prelude.Read, Int -> DisableSecurityHub -> ShowS
[DisableSecurityHub] -> ShowS
DisableSecurityHub -> String
(Int -> DisableSecurityHub -> ShowS)
-> (DisableSecurityHub -> String)
-> ([DisableSecurityHub] -> ShowS)
-> Show DisableSecurityHub
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableSecurityHub] -> ShowS
$cshowList :: [DisableSecurityHub] -> ShowS
show :: DisableSecurityHub -> String
$cshow :: DisableSecurityHub -> String
showsPrec :: Int -> DisableSecurityHub -> ShowS
$cshowsPrec :: Int -> DisableSecurityHub -> ShowS
Prelude.Show, (forall x. DisableSecurityHub -> Rep DisableSecurityHub x)
-> (forall x. Rep DisableSecurityHub x -> DisableSecurityHub)
-> Generic DisableSecurityHub
forall x. Rep DisableSecurityHub x -> DisableSecurityHub
forall x. DisableSecurityHub -> Rep DisableSecurityHub x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DisableSecurityHub x -> DisableSecurityHub
$cfrom :: forall x. DisableSecurityHub -> Rep DisableSecurityHub x
Prelude.Generic)
newDisableSecurityHub ::
DisableSecurityHub
newDisableSecurityHub :: DisableSecurityHub
newDisableSecurityHub = DisableSecurityHub
DisableSecurityHub'
instance Core.AWSRequest DisableSecurityHub where
type
AWSResponse DisableSecurityHub =
DisableSecurityHubResponse
request :: DisableSecurityHub -> Request DisableSecurityHub
request = Service -> DisableSecurityHub -> Request DisableSecurityHub
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DisableSecurityHub
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisableSecurityHub)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DisableSecurityHub))
-> Logger
-> Service
-> Proxy DisableSecurityHub
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisableSecurityHub)))
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 -> DisableSecurityHubResponse
DisableSecurityHubResponse'
(Int -> DisableSecurityHubResponse)
-> Either String Int -> Either String DisableSecurityHubResponse
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 DisableSecurityHub
instance Prelude.NFData DisableSecurityHub
instance Core.ToHeaders DisableSecurityHub where
toHeaders :: DisableSecurityHub -> ResponseHeaders
toHeaders =
ResponseHeaders -> DisableSecurityHub -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath DisableSecurityHub where
toPath :: DisableSecurityHub -> ByteString
toPath = ByteString -> DisableSecurityHub -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/accounts"
instance Core.ToQuery DisableSecurityHub where
toQuery :: DisableSecurityHub -> QueryString
toQuery = QueryString -> DisableSecurityHub -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisableSecurityHubResponse = DisableSecurityHubResponse'
{
DisableSecurityHubResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisableSecurityHubResponse -> DisableSecurityHubResponse -> Bool
(DisableSecurityHubResponse -> DisableSecurityHubResponse -> Bool)
-> (DisableSecurityHubResponse
-> DisableSecurityHubResponse -> Bool)
-> Eq DisableSecurityHubResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisableSecurityHubResponse -> DisableSecurityHubResponse -> Bool
$c/= :: DisableSecurityHubResponse -> DisableSecurityHubResponse -> Bool
== :: DisableSecurityHubResponse -> DisableSecurityHubResponse -> Bool
$c== :: DisableSecurityHubResponse -> DisableSecurityHubResponse -> Bool
Prelude.Eq, ReadPrec [DisableSecurityHubResponse]
ReadPrec DisableSecurityHubResponse
Int -> ReadS DisableSecurityHubResponse
ReadS [DisableSecurityHubResponse]
(Int -> ReadS DisableSecurityHubResponse)
-> ReadS [DisableSecurityHubResponse]
-> ReadPrec DisableSecurityHubResponse
-> ReadPrec [DisableSecurityHubResponse]
-> Read DisableSecurityHubResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisableSecurityHubResponse]
$creadListPrec :: ReadPrec [DisableSecurityHubResponse]
readPrec :: ReadPrec DisableSecurityHubResponse
$creadPrec :: ReadPrec DisableSecurityHubResponse
readList :: ReadS [DisableSecurityHubResponse]
$creadList :: ReadS [DisableSecurityHubResponse]
readsPrec :: Int -> ReadS DisableSecurityHubResponse
$creadsPrec :: Int -> ReadS DisableSecurityHubResponse
Prelude.Read, Int -> DisableSecurityHubResponse -> ShowS
[DisableSecurityHubResponse] -> ShowS
DisableSecurityHubResponse -> String
(Int -> DisableSecurityHubResponse -> ShowS)
-> (DisableSecurityHubResponse -> String)
-> ([DisableSecurityHubResponse] -> ShowS)
-> Show DisableSecurityHubResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisableSecurityHubResponse] -> ShowS
$cshowList :: [DisableSecurityHubResponse] -> ShowS
show :: DisableSecurityHubResponse -> String
$cshow :: DisableSecurityHubResponse -> String
showsPrec :: Int -> DisableSecurityHubResponse -> ShowS
$cshowsPrec :: Int -> DisableSecurityHubResponse -> ShowS
Prelude.Show, (forall x.
DisableSecurityHubResponse -> Rep DisableSecurityHubResponse x)
-> (forall x.
Rep DisableSecurityHubResponse x -> DisableSecurityHubResponse)
-> Generic DisableSecurityHubResponse
forall x.
Rep DisableSecurityHubResponse x -> DisableSecurityHubResponse
forall x.
DisableSecurityHubResponse -> Rep DisableSecurityHubResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisableSecurityHubResponse x -> DisableSecurityHubResponse
$cfrom :: forall x.
DisableSecurityHubResponse -> Rep DisableSecurityHubResponse x
Prelude.Generic)
newDisableSecurityHubResponse ::
Prelude.Int ->
DisableSecurityHubResponse
newDisableSecurityHubResponse :: Int -> DisableSecurityHubResponse
newDisableSecurityHubResponse Int
pHttpStatus_ =
DisableSecurityHubResponse' :: Int -> DisableSecurityHubResponse
DisableSecurityHubResponse'
{ $sel:httpStatus:DisableSecurityHubResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disableSecurityHubResponse_httpStatus :: Lens.Lens' DisableSecurityHubResponse Prelude.Int
disableSecurityHubResponse_httpStatus :: (Int -> f Int)
-> DisableSecurityHubResponse -> f DisableSecurityHubResponse
disableSecurityHubResponse_httpStatus = (DisableSecurityHubResponse -> Int)
-> (DisableSecurityHubResponse
-> Int -> DisableSecurityHubResponse)
-> Lens
DisableSecurityHubResponse DisableSecurityHubResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisableSecurityHubResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisableSecurityHubResponse' :: DisableSecurityHubResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisableSecurityHubResponse
s@DisableSecurityHubResponse' {} Int
a -> DisableSecurityHubResponse
s {$sel:httpStatus:DisableSecurityHubResponse' :: Int
httpStatus = Int
a} :: DisableSecurityHubResponse)
instance Prelude.NFData DisableSecurityHubResponse