{-# 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.MacieV2.UpdateResourceProfileDetections
(
UpdateResourceProfileDetections (..),
newUpdateResourceProfileDetections,
updateResourceProfileDetections_suppressDataIdentifiers,
updateResourceProfileDetections_resourceArn,
UpdateResourceProfileDetectionsResponse (..),
newUpdateResourceProfileDetectionsResponse,
updateResourceProfileDetectionsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MacieV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateResourceProfileDetections = UpdateResourceProfileDetections'
{
UpdateResourceProfileDetections -> Maybe [SuppressDataIdentifier]
suppressDataIdentifiers :: Prelude.Maybe [SuppressDataIdentifier],
UpdateResourceProfileDetections -> Text
resourceArn :: Prelude.Text
}
deriving (UpdateResourceProfileDetections
-> UpdateResourceProfileDetections -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateResourceProfileDetections
-> UpdateResourceProfileDetections -> Bool
$c/= :: UpdateResourceProfileDetections
-> UpdateResourceProfileDetections -> Bool
== :: UpdateResourceProfileDetections
-> UpdateResourceProfileDetections -> Bool
$c== :: UpdateResourceProfileDetections
-> UpdateResourceProfileDetections -> Bool
Prelude.Eq, ReadPrec [UpdateResourceProfileDetections]
ReadPrec UpdateResourceProfileDetections
Int -> ReadS UpdateResourceProfileDetections
ReadS [UpdateResourceProfileDetections]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateResourceProfileDetections]
$creadListPrec :: ReadPrec [UpdateResourceProfileDetections]
readPrec :: ReadPrec UpdateResourceProfileDetections
$creadPrec :: ReadPrec UpdateResourceProfileDetections
readList :: ReadS [UpdateResourceProfileDetections]
$creadList :: ReadS [UpdateResourceProfileDetections]
readsPrec :: Int -> ReadS UpdateResourceProfileDetections
$creadsPrec :: Int -> ReadS UpdateResourceProfileDetections
Prelude.Read, Int -> UpdateResourceProfileDetections -> ShowS
[UpdateResourceProfileDetections] -> ShowS
UpdateResourceProfileDetections -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateResourceProfileDetections] -> ShowS
$cshowList :: [UpdateResourceProfileDetections] -> ShowS
show :: UpdateResourceProfileDetections -> String
$cshow :: UpdateResourceProfileDetections -> String
showsPrec :: Int -> UpdateResourceProfileDetections -> ShowS
$cshowsPrec :: Int -> UpdateResourceProfileDetections -> ShowS
Prelude.Show, forall x.
Rep UpdateResourceProfileDetections x
-> UpdateResourceProfileDetections
forall x.
UpdateResourceProfileDetections
-> Rep UpdateResourceProfileDetections x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateResourceProfileDetections x
-> UpdateResourceProfileDetections
$cfrom :: forall x.
UpdateResourceProfileDetections
-> Rep UpdateResourceProfileDetections x
Prelude.Generic)
newUpdateResourceProfileDetections ::
Prelude.Text ->
UpdateResourceProfileDetections
newUpdateResourceProfileDetections :: Text -> UpdateResourceProfileDetections
newUpdateResourceProfileDetections Text
pResourceArn_ =
UpdateResourceProfileDetections'
{ $sel:suppressDataIdentifiers:UpdateResourceProfileDetections' :: Maybe [SuppressDataIdentifier]
suppressDataIdentifiers =
forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:UpdateResourceProfileDetections' :: Text
resourceArn = Text
pResourceArn_
}
updateResourceProfileDetections_suppressDataIdentifiers :: Lens.Lens' UpdateResourceProfileDetections (Prelude.Maybe [SuppressDataIdentifier])
updateResourceProfileDetections_suppressDataIdentifiers :: Lens'
UpdateResourceProfileDetections (Maybe [SuppressDataIdentifier])
updateResourceProfileDetections_suppressDataIdentifiers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceProfileDetections' {Maybe [SuppressDataIdentifier]
suppressDataIdentifiers :: Maybe [SuppressDataIdentifier]
$sel:suppressDataIdentifiers:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Maybe [SuppressDataIdentifier]
suppressDataIdentifiers} -> Maybe [SuppressDataIdentifier]
suppressDataIdentifiers) (\s :: UpdateResourceProfileDetections
s@UpdateResourceProfileDetections' {} Maybe [SuppressDataIdentifier]
a -> UpdateResourceProfileDetections
s {$sel:suppressDataIdentifiers:UpdateResourceProfileDetections' :: Maybe [SuppressDataIdentifier]
suppressDataIdentifiers = Maybe [SuppressDataIdentifier]
a} :: UpdateResourceProfileDetections) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateResourceProfileDetections_resourceArn :: Lens.Lens' UpdateResourceProfileDetections Prelude.Text
updateResourceProfileDetections_resourceArn :: Lens' UpdateResourceProfileDetections Text
updateResourceProfileDetections_resourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceProfileDetections' {Text
resourceArn :: Text
$sel:resourceArn:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Text
resourceArn} -> Text
resourceArn) (\s :: UpdateResourceProfileDetections
s@UpdateResourceProfileDetections' {} Text
a -> UpdateResourceProfileDetections
s {$sel:resourceArn:UpdateResourceProfileDetections' :: Text
resourceArn = Text
a} :: UpdateResourceProfileDetections)
instance
Core.AWSRequest
UpdateResourceProfileDetections
where
type
AWSResponse UpdateResourceProfileDetections =
UpdateResourceProfileDetectionsResponse
request :: (Service -> Service)
-> UpdateResourceProfileDetections
-> Request UpdateResourceProfileDetections
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateResourceProfileDetections
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse UpdateResourceProfileDetections)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> UpdateResourceProfileDetectionsResponse
UpdateResourceProfileDetectionsResponse'
forall (f :: * -> *) a b. Functor 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
UpdateResourceProfileDetections
where
hashWithSalt :: Int -> UpdateResourceProfileDetections -> Int
hashWithSalt
Int
_salt
UpdateResourceProfileDetections' {Maybe [SuppressDataIdentifier]
Text
resourceArn :: Text
suppressDataIdentifiers :: Maybe [SuppressDataIdentifier]
$sel:resourceArn:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Text
$sel:suppressDataIdentifiers:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Maybe [SuppressDataIdentifier]
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [SuppressDataIdentifier]
suppressDataIdentifiers
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceArn
instance
Prelude.NFData
UpdateResourceProfileDetections
where
rnf :: UpdateResourceProfileDetections -> ()
rnf UpdateResourceProfileDetections' {Maybe [SuppressDataIdentifier]
Text
resourceArn :: Text
suppressDataIdentifiers :: Maybe [SuppressDataIdentifier]
$sel:resourceArn:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Text
$sel:suppressDataIdentifiers:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Maybe [SuppressDataIdentifier]
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe [SuppressDataIdentifier]
suppressDataIdentifiers
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
resourceArn
instance
Data.ToHeaders
UpdateResourceProfileDetections
where
toHeaders :: UpdateResourceProfileDetections -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON UpdateResourceProfileDetections where
toJSON :: UpdateResourceProfileDetections -> Value
toJSON UpdateResourceProfileDetections' {Maybe [SuppressDataIdentifier]
Text
resourceArn :: Text
suppressDataIdentifiers :: Maybe [SuppressDataIdentifier]
$sel:resourceArn:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Text
$sel:suppressDataIdentifiers:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Maybe [SuppressDataIdentifier]
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"suppressDataIdentifiers" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SuppressDataIdentifier]
suppressDataIdentifiers
]
)
instance Data.ToPath UpdateResourceProfileDetections where
toPath :: UpdateResourceProfileDetections -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const ByteString
"/resource-profiles/detections"
instance Data.ToQuery UpdateResourceProfileDetections where
toQuery :: UpdateResourceProfileDetections -> QueryString
toQuery UpdateResourceProfileDetections' {Maybe [SuppressDataIdentifier]
Text
resourceArn :: Text
suppressDataIdentifiers :: Maybe [SuppressDataIdentifier]
$sel:resourceArn:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Text
$sel:suppressDataIdentifiers:UpdateResourceProfileDetections' :: UpdateResourceProfileDetections -> Maybe [SuppressDataIdentifier]
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"resourceArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
resourceArn]
data UpdateResourceProfileDetectionsResponse = UpdateResourceProfileDetectionsResponse'
{
UpdateResourceProfileDetectionsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (UpdateResourceProfileDetectionsResponse
-> UpdateResourceProfileDetectionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateResourceProfileDetectionsResponse
-> UpdateResourceProfileDetectionsResponse -> Bool
$c/= :: UpdateResourceProfileDetectionsResponse
-> UpdateResourceProfileDetectionsResponse -> Bool
== :: UpdateResourceProfileDetectionsResponse
-> UpdateResourceProfileDetectionsResponse -> Bool
$c== :: UpdateResourceProfileDetectionsResponse
-> UpdateResourceProfileDetectionsResponse -> Bool
Prelude.Eq, ReadPrec [UpdateResourceProfileDetectionsResponse]
ReadPrec UpdateResourceProfileDetectionsResponse
Int -> ReadS UpdateResourceProfileDetectionsResponse
ReadS [UpdateResourceProfileDetectionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateResourceProfileDetectionsResponse]
$creadListPrec :: ReadPrec [UpdateResourceProfileDetectionsResponse]
readPrec :: ReadPrec UpdateResourceProfileDetectionsResponse
$creadPrec :: ReadPrec UpdateResourceProfileDetectionsResponse
readList :: ReadS [UpdateResourceProfileDetectionsResponse]
$creadList :: ReadS [UpdateResourceProfileDetectionsResponse]
readsPrec :: Int -> ReadS UpdateResourceProfileDetectionsResponse
$creadsPrec :: Int -> ReadS UpdateResourceProfileDetectionsResponse
Prelude.Read, Int -> UpdateResourceProfileDetectionsResponse -> ShowS
[UpdateResourceProfileDetectionsResponse] -> ShowS
UpdateResourceProfileDetectionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateResourceProfileDetectionsResponse] -> ShowS
$cshowList :: [UpdateResourceProfileDetectionsResponse] -> ShowS
show :: UpdateResourceProfileDetectionsResponse -> String
$cshow :: UpdateResourceProfileDetectionsResponse -> String
showsPrec :: Int -> UpdateResourceProfileDetectionsResponse -> ShowS
$cshowsPrec :: Int -> UpdateResourceProfileDetectionsResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateResourceProfileDetectionsResponse x
-> UpdateResourceProfileDetectionsResponse
forall x.
UpdateResourceProfileDetectionsResponse
-> Rep UpdateResourceProfileDetectionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateResourceProfileDetectionsResponse x
-> UpdateResourceProfileDetectionsResponse
$cfrom :: forall x.
UpdateResourceProfileDetectionsResponse
-> Rep UpdateResourceProfileDetectionsResponse x
Prelude.Generic)
newUpdateResourceProfileDetectionsResponse ::
Prelude.Int ->
UpdateResourceProfileDetectionsResponse
newUpdateResourceProfileDetectionsResponse :: Int -> UpdateResourceProfileDetectionsResponse
newUpdateResourceProfileDetectionsResponse
Int
pHttpStatus_ =
UpdateResourceProfileDetectionsResponse'
{ $sel:httpStatus:UpdateResourceProfileDetectionsResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
updateResourceProfileDetectionsResponse_httpStatus :: Lens.Lens' UpdateResourceProfileDetectionsResponse Prelude.Int
updateResourceProfileDetectionsResponse_httpStatus :: Lens' UpdateResourceProfileDetectionsResponse Int
updateResourceProfileDetectionsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateResourceProfileDetectionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateResourceProfileDetectionsResponse' :: UpdateResourceProfileDetectionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateResourceProfileDetectionsResponse
s@UpdateResourceProfileDetectionsResponse' {} Int
a -> UpdateResourceProfileDetectionsResponse
s {$sel:httpStatus:UpdateResourceProfileDetectionsResponse' :: Int
httpStatus = Int
a} :: UpdateResourceProfileDetectionsResponse)
instance
Prelude.NFData
UpdateResourceProfileDetectionsResponse
where
rnf :: UpdateResourceProfileDetectionsResponse -> ()
rnf UpdateResourceProfileDetectionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateResourceProfileDetectionsResponse' :: UpdateResourceProfileDetectionsResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus