{-# 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.BatchUpdateFindings
(
BatchUpdateFindings (..),
newBatchUpdateFindings,
batchUpdateFindings_criticality,
batchUpdateFindings_note,
batchUpdateFindings_severity,
batchUpdateFindings_types,
batchUpdateFindings_relatedFindings,
batchUpdateFindings_confidence,
batchUpdateFindings_workflow,
batchUpdateFindings_verificationState,
batchUpdateFindings_userDefinedFields,
batchUpdateFindings_findingIdentifiers,
BatchUpdateFindingsResponse (..),
newBatchUpdateFindingsResponse,
batchUpdateFindingsResponse_httpStatus,
batchUpdateFindingsResponse_processedFindings,
batchUpdateFindingsResponse_unprocessedFindings,
)
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 BatchUpdateFindings = BatchUpdateFindings'
{
BatchUpdateFindings -> Maybe Natural
criticality :: Prelude.Maybe Prelude.Natural,
BatchUpdateFindings -> Maybe NoteUpdate
note :: Prelude.Maybe NoteUpdate,
BatchUpdateFindings -> Maybe SeverityUpdate
severity :: Prelude.Maybe SeverityUpdate,
BatchUpdateFindings -> Maybe [Text]
types :: Prelude.Maybe [Prelude.Text],
BatchUpdateFindings -> Maybe [RelatedFinding]
relatedFindings :: Prelude.Maybe [RelatedFinding],
BatchUpdateFindings -> Maybe Natural
confidence :: Prelude.Maybe Prelude.Natural,
BatchUpdateFindings -> Maybe WorkflowUpdate
workflow :: Prelude.Maybe WorkflowUpdate,
BatchUpdateFindings -> Maybe VerificationState
verificationState :: Prelude.Maybe VerificationState,
BatchUpdateFindings -> Maybe (HashMap Text Text)
userDefinedFields :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
BatchUpdateFindings -> [AwsSecurityFindingIdentifier]
findingIdentifiers :: [AwsSecurityFindingIdentifier]
}
deriving (BatchUpdateFindings -> BatchUpdateFindings -> Bool
(BatchUpdateFindings -> BatchUpdateFindings -> Bool)
-> (BatchUpdateFindings -> BatchUpdateFindings -> Bool)
-> Eq BatchUpdateFindings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpdateFindings -> BatchUpdateFindings -> Bool
$c/= :: BatchUpdateFindings -> BatchUpdateFindings -> Bool
== :: BatchUpdateFindings -> BatchUpdateFindings -> Bool
$c== :: BatchUpdateFindings -> BatchUpdateFindings -> Bool
Prelude.Eq, ReadPrec [BatchUpdateFindings]
ReadPrec BatchUpdateFindings
Int -> ReadS BatchUpdateFindings
ReadS [BatchUpdateFindings]
(Int -> ReadS BatchUpdateFindings)
-> ReadS [BatchUpdateFindings]
-> ReadPrec BatchUpdateFindings
-> ReadPrec [BatchUpdateFindings]
-> Read BatchUpdateFindings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchUpdateFindings]
$creadListPrec :: ReadPrec [BatchUpdateFindings]
readPrec :: ReadPrec BatchUpdateFindings
$creadPrec :: ReadPrec BatchUpdateFindings
readList :: ReadS [BatchUpdateFindings]
$creadList :: ReadS [BatchUpdateFindings]
readsPrec :: Int -> ReadS BatchUpdateFindings
$creadsPrec :: Int -> ReadS BatchUpdateFindings
Prelude.Read, Int -> BatchUpdateFindings -> ShowS
[BatchUpdateFindings] -> ShowS
BatchUpdateFindings -> String
(Int -> BatchUpdateFindings -> ShowS)
-> (BatchUpdateFindings -> String)
-> ([BatchUpdateFindings] -> ShowS)
-> Show BatchUpdateFindings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpdateFindings] -> ShowS
$cshowList :: [BatchUpdateFindings] -> ShowS
show :: BatchUpdateFindings -> String
$cshow :: BatchUpdateFindings -> String
showsPrec :: Int -> BatchUpdateFindings -> ShowS
$cshowsPrec :: Int -> BatchUpdateFindings -> ShowS
Prelude.Show, (forall x. BatchUpdateFindings -> Rep BatchUpdateFindings x)
-> (forall x. Rep BatchUpdateFindings x -> BatchUpdateFindings)
-> Generic BatchUpdateFindings
forall x. Rep BatchUpdateFindings x -> BatchUpdateFindings
forall x. BatchUpdateFindings -> Rep BatchUpdateFindings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchUpdateFindings x -> BatchUpdateFindings
$cfrom :: forall x. BatchUpdateFindings -> Rep BatchUpdateFindings x
Prelude.Generic)
newBatchUpdateFindings ::
BatchUpdateFindings
newBatchUpdateFindings :: BatchUpdateFindings
newBatchUpdateFindings =
BatchUpdateFindings' :: Maybe Natural
-> Maybe NoteUpdate
-> Maybe SeverityUpdate
-> Maybe [Text]
-> Maybe [RelatedFinding]
-> Maybe Natural
-> Maybe WorkflowUpdate
-> Maybe VerificationState
-> Maybe (HashMap Text Text)
-> [AwsSecurityFindingIdentifier]
-> BatchUpdateFindings
BatchUpdateFindings'
{ $sel:criticality:BatchUpdateFindings' :: Maybe Natural
criticality = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:note:BatchUpdateFindings' :: Maybe NoteUpdate
note = Maybe NoteUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:severity:BatchUpdateFindings' :: Maybe SeverityUpdate
severity = Maybe SeverityUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:types:BatchUpdateFindings' :: Maybe [Text]
types = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:relatedFindings:BatchUpdateFindings' :: Maybe [RelatedFinding]
relatedFindings = Maybe [RelatedFinding]
forall a. Maybe a
Prelude.Nothing,
$sel:confidence:BatchUpdateFindings' :: Maybe Natural
confidence = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:workflow:BatchUpdateFindings' :: Maybe WorkflowUpdate
workflow = Maybe WorkflowUpdate
forall a. Maybe a
Prelude.Nothing,
$sel:verificationState:BatchUpdateFindings' :: Maybe VerificationState
verificationState = Maybe VerificationState
forall a. Maybe a
Prelude.Nothing,
$sel:userDefinedFields:BatchUpdateFindings' :: Maybe (HashMap Text Text)
userDefinedFields = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:findingIdentifiers:BatchUpdateFindings' :: [AwsSecurityFindingIdentifier]
findingIdentifiers = [AwsSecurityFindingIdentifier]
forall a. Monoid a => a
Prelude.mempty
}
batchUpdateFindings_criticality :: Lens.Lens' BatchUpdateFindings (Prelude.Maybe Prelude.Natural)
batchUpdateFindings_criticality :: (Maybe Natural -> f (Maybe Natural))
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_criticality = (BatchUpdateFindings -> Maybe Natural)
-> (BatchUpdateFindings -> Maybe Natural -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {Maybe Natural
criticality :: Maybe Natural
$sel:criticality:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe Natural
criticality} -> Maybe Natural
criticality) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} Maybe Natural
a -> BatchUpdateFindings
s {$sel:criticality:BatchUpdateFindings' :: Maybe Natural
criticality = Maybe Natural
a} :: BatchUpdateFindings)
batchUpdateFindings_note :: Lens.Lens' BatchUpdateFindings (Prelude.Maybe NoteUpdate)
batchUpdateFindings_note :: (Maybe NoteUpdate -> f (Maybe NoteUpdate))
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_note = (BatchUpdateFindings -> Maybe NoteUpdate)
-> (BatchUpdateFindings -> Maybe NoteUpdate -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
(Maybe NoteUpdate)
(Maybe NoteUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {Maybe NoteUpdate
note :: Maybe NoteUpdate
$sel:note:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe NoteUpdate
note} -> Maybe NoteUpdate
note) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} Maybe NoteUpdate
a -> BatchUpdateFindings
s {$sel:note:BatchUpdateFindings' :: Maybe NoteUpdate
note = Maybe NoteUpdate
a} :: BatchUpdateFindings)
batchUpdateFindings_severity :: Lens.Lens' BatchUpdateFindings (Prelude.Maybe SeverityUpdate)
batchUpdateFindings_severity :: (Maybe SeverityUpdate -> f (Maybe SeverityUpdate))
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_severity = (BatchUpdateFindings -> Maybe SeverityUpdate)
-> (BatchUpdateFindings
-> Maybe SeverityUpdate -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
(Maybe SeverityUpdate)
(Maybe SeverityUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {Maybe SeverityUpdate
severity :: Maybe SeverityUpdate
$sel:severity:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe SeverityUpdate
severity} -> Maybe SeverityUpdate
severity) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} Maybe SeverityUpdate
a -> BatchUpdateFindings
s {$sel:severity:BatchUpdateFindings' :: Maybe SeverityUpdate
severity = Maybe SeverityUpdate
a} :: BatchUpdateFindings)
batchUpdateFindings_types :: Lens.Lens' BatchUpdateFindings (Prelude.Maybe [Prelude.Text])
batchUpdateFindings_types :: (Maybe [Text] -> f (Maybe [Text]))
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_types = (BatchUpdateFindings -> Maybe [Text])
-> (BatchUpdateFindings -> Maybe [Text] -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {Maybe [Text]
types :: Maybe [Text]
$sel:types:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe [Text]
types} -> Maybe [Text]
types) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} Maybe [Text]
a -> BatchUpdateFindings
s {$sel:types:BatchUpdateFindings' :: Maybe [Text]
types = Maybe [Text]
a} :: BatchUpdateFindings) ((Maybe [Text] -> f (Maybe [Text]))
-> BatchUpdateFindings -> f BatchUpdateFindings)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BatchUpdateFindings
-> f BatchUpdateFindings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchUpdateFindings_relatedFindings :: Lens.Lens' BatchUpdateFindings (Prelude.Maybe [RelatedFinding])
batchUpdateFindings_relatedFindings :: (Maybe [RelatedFinding] -> f (Maybe [RelatedFinding]))
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_relatedFindings = (BatchUpdateFindings -> Maybe [RelatedFinding])
-> (BatchUpdateFindings
-> Maybe [RelatedFinding] -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
(Maybe [RelatedFinding])
(Maybe [RelatedFinding])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {Maybe [RelatedFinding]
relatedFindings :: Maybe [RelatedFinding]
$sel:relatedFindings:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe [RelatedFinding]
relatedFindings} -> Maybe [RelatedFinding]
relatedFindings) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} Maybe [RelatedFinding]
a -> BatchUpdateFindings
s {$sel:relatedFindings:BatchUpdateFindings' :: Maybe [RelatedFinding]
relatedFindings = Maybe [RelatedFinding]
a} :: BatchUpdateFindings) ((Maybe [RelatedFinding] -> f (Maybe [RelatedFinding]))
-> BatchUpdateFindings -> f BatchUpdateFindings)
-> ((Maybe [RelatedFinding] -> f (Maybe [RelatedFinding]))
-> Maybe [RelatedFinding] -> f (Maybe [RelatedFinding]))
-> (Maybe [RelatedFinding] -> f (Maybe [RelatedFinding]))
-> BatchUpdateFindings
-> f BatchUpdateFindings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[RelatedFinding] [RelatedFinding] [RelatedFinding] [RelatedFinding]
-> Iso
(Maybe [RelatedFinding])
(Maybe [RelatedFinding])
(Maybe [RelatedFinding])
(Maybe [RelatedFinding])
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 AnIso
[RelatedFinding] [RelatedFinding] [RelatedFinding] [RelatedFinding]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchUpdateFindings_confidence :: Lens.Lens' BatchUpdateFindings (Prelude.Maybe Prelude.Natural)
batchUpdateFindings_confidence :: (Maybe Natural -> f (Maybe Natural))
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_confidence = (BatchUpdateFindings -> Maybe Natural)
-> (BatchUpdateFindings -> Maybe Natural -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {Maybe Natural
confidence :: Maybe Natural
$sel:confidence:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe Natural
confidence} -> Maybe Natural
confidence) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} Maybe Natural
a -> BatchUpdateFindings
s {$sel:confidence:BatchUpdateFindings' :: Maybe Natural
confidence = Maybe Natural
a} :: BatchUpdateFindings)
batchUpdateFindings_workflow :: Lens.Lens' BatchUpdateFindings (Prelude.Maybe WorkflowUpdate)
batchUpdateFindings_workflow :: (Maybe WorkflowUpdate -> f (Maybe WorkflowUpdate))
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_workflow = (BatchUpdateFindings -> Maybe WorkflowUpdate)
-> (BatchUpdateFindings
-> Maybe WorkflowUpdate -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
(Maybe WorkflowUpdate)
(Maybe WorkflowUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {Maybe WorkflowUpdate
workflow :: Maybe WorkflowUpdate
$sel:workflow:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe WorkflowUpdate
workflow} -> Maybe WorkflowUpdate
workflow) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} Maybe WorkflowUpdate
a -> BatchUpdateFindings
s {$sel:workflow:BatchUpdateFindings' :: Maybe WorkflowUpdate
workflow = Maybe WorkflowUpdate
a} :: BatchUpdateFindings)
batchUpdateFindings_verificationState :: Lens.Lens' BatchUpdateFindings (Prelude.Maybe VerificationState)
batchUpdateFindings_verificationState :: (Maybe VerificationState -> f (Maybe VerificationState))
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_verificationState = (BatchUpdateFindings -> Maybe VerificationState)
-> (BatchUpdateFindings
-> Maybe VerificationState -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
(Maybe VerificationState)
(Maybe VerificationState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {Maybe VerificationState
verificationState :: Maybe VerificationState
$sel:verificationState:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe VerificationState
verificationState} -> Maybe VerificationState
verificationState) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} Maybe VerificationState
a -> BatchUpdateFindings
s {$sel:verificationState:BatchUpdateFindings' :: Maybe VerificationState
verificationState = Maybe VerificationState
a} :: BatchUpdateFindings)
batchUpdateFindings_userDefinedFields :: Lens.Lens' BatchUpdateFindings (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
batchUpdateFindings_userDefinedFields :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_userDefinedFields = (BatchUpdateFindings -> Maybe (HashMap Text Text))
-> (BatchUpdateFindings
-> Maybe (HashMap Text Text) -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {Maybe (HashMap Text Text)
userDefinedFields :: Maybe (HashMap Text Text)
$sel:userDefinedFields:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe (HashMap Text Text)
userDefinedFields} -> Maybe (HashMap Text Text)
userDefinedFields) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} Maybe (HashMap Text Text)
a -> BatchUpdateFindings
s {$sel:userDefinedFields:BatchUpdateFindings' :: Maybe (HashMap Text Text)
userDefinedFields = Maybe (HashMap Text Text)
a} :: BatchUpdateFindings) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> BatchUpdateFindings -> f BatchUpdateFindings)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> BatchUpdateFindings
-> f BatchUpdateFindings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchUpdateFindings_findingIdentifiers :: Lens.Lens' BatchUpdateFindings [AwsSecurityFindingIdentifier]
batchUpdateFindings_findingIdentifiers :: ([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> BatchUpdateFindings -> f BatchUpdateFindings
batchUpdateFindings_findingIdentifiers = (BatchUpdateFindings -> [AwsSecurityFindingIdentifier])
-> (BatchUpdateFindings
-> [AwsSecurityFindingIdentifier] -> BatchUpdateFindings)
-> Lens
BatchUpdateFindings
BatchUpdateFindings
[AwsSecurityFindingIdentifier]
[AwsSecurityFindingIdentifier]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindings' {[AwsSecurityFindingIdentifier]
findingIdentifiers :: [AwsSecurityFindingIdentifier]
$sel:findingIdentifiers:BatchUpdateFindings' :: BatchUpdateFindings -> [AwsSecurityFindingIdentifier]
findingIdentifiers} -> [AwsSecurityFindingIdentifier]
findingIdentifiers) (\s :: BatchUpdateFindings
s@BatchUpdateFindings' {} [AwsSecurityFindingIdentifier]
a -> BatchUpdateFindings
s {$sel:findingIdentifiers:BatchUpdateFindings' :: [AwsSecurityFindingIdentifier]
findingIdentifiers = [AwsSecurityFindingIdentifier]
a} :: BatchUpdateFindings) (([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> BatchUpdateFindings -> f BatchUpdateFindings)
-> (([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> [AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> ([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> BatchUpdateFindings
-> f BatchUpdateFindings
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> [AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest BatchUpdateFindings where
type
AWSResponse BatchUpdateFindings =
BatchUpdateFindingsResponse
request :: BatchUpdateFindings -> Request BatchUpdateFindings
request = Service -> BatchUpdateFindings -> Request BatchUpdateFindings
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
response :: Logger
-> Service
-> Proxy BatchUpdateFindings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse BatchUpdateFindings)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse BatchUpdateFindings))
-> Logger
-> Service
-> Proxy BatchUpdateFindings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse BatchUpdateFindings)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int
-> [AwsSecurityFindingIdentifier]
-> [BatchUpdateFindingsUnprocessedFinding]
-> BatchUpdateFindingsResponse
BatchUpdateFindingsResponse'
(Int
-> [AwsSecurityFindingIdentifier]
-> [BatchUpdateFindingsUnprocessedFinding]
-> BatchUpdateFindingsResponse)
-> Either String Int
-> Either
String
([AwsSecurityFindingIdentifier]
-> [BatchUpdateFindingsUnprocessedFinding]
-> BatchUpdateFindingsResponse)
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))
Either
String
([AwsSecurityFindingIdentifier]
-> [BatchUpdateFindingsUnprocessedFinding]
-> BatchUpdateFindingsResponse)
-> Either String [AwsSecurityFindingIdentifier]
-> Either
String
([BatchUpdateFindingsUnprocessedFinding]
-> BatchUpdateFindingsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe [AwsSecurityFindingIdentifier])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ProcessedFindings"
Either String (Maybe [AwsSecurityFindingIdentifier])
-> [AwsSecurityFindingIdentifier]
-> Either String [AwsSecurityFindingIdentifier]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [AwsSecurityFindingIdentifier]
forall a. Monoid a => a
Prelude.mempty
)
Either
String
([BatchUpdateFindingsUnprocessedFinding]
-> BatchUpdateFindingsResponse)
-> Either String [BatchUpdateFindingsUnprocessedFinding]
-> Either String BatchUpdateFindingsResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either String (Maybe [BatchUpdateFindingsUnprocessedFinding])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"UnprocessedFindings"
Either String (Maybe [BatchUpdateFindingsUnprocessedFinding])
-> [BatchUpdateFindingsUnprocessedFinding]
-> Either String [BatchUpdateFindingsUnprocessedFinding]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [BatchUpdateFindingsUnprocessedFinding]
forall a. Monoid a => a
Prelude.mempty
)
)
instance Prelude.Hashable BatchUpdateFindings
instance Prelude.NFData BatchUpdateFindings
instance Core.ToHeaders BatchUpdateFindings where
toHeaders :: BatchUpdateFindings -> ResponseHeaders
toHeaders =
ResponseHeaders -> BatchUpdateFindings -> 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.ToJSON BatchUpdateFindings where
toJSON :: BatchUpdateFindings -> Value
toJSON BatchUpdateFindings' {[AwsSecurityFindingIdentifier]
Maybe Natural
Maybe [Text]
Maybe [RelatedFinding]
Maybe (HashMap Text Text)
Maybe NoteUpdate
Maybe SeverityUpdate
Maybe VerificationState
Maybe WorkflowUpdate
findingIdentifiers :: [AwsSecurityFindingIdentifier]
userDefinedFields :: Maybe (HashMap Text Text)
verificationState :: Maybe VerificationState
workflow :: Maybe WorkflowUpdate
confidence :: Maybe Natural
relatedFindings :: Maybe [RelatedFinding]
types :: Maybe [Text]
severity :: Maybe SeverityUpdate
note :: Maybe NoteUpdate
criticality :: Maybe Natural
$sel:findingIdentifiers:BatchUpdateFindings' :: BatchUpdateFindings -> [AwsSecurityFindingIdentifier]
$sel:userDefinedFields:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe (HashMap Text Text)
$sel:verificationState:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe VerificationState
$sel:workflow:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe WorkflowUpdate
$sel:confidence:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe Natural
$sel:relatedFindings:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe [RelatedFinding]
$sel:types:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe [Text]
$sel:severity:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe SeverityUpdate
$sel:note:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe NoteUpdate
$sel:criticality:BatchUpdateFindings' :: BatchUpdateFindings -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Criticality" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
criticality,
(Text
"Note" Text -> NoteUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NoteUpdate -> Pair) -> Maybe NoteUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NoteUpdate
note,
(Text
"Severity" Text -> SeverityUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SeverityUpdate -> Pair) -> Maybe SeverityUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SeverityUpdate
severity,
(Text
"Types" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
types,
(Text
"RelatedFindings" Text -> [RelatedFinding] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([RelatedFinding] -> Pair) -> Maybe [RelatedFinding] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [RelatedFinding]
relatedFindings,
(Text
"Confidence" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
confidence,
(Text
"Workflow" Text -> WorkflowUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (WorkflowUpdate -> Pair) -> Maybe WorkflowUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WorkflowUpdate
workflow,
(Text
"VerificationState" Text -> VerificationState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(VerificationState -> Pair)
-> Maybe VerificationState -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VerificationState
verificationState,
(Text
"UserDefinedFields" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
userDefinedFields,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"FindingIdentifiers" Text -> [AwsSecurityFindingIdentifier] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [AwsSecurityFindingIdentifier]
findingIdentifiers)
]
)
instance Core.ToPath BatchUpdateFindings where
toPath :: BatchUpdateFindings -> ByteString
toPath = ByteString -> BatchUpdateFindings -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/findings/batchupdate"
instance Core.ToQuery BatchUpdateFindings where
toQuery :: BatchUpdateFindings -> QueryString
toQuery = QueryString -> BatchUpdateFindings -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data BatchUpdateFindingsResponse = BatchUpdateFindingsResponse'
{
BatchUpdateFindingsResponse -> Int
httpStatus :: Prelude.Int,
BatchUpdateFindingsResponse -> [AwsSecurityFindingIdentifier]
processedFindings :: [AwsSecurityFindingIdentifier],
BatchUpdateFindingsResponse
-> [BatchUpdateFindingsUnprocessedFinding]
unprocessedFindings :: [BatchUpdateFindingsUnprocessedFinding]
}
deriving (BatchUpdateFindingsResponse -> BatchUpdateFindingsResponse -> Bool
(BatchUpdateFindingsResponse
-> BatchUpdateFindingsResponse -> Bool)
-> (BatchUpdateFindingsResponse
-> BatchUpdateFindingsResponse -> Bool)
-> Eq BatchUpdateFindingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpdateFindingsResponse -> BatchUpdateFindingsResponse -> Bool
$c/= :: BatchUpdateFindingsResponse -> BatchUpdateFindingsResponse -> Bool
== :: BatchUpdateFindingsResponse -> BatchUpdateFindingsResponse -> Bool
$c== :: BatchUpdateFindingsResponse -> BatchUpdateFindingsResponse -> Bool
Prelude.Eq, ReadPrec [BatchUpdateFindingsResponse]
ReadPrec BatchUpdateFindingsResponse
Int -> ReadS BatchUpdateFindingsResponse
ReadS [BatchUpdateFindingsResponse]
(Int -> ReadS BatchUpdateFindingsResponse)
-> ReadS [BatchUpdateFindingsResponse]
-> ReadPrec BatchUpdateFindingsResponse
-> ReadPrec [BatchUpdateFindingsResponse]
-> Read BatchUpdateFindingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchUpdateFindingsResponse]
$creadListPrec :: ReadPrec [BatchUpdateFindingsResponse]
readPrec :: ReadPrec BatchUpdateFindingsResponse
$creadPrec :: ReadPrec BatchUpdateFindingsResponse
readList :: ReadS [BatchUpdateFindingsResponse]
$creadList :: ReadS [BatchUpdateFindingsResponse]
readsPrec :: Int -> ReadS BatchUpdateFindingsResponse
$creadsPrec :: Int -> ReadS BatchUpdateFindingsResponse
Prelude.Read, Int -> BatchUpdateFindingsResponse -> ShowS
[BatchUpdateFindingsResponse] -> ShowS
BatchUpdateFindingsResponse -> String
(Int -> BatchUpdateFindingsResponse -> ShowS)
-> (BatchUpdateFindingsResponse -> String)
-> ([BatchUpdateFindingsResponse] -> ShowS)
-> Show BatchUpdateFindingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpdateFindingsResponse] -> ShowS
$cshowList :: [BatchUpdateFindingsResponse] -> ShowS
show :: BatchUpdateFindingsResponse -> String
$cshow :: BatchUpdateFindingsResponse -> String
showsPrec :: Int -> BatchUpdateFindingsResponse -> ShowS
$cshowsPrec :: Int -> BatchUpdateFindingsResponse -> ShowS
Prelude.Show, (forall x.
BatchUpdateFindingsResponse -> Rep BatchUpdateFindingsResponse x)
-> (forall x.
Rep BatchUpdateFindingsResponse x -> BatchUpdateFindingsResponse)
-> Generic BatchUpdateFindingsResponse
forall x.
Rep BatchUpdateFindingsResponse x -> BatchUpdateFindingsResponse
forall x.
BatchUpdateFindingsResponse -> Rep BatchUpdateFindingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchUpdateFindingsResponse x -> BatchUpdateFindingsResponse
$cfrom :: forall x.
BatchUpdateFindingsResponse -> Rep BatchUpdateFindingsResponse x
Prelude.Generic)
newBatchUpdateFindingsResponse ::
Prelude.Int ->
BatchUpdateFindingsResponse
newBatchUpdateFindingsResponse :: Int -> BatchUpdateFindingsResponse
newBatchUpdateFindingsResponse Int
pHttpStatus_ =
BatchUpdateFindingsResponse' :: Int
-> [AwsSecurityFindingIdentifier]
-> [BatchUpdateFindingsUnprocessedFinding]
-> BatchUpdateFindingsResponse
BatchUpdateFindingsResponse'
{ $sel:httpStatus:BatchUpdateFindingsResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:processedFindings:BatchUpdateFindingsResponse' :: [AwsSecurityFindingIdentifier]
processedFindings = [AwsSecurityFindingIdentifier]
forall a. Monoid a => a
Prelude.mempty,
$sel:unprocessedFindings:BatchUpdateFindingsResponse' :: [BatchUpdateFindingsUnprocessedFinding]
unprocessedFindings = [BatchUpdateFindingsUnprocessedFinding]
forall a. Monoid a => a
Prelude.mempty
}
batchUpdateFindingsResponse_httpStatus :: Lens.Lens' BatchUpdateFindingsResponse Prelude.Int
batchUpdateFindingsResponse_httpStatus :: (Int -> f Int)
-> BatchUpdateFindingsResponse -> f BatchUpdateFindingsResponse
batchUpdateFindingsResponse_httpStatus = (BatchUpdateFindingsResponse -> Int)
-> (BatchUpdateFindingsResponse
-> Int -> BatchUpdateFindingsResponse)
-> Lens
BatchUpdateFindingsResponse BatchUpdateFindingsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:BatchUpdateFindingsResponse' :: BatchUpdateFindingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: BatchUpdateFindingsResponse
s@BatchUpdateFindingsResponse' {} Int
a -> BatchUpdateFindingsResponse
s {$sel:httpStatus:BatchUpdateFindingsResponse' :: Int
httpStatus = Int
a} :: BatchUpdateFindingsResponse)
batchUpdateFindingsResponse_processedFindings :: Lens.Lens' BatchUpdateFindingsResponse [AwsSecurityFindingIdentifier]
batchUpdateFindingsResponse_processedFindings :: ([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> BatchUpdateFindingsResponse -> f BatchUpdateFindingsResponse
batchUpdateFindingsResponse_processedFindings = (BatchUpdateFindingsResponse -> [AwsSecurityFindingIdentifier])
-> (BatchUpdateFindingsResponse
-> [AwsSecurityFindingIdentifier] -> BatchUpdateFindingsResponse)
-> Lens
BatchUpdateFindingsResponse
BatchUpdateFindingsResponse
[AwsSecurityFindingIdentifier]
[AwsSecurityFindingIdentifier]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindingsResponse' {[AwsSecurityFindingIdentifier]
processedFindings :: [AwsSecurityFindingIdentifier]
$sel:processedFindings:BatchUpdateFindingsResponse' :: BatchUpdateFindingsResponse -> [AwsSecurityFindingIdentifier]
processedFindings} -> [AwsSecurityFindingIdentifier]
processedFindings) (\s :: BatchUpdateFindingsResponse
s@BatchUpdateFindingsResponse' {} [AwsSecurityFindingIdentifier]
a -> BatchUpdateFindingsResponse
s {$sel:processedFindings:BatchUpdateFindingsResponse' :: [AwsSecurityFindingIdentifier]
processedFindings = [AwsSecurityFindingIdentifier]
a} :: BatchUpdateFindingsResponse) (([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> BatchUpdateFindingsResponse -> f BatchUpdateFindingsResponse)
-> (([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> [AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> ([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> BatchUpdateFindingsResponse
-> f BatchUpdateFindingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier])
-> [AwsSecurityFindingIdentifier]
-> f [AwsSecurityFindingIdentifier]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchUpdateFindingsResponse_unprocessedFindings :: Lens.Lens' BatchUpdateFindingsResponse [BatchUpdateFindingsUnprocessedFinding]
batchUpdateFindingsResponse_unprocessedFindings :: ([BatchUpdateFindingsUnprocessedFinding]
-> f [BatchUpdateFindingsUnprocessedFinding])
-> BatchUpdateFindingsResponse -> f BatchUpdateFindingsResponse
batchUpdateFindingsResponse_unprocessedFindings = (BatchUpdateFindingsResponse
-> [BatchUpdateFindingsUnprocessedFinding])
-> (BatchUpdateFindingsResponse
-> [BatchUpdateFindingsUnprocessedFinding]
-> BatchUpdateFindingsResponse)
-> Lens
BatchUpdateFindingsResponse
BatchUpdateFindingsResponse
[BatchUpdateFindingsUnprocessedFinding]
[BatchUpdateFindingsUnprocessedFinding]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdateFindingsResponse' {[BatchUpdateFindingsUnprocessedFinding]
unprocessedFindings :: [BatchUpdateFindingsUnprocessedFinding]
$sel:unprocessedFindings:BatchUpdateFindingsResponse' :: BatchUpdateFindingsResponse
-> [BatchUpdateFindingsUnprocessedFinding]
unprocessedFindings} -> [BatchUpdateFindingsUnprocessedFinding]
unprocessedFindings) (\s :: BatchUpdateFindingsResponse
s@BatchUpdateFindingsResponse' {} [BatchUpdateFindingsUnprocessedFinding]
a -> BatchUpdateFindingsResponse
s {$sel:unprocessedFindings:BatchUpdateFindingsResponse' :: [BatchUpdateFindingsUnprocessedFinding]
unprocessedFindings = [BatchUpdateFindingsUnprocessedFinding]
a} :: BatchUpdateFindingsResponse) (([BatchUpdateFindingsUnprocessedFinding]
-> f [BatchUpdateFindingsUnprocessedFinding])
-> BatchUpdateFindingsResponse -> f BatchUpdateFindingsResponse)
-> (([BatchUpdateFindingsUnprocessedFinding]
-> f [BatchUpdateFindingsUnprocessedFinding])
-> [BatchUpdateFindingsUnprocessedFinding]
-> f [BatchUpdateFindingsUnprocessedFinding])
-> ([BatchUpdateFindingsUnprocessedFinding]
-> f [BatchUpdateFindingsUnprocessedFinding])
-> BatchUpdateFindingsResponse
-> f BatchUpdateFindingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BatchUpdateFindingsUnprocessedFinding]
-> f [BatchUpdateFindingsUnprocessedFinding])
-> [BatchUpdateFindingsUnprocessedFinding]
-> f [BatchUpdateFindingsUnprocessedFinding]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.NFData BatchUpdateFindingsResponse