{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MacieV2.GetFindingsFilter
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the criteria and other settings for a findings filter.
module Amazonka.MacieV2.GetFindingsFilter
  ( -- * Creating a Request
    GetFindingsFilter (..),
    newGetFindingsFilter,

    -- * Request Lenses
    getFindingsFilter_id,

    -- * Destructuring the Response
    GetFindingsFilterResponse (..),
    newGetFindingsFilterResponse,

    -- * Response Lenses
    getFindingsFilterResponse_arn,
    getFindingsFilterResponse_findingCriteria,
    getFindingsFilterResponse_action,
    getFindingsFilterResponse_name,
    getFindingsFilterResponse_id,
    getFindingsFilterResponse_description,
    getFindingsFilterResponse_tags,
    getFindingsFilterResponse_position,
    getFindingsFilterResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MacieV2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetFindingsFilter' smart constructor.
data GetFindingsFilter = GetFindingsFilter'
  { -- | The unique identifier for the Amazon Macie resource or account that the
    -- request applies to.
    GetFindingsFilter -> Text
id :: Prelude.Text
  }
  deriving (GetFindingsFilter -> GetFindingsFilter -> Bool
(GetFindingsFilter -> GetFindingsFilter -> Bool)
-> (GetFindingsFilter -> GetFindingsFilter -> Bool)
-> Eq GetFindingsFilter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFindingsFilter -> GetFindingsFilter -> Bool
$c/= :: GetFindingsFilter -> GetFindingsFilter -> Bool
== :: GetFindingsFilter -> GetFindingsFilter -> Bool
$c== :: GetFindingsFilter -> GetFindingsFilter -> Bool
Prelude.Eq, ReadPrec [GetFindingsFilter]
ReadPrec GetFindingsFilter
Int -> ReadS GetFindingsFilter
ReadS [GetFindingsFilter]
(Int -> ReadS GetFindingsFilter)
-> ReadS [GetFindingsFilter]
-> ReadPrec GetFindingsFilter
-> ReadPrec [GetFindingsFilter]
-> Read GetFindingsFilter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFindingsFilter]
$creadListPrec :: ReadPrec [GetFindingsFilter]
readPrec :: ReadPrec GetFindingsFilter
$creadPrec :: ReadPrec GetFindingsFilter
readList :: ReadS [GetFindingsFilter]
$creadList :: ReadS [GetFindingsFilter]
readsPrec :: Int -> ReadS GetFindingsFilter
$creadsPrec :: Int -> ReadS GetFindingsFilter
Prelude.Read, Int -> GetFindingsFilter -> ShowS
[GetFindingsFilter] -> ShowS
GetFindingsFilter -> String
(Int -> GetFindingsFilter -> ShowS)
-> (GetFindingsFilter -> String)
-> ([GetFindingsFilter] -> ShowS)
-> Show GetFindingsFilter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFindingsFilter] -> ShowS
$cshowList :: [GetFindingsFilter] -> ShowS
show :: GetFindingsFilter -> String
$cshow :: GetFindingsFilter -> String
showsPrec :: Int -> GetFindingsFilter -> ShowS
$cshowsPrec :: Int -> GetFindingsFilter -> ShowS
Prelude.Show, (forall x. GetFindingsFilter -> Rep GetFindingsFilter x)
-> (forall x. Rep GetFindingsFilter x -> GetFindingsFilter)
-> Generic GetFindingsFilter
forall x. Rep GetFindingsFilter x -> GetFindingsFilter
forall x. GetFindingsFilter -> Rep GetFindingsFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetFindingsFilter x -> GetFindingsFilter
$cfrom :: forall x. GetFindingsFilter -> Rep GetFindingsFilter x
Prelude.Generic)

-- |
-- Create a value of 'GetFindingsFilter' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'id', 'getFindingsFilter_id' - The unique identifier for the Amazon Macie resource or account that the
-- request applies to.
newGetFindingsFilter ::
  -- | 'id'
  Prelude.Text ->
  GetFindingsFilter
newGetFindingsFilter :: Text -> GetFindingsFilter
newGetFindingsFilter Text
pId_ =
  GetFindingsFilter' :: Text -> GetFindingsFilter
GetFindingsFilter' {$sel:id:GetFindingsFilter' :: Text
id = Text
pId_}

-- | The unique identifier for the Amazon Macie resource or account that the
-- request applies to.
getFindingsFilter_id :: Lens.Lens' GetFindingsFilter Prelude.Text
getFindingsFilter_id :: (Text -> f Text) -> GetFindingsFilter -> f GetFindingsFilter
getFindingsFilter_id = (GetFindingsFilter -> Text)
-> (GetFindingsFilter -> Text -> GetFindingsFilter)
-> Lens GetFindingsFilter GetFindingsFilter Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsFilter' {Text
id :: Text
$sel:id:GetFindingsFilter' :: GetFindingsFilter -> Text
id} -> Text
id) (\s :: GetFindingsFilter
s@GetFindingsFilter' {} Text
a -> GetFindingsFilter
s {$sel:id:GetFindingsFilter' :: Text
id = Text
a} :: GetFindingsFilter)

instance Core.AWSRequest GetFindingsFilter where
  type
    AWSResponse GetFindingsFilter =
      GetFindingsFilterResponse
  request :: GetFindingsFilter -> Request GetFindingsFilter
request = Service -> GetFindingsFilter -> Request GetFindingsFilter
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetFindingsFilter
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetFindingsFilter)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetFindingsFilter))
-> Logger
-> Service
-> Proxy GetFindingsFilter
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetFindingsFilter)))
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 ->
          Maybe Text
-> Maybe FindingCriteria
-> Maybe FindingsFilterAction
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Int
-> GetFindingsFilterResponse
GetFindingsFilterResponse'
            (Maybe Text
 -> Maybe FindingCriteria
 -> Maybe FindingsFilterAction
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Int
 -> Int
 -> GetFindingsFilterResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe FindingCriteria
      -> Maybe FindingsFilterAction
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Int
      -> Int
      -> GetFindingsFilterResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"arn")
            Either
  String
  (Maybe FindingCriteria
   -> Maybe FindingsFilterAction
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Int
   -> Int
   -> GetFindingsFilterResponse)
-> Either String (Maybe FindingCriteria)
-> Either
     String
     (Maybe FindingsFilterAction
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Int
      -> Int
      -> GetFindingsFilterResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe FindingCriteria)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"findingCriteria")
            Either
  String
  (Maybe FindingsFilterAction
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Int
   -> Int
   -> GetFindingsFilterResponse)
-> Either String (Maybe FindingsFilterAction)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Int
      -> Int
      -> GetFindingsFilterResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe FindingsFilterAction)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"action")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Int
   -> Int
   -> GetFindingsFilterResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Int
      -> Int
      -> GetFindingsFilterResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"name")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Int
   -> Int
   -> GetFindingsFilterResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Int
      -> Int
      -> GetFindingsFilterResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"id")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Int
   -> Int
   -> GetFindingsFilterResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Maybe Int -> Int -> GetFindingsFilterResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"description")
            Either
  String
  (Maybe (HashMap Text Text)
   -> Maybe Int -> Int -> GetFindingsFilterResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Maybe Int -> Int -> GetFindingsFilterResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Int -> Int -> GetFindingsFilterResponse)
-> Either String (Maybe Int)
-> Either String (Int -> GetFindingsFilterResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"position")
            Either String (Int -> GetFindingsFilterResponse)
-> Either String Int -> Either String GetFindingsFilterResponse
forall (f :: * -> *) a b. Applicative f => 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 GetFindingsFilter

instance Prelude.NFData GetFindingsFilter

instance Core.ToHeaders GetFindingsFilter where
  toHeaders :: GetFindingsFilter -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetFindingsFilter -> 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 GetFindingsFilter where
  toPath :: GetFindingsFilter -> ByteString
toPath GetFindingsFilter' {Text
id :: Text
$sel:id:GetFindingsFilter' :: GetFindingsFilter -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/findingsfilters/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id]

instance Core.ToQuery GetFindingsFilter where
  toQuery :: GetFindingsFilter -> QueryString
toQuery = QueryString -> GetFindingsFilter -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetFindingsFilterResponse' smart constructor.
data GetFindingsFilterResponse = GetFindingsFilterResponse'
  { -- | The Amazon Resource Name (ARN) of the filter.
    GetFindingsFilterResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The criteria that\'s used to filter findings.
    GetFindingsFilterResponse -> Maybe FindingCriteria
findingCriteria :: Prelude.Maybe FindingCriteria,
    -- | The action that\'s performed on findings that meet the filter criteria
    -- (findingCriteria). Possible values are: ARCHIVE, suppress (automatically
    -- archive) the findings; and, NOOP, don\'t perform any action on the
    -- findings.
    GetFindingsFilterResponse -> Maybe FindingsFilterAction
action :: Prelude.Maybe FindingsFilterAction,
    -- | The custom name of the filter.
    GetFindingsFilterResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The unique identifier for the filter.
    GetFindingsFilterResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The custom description of the filter.
    GetFindingsFilterResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | A map of key-value pairs that identifies the tags (keys and values) that
    -- are associated with the filter.
    GetFindingsFilterResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The position of the filter in the list of saved filters on the Amazon
    -- Macie console. This value also determines the order in which the filter
    -- is applied to findings, relative to other filters that are also applied
    -- to the findings.
    GetFindingsFilterResponse -> Maybe Int
position :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    GetFindingsFilterResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetFindingsFilterResponse -> GetFindingsFilterResponse -> Bool
(GetFindingsFilterResponse -> GetFindingsFilterResponse -> Bool)
-> (GetFindingsFilterResponse -> GetFindingsFilterResponse -> Bool)
-> Eq GetFindingsFilterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFindingsFilterResponse -> GetFindingsFilterResponse -> Bool
$c/= :: GetFindingsFilterResponse -> GetFindingsFilterResponse -> Bool
== :: GetFindingsFilterResponse -> GetFindingsFilterResponse -> Bool
$c== :: GetFindingsFilterResponse -> GetFindingsFilterResponse -> Bool
Prelude.Eq, ReadPrec [GetFindingsFilterResponse]
ReadPrec GetFindingsFilterResponse
Int -> ReadS GetFindingsFilterResponse
ReadS [GetFindingsFilterResponse]
(Int -> ReadS GetFindingsFilterResponse)
-> ReadS [GetFindingsFilterResponse]
-> ReadPrec GetFindingsFilterResponse
-> ReadPrec [GetFindingsFilterResponse]
-> Read GetFindingsFilterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFindingsFilterResponse]
$creadListPrec :: ReadPrec [GetFindingsFilterResponse]
readPrec :: ReadPrec GetFindingsFilterResponse
$creadPrec :: ReadPrec GetFindingsFilterResponse
readList :: ReadS [GetFindingsFilterResponse]
$creadList :: ReadS [GetFindingsFilterResponse]
readsPrec :: Int -> ReadS GetFindingsFilterResponse
$creadsPrec :: Int -> ReadS GetFindingsFilterResponse
Prelude.Read, Int -> GetFindingsFilterResponse -> ShowS
[GetFindingsFilterResponse] -> ShowS
GetFindingsFilterResponse -> String
(Int -> GetFindingsFilterResponse -> ShowS)
-> (GetFindingsFilterResponse -> String)
-> ([GetFindingsFilterResponse] -> ShowS)
-> Show GetFindingsFilterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFindingsFilterResponse] -> ShowS
$cshowList :: [GetFindingsFilterResponse] -> ShowS
show :: GetFindingsFilterResponse -> String
$cshow :: GetFindingsFilterResponse -> String
showsPrec :: Int -> GetFindingsFilterResponse -> ShowS
$cshowsPrec :: Int -> GetFindingsFilterResponse -> ShowS
Prelude.Show, (forall x.
 GetFindingsFilterResponse -> Rep GetFindingsFilterResponse x)
-> (forall x.
    Rep GetFindingsFilterResponse x -> GetFindingsFilterResponse)
-> Generic GetFindingsFilterResponse
forall x.
Rep GetFindingsFilterResponse x -> GetFindingsFilterResponse
forall x.
GetFindingsFilterResponse -> Rep GetFindingsFilterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFindingsFilterResponse x -> GetFindingsFilterResponse
$cfrom :: forall x.
GetFindingsFilterResponse -> Rep GetFindingsFilterResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetFindingsFilterResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'getFindingsFilterResponse_arn' - The Amazon Resource Name (ARN) of the filter.
--
-- 'findingCriteria', 'getFindingsFilterResponse_findingCriteria' - The criteria that\'s used to filter findings.
--
-- 'action', 'getFindingsFilterResponse_action' - The action that\'s performed on findings that meet the filter criteria
-- (findingCriteria). Possible values are: ARCHIVE, suppress (automatically
-- archive) the findings; and, NOOP, don\'t perform any action on the
-- findings.
--
-- 'name', 'getFindingsFilterResponse_name' - The custom name of the filter.
--
-- 'id', 'getFindingsFilterResponse_id' - The unique identifier for the filter.
--
-- 'description', 'getFindingsFilterResponse_description' - The custom description of the filter.
--
-- 'tags', 'getFindingsFilterResponse_tags' - A map of key-value pairs that identifies the tags (keys and values) that
-- are associated with the filter.
--
-- 'position', 'getFindingsFilterResponse_position' - The position of the filter in the list of saved filters on the Amazon
-- Macie console. This value also determines the order in which the filter
-- is applied to findings, relative to other filters that are also applied
-- to the findings.
--
-- 'httpStatus', 'getFindingsFilterResponse_httpStatus' - The response's http status code.
newGetFindingsFilterResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetFindingsFilterResponse
newGetFindingsFilterResponse :: Int -> GetFindingsFilterResponse
newGetFindingsFilterResponse Int
pHttpStatus_ =
  GetFindingsFilterResponse' :: Maybe Text
-> Maybe FindingCriteria
-> Maybe FindingsFilterAction
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Int
-> Int
-> GetFindingsFilterResponse
GetFindingsFilterResponse'
    { $sel:arn:GetFindingsFilterResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:findingCriteria:GetFindingsFilterResponse' :: Maybe FindingCriteria
findingCriteria = Maybe FindingCriteria
forall a. Maybe a
Prelude.Nothing,
      $sel:action:GetFindingsFilterResponse' :: Maybe FindingsFilterAction
action = Maybe FindingsFilterAction
forall a. Maybe a
Prelude.Nothing,
      $sel:name:GetFindingsFilterResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetFindingsFilterResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetFindingsFilterResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetFindingsFilterResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:position:GetFindingsFilterResponse' :: Maybe Int
position = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetFindingsFilterResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the filter.
getFindingsFilterResponse_arn :: Lens.Lens' GetFindingsFilterResponse (Prelude.Maybe Prelude.Text)
getFindingsFilterResponse_arn :: (Maybe Text -> f (Maybe Text))
-> GetFindingsFilterResponse -> f GetFindingsFilterResponse
getFindingsFilterResponse_arn = (GetFindingsFilterResponse -> Maybe Text)
-> (GetFindingsFilterResponse
    -> Maybe Text -> GetFindingsFilterResponse)
-> Lens
     GetFindingsFilterResponse
     GetFindingsFilterResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsFilterResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:GetFindingsFilterResponse' :: GetFindingsFilterResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: GetFindingsFilterResponse
s@GetFindingsFilterResponse' {} Maybe Text
a -> GetFindingsFilterResponse
s {$sel:arn:GetFindingsFilterResponse' :: Maybe Text
arn = Maybe Text
a} :: GetFindingsFilterResponse)

-- | The criteria that\'s used to filter findings.
getFindingsFilterResponse_findingCriteria :: Lens.Lens' GetFindingsFilterResponse (Prelude.Maybe FindingCriteria)
getFindingsFilterResponse_findingCriteria :: (Maybe FindingCriteria -> f (Maybe FindingCriteria))
-> GetFindingsFilterResponse -> f GetFindingsFilterResponse
getFindingsFilterResponse_findingCriteria = (GetFindingsFilterResponse -> Maybe FindingCriteria)
-> (GetFindingsFilterResponse
    -> Maybe FindingCriteria -> GetFindingsFilterResponse)
-> Lens
     GetFindingsFilterResponse
     GetFindingsFilterResponse
     (Maybe FindingCriteria)
     (Maybe FindingCriteria)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsFilterResponse' {Maybe FindingCriteria
findingCriteria :: Maybe FindingCriteria
$sel:findingCriteria:GetFindingsFilterResponse' :: GetFindingsFilterResponse -> Maybe FindingCriteria
findingCriteria} -> Maybe FindingCriteria
findingCriteria) (\s :: GetFindingsFilterResponse
s@GetFindingsFilterResponse' {} Maybe FindingCriteria
a -> GetFindingsFilterResponse
s {$sel:findingCriteria:GetFindingsFilterResponse' :: Maybe FindingCriteria
findingCriteria = Maybe FindingCriteria
a} :: GetFindingsFilterResponse)

-- | The action that\'s performed on findings that meet the filter criteria
-- (findingCriteria). Possible values are: ARCHIVE, suppress (automatically
-- archive) the findings; and, NOOP, don\'t perform any action on the
-- findings.
getFindingsFilterResponse_action :: Lens.Lens' GetFindingsFilterResponse (Prelude.Maybe FindingsFilterAction)
getFindingsFilterResponse_action :: (Maybe FindingsFilterAction -> f (Maybe FindingsFilterAction))
-> GetFindingsFilterResponse -> f GetFindingsFilterResponse
getFindingsFilterResponse_action = (GetFindingsFilterResponse -> Maybe FindingsFilterAction)
-> (GetFindingsFilterResponse
    -> Maybe FindingsFilterAction -> GetFindingsFilterResponse)
-> Lens
     GetFindingsFilterResponse
     GetFindingsFilterResponse
     (Maybe FindingsFilterAction)
     (Maybe FindingsFilterAction)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsFilterResponse' {Maybe FindingsFilterAction
action :: Maybe FindingsFilterAction
$sel:action:GetFindingsFilterResponse' :: GetFindingsFilterResponse -> Maybe FindingsFilterAction
action} -> Maybe FindingsFilterAction
action) (\s :: GetFindingsFilterResponse
s@GetFindingsFilterResponse' {} Maybe FindingsFilterAction
a -> GetFindingsFilterResponse
s {$sel:action:GetFindingsFilterResponse' :: Maybe FindingsFilterAction
action = Maybe FindingsFilterAction
a} :: GetFindingsFilterResponse)

-- | The custom name of the filter.
getFindingsFilterResponse_name :: Lens.Lens' GetFindingsFilterResponse (Prelude.Maybe Prelude.Text)
getFindingsFilterResponse_name :: (Maybe Text -> f (Maybe Text))
-> GetFindingsFilterResponse -> f GetFindingsFilterResponse
getFindingsFilterResponse_name = (GetFindingsFilterResponse -> Maybe Text)
-> (GetFindingsFilterResponse
    -> Maybe Text -> GetFindingsFilterResponse)
-> Lens
     GetFindingsFilterResponse
     GetFindingsFilterResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsFilterResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetFindingsFilterResponse' :: GetFindingsFilterResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetFindingsFilterResponse
s@GetFindingsFilterResponse' {} Maybe Text
a -> GetFindingsFilterResponse
s {$sel:name:GetFindingsFilterResponse' :: Maybe Text
name = Maybe Text
a} :: GetFindingsFilterResponse)

-- | The unique identifier for the filter.
getFindingsFilterResponse_id :: Lens.Lens' GetFindingsFilterResponse (Prelude.Maybe Prelude.Text)
getFindingsFilterResponse_id :: (Maybe Text -> f (Maybe Text))
-> GetFindingsFilterResponse -> f GetFindingsFilterResponse
getFindingsFilterResponse_id = (GetFindingsFilterResponse -> Maybe Text)
-> (GetFindingsFilterResponse
    -> Maybe Text -> GetFindingsFilterResponse)
-> Lens
     GetFindingsFilterResponse
     GetFindingsFilterResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsFilterResponse' {Maybe Text
id :: Maybe Text
$sel:id:GetFindingsFilterResponse' :: GetFindingsFilterResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GetFindingsFilterResponse
s@GetFindingsFilterResponse' {} Maybe Text
a -> GetFindingsFilterResponse
s {$sel:id:GetFindingsFilterResponse' :: Maybe Text
id = Maybe Text
a} :: GetFindingsFilterResponse)

-- | The custom description of the filter.
getFindingsFilterResponse_description :: Lens.Lens' GetFindingsFilterResponse (Prelude.Maybe Prelude.Text)
getFindingsFilterResponse_description :: (Maybe Text -> f (Maybe Text))
-> GetFindingsFilterResponse -> f GetFindingsFilterResponse
getFindingsFilterResponse_description = (GetFindingsFilterResponse -> Maybe Text)
-> (GetFindingsFilterResponse
    -> Maybe Text -> GetFindingsFilterResponse)
-> Lens
     GetFindingsFilterResponse
     GetFindingsFilterResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsFilterResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetFindingsFilterResponse' :: GetFindingsFilterResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetFindingsFilterResponse
s@GetFindingsFilterResponse' {} Maybe Text
a -> GetFindingsFilterResponse
s {$sel:description:GetFindingsFilterResponse' :: Maybe Text
description = Maybe Text
a} :: GetFindingsFilterResponse)

-- | A map of key-value pairs that identifies the tags (keys and values) that
-- are associated with the filter.
getFindingsFilterResponse_tags :: Lens.Lens' GetFindingsFilterResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getFindingsFilterResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetFindingsFilterResponse -> f GetFindingsFilterResponse
getFindingsFilterResponse_tags = (GetFindingsFilterResponse -> Maybe (HashMap Text Text))
-> (GetFindingsFilterResponse
    -> Maybe (HashMap Text Text) -> GetFindingsFilterResponse)
-> Lens
     GetFindingsFilterResponse
     GetFindingsFilterResponse
     (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 (\GetFindingsFilterResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetFindingsFilterResponse' :: GetFindingsFilterResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetFindingsFilterResponse
s@GetFindingsFilterResponse' {} Maybe (HashMap Text Text)
a -> GetFindingsFilterResponse
s {$sel:tags:GetFindingsFilterResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetFindingsFilterResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetFindingsFilterResponse -> f GetFindingsFilterResponse)
-> ((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)))
-> GetFindingsFilterResponse
-> f GetFindingsFilterResponse
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

-- | The position of the filter in the list of saved filters on the Amazon
-- Macie console. This value also determines the order in which the filter
-- is applied to findings, relative to other filters that are also applied
-- to the findings.
getFindingsFilterResponse_position :: Lens.Lens' GetFindingsFilterResponse (Prelude.Maybe Prelude.Int)
getFindingsFilterResponse_position :: (Maybe Int -> f (Maybe Int))
-> GetFindingsFilterResponse -> f GetFindingsFilterResponse
getFindingsFilterResponse_position = (GetFindingsFilterResponse -> Maybe Int)
-> (GetFindingsFilterResponse
    -> Maybe Int -> GetFindingsFilterResponse)
-> Lens
     GetFindingsFilterResponse
     GetFindingsFilterResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsFilterResponse' {Maybe Int
position :: Maybe Int
$sel:position:GetFindingsFilterResponse' :: GetFindingsFilterResponse -> Maybe Int
position} -> Maybe Int
position) (\s :: GetFindingsFilterResponse
s@GetFindingsFilterResponse' {} Maybe Int
a -> GetFindingsFilterResponse
s {$sel:position:GetFindingsFilterResponse' :: Maybe Int
position = Maybe Int
a} :: GetFindingsFilterResponse)

-- | The response's http status code.
getFindingsFilterResponse_httpStatus :: Lens.Lens' GetFindingsFilterResponse Prelude.Int
getFindingsFilterResponse_httpStatus :: (Int -> f Int)
-> GetFindingsFilterResponse -> f GetFindingsFilterResponse
getFindingsFilterResponse_httpStatus = (GetFindingsFilterResponse -> Int)
-> (GetFindingsFilterResponse -> Int -> GetFindingsFilterResponse)
-> Lens GetFindingsFilterResponse GetFindingsFilterResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFindingsFilterResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetFindingsFilterResponse' :: GetFindingsFilterResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetFindingsFilterResponse
s@GetFindingsFilterResponse' {} Int
a -> GetFindingsFilterResponse
s {$sel:httpStatus:GetFindingsFilterResponse' :: Int
httpStatus = Int
a} :: GetFindingsFilterResponse)

instance Prelude.NFData GetFindingsFilterResponse