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