{-# 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.GuardDuty.ListFilters
-- 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)
--
-- Returns a paginated list of the current filters.
--
-- This operation returns paginated results.
module Amazonka.GuardDuty.ListFilters
  ( -- * Creating a Request
    ListFilters (..),
    newListFilters,

    -- * Request Lenses
    listFilters_nextToken,
    listFilters_maxResults,
    listFilters_detectorId,

    -- * Destructuring the Response
    ListFiltersResponse (..),
    newListFiltersResponse,

    -- * Response Lenses
    listFiltersResponse_nextToken,
    listFiltersResponse_httpStatus,
    listFiltersResponse_filterNames,
  )
where

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

-- | /See:/ 'newListFilters' smart constructor.
data ListFilters = ListFilters'
  { -- | You can use this parameter when paginating results. Set the value of
    -- this parameter to null on your first call to the list action. For
    -- subsequent calls to the action, fill nextToken in the request with the
    -- value of NextToken from the previous response to continue listing data.
    ListFilters -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | You can use this parameter to indicate the maximum number of items that
    -- you want in the response. The default value is 50. The maximum value is
    -- 50.
    ListFilters -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The unique ID of the detector that the filter is associated with.
    ListFilters -> Text
detectorId :: Prelude.Text
  }
  deriving (ListFilters -> ListFilters -> Bool
(ListFilters -> ListFilters -> Bool)
-> (ListFilters -> ListFilters -> Bool) -> Eq ListFilters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFilters -> ListFilters -> Bool
$c/= :: ListFilters -> ListFilters -> Bool
== :: ListFilters -> ListFilters -> Bool
$c== :: ListFilters -> ListFilters -> Bool
Prelude.Eq, ReadPrec [ListFilters]
ReadPrec ListFilters
Int -> ReadS ListFilters
ReadS [ListFilters]
(Int -> ReadS ListFilters)
-> ReadS [ListFilters]
-> ReadPrec ListFilters
-> ReadPrec [ListFilters]
-> Read ListFilters
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFilters]
$creadListPrec :: ReadPrec [ListFilters]
readPrec :: ReadPrec ListFilters
$creadPrec :: ReadPrec ListFilters
readList :: ReadS [ListFilters]
$creadList :: ReadS [ListFilters]
readsPrec :: Int -> ReadS ListFilters
$creadsPrec :: Int -> ReadS ListFilters
Prelude.Read, Int -> ListFilters -> ShowS
[ListFilters] -> ShowS
ListFilters -> String
(Int -> ListFilters -> ShowS)
-> (ListFilters -> String)
-> ([ListFilters] -> ShowS)
-> Show ListFilters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFilters] -> ShowS
$cshowList :: [ListFilters] -> ShowS
show :: ListFilters -> String
$cshow :: ListFilters -> String
showsPrec :: Int -> ListFilters -> ShowS
$cshowsPrec :: Int -> ListFilters -> ShowS
Prelude.Show, (forall x. ListFilters -> Rep ListFilters x)
-> (forall x. Rep ListFilters x -> ListFilters)
-> Generic ListFilters
forall x. Rep ListFilters x -> ListFilters
forall x. ListFilters -> Rep ListFilters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFilters x -> ListFilters
$cfrom :: forall x. ListFilters -> Rep ListFilters x
Prelude.Generic)

-- |
-- Create a value of 'ListFilters' 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:
--
-- 'nextToken', 'listFilters_nextToken' - You can use this parameter when paginating results. Set the value of
-- this parameter to null on your first call to the list action. For
-- subsequent calls to the action, fill nextToken in the request with the
-- value of NextToken from the previous response to continue listing data.
--
-- 'maxResults', 'listFilters_maxResults' - You can use this parameter to indicate the maximum number of items that
-- you want in the response. The default value is 50. The maximum value is
-- 50.
--
-- 'detectorId', 'listFilters_detectorId' - The unique ID of the detector that the filter is associated with.
newListFilters ::
  -- | 'detectorId'
  Prelude.Text ->
  ListFilters
newListFilters :: Text -> ListFilters
newListFilters Text
pDetectorId_ =
  ListFilters' :: Maybe Text -> Maybe Natural -> Text -> ListFilters
ListFilters'
    { $sel:nextToken:ListFilters' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListFilters' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:detectorId:ListFilters' :: Text
detectorId = Text
pDetectorId_
    }

-- | You can use this parameter when paginating results. Set the value of
-- this parameter to null on your first call to the list action. For
-- subsequent calls to the action, fill nextToken in the request with the
-- value of NextToken from the previous response to continue listing data.
listFilters_nextToken :: Lens.Lens' ListFilters (Prelude.Maybe Prelude.Text)
listFilters_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListFilters -> f ListFilters
listFilters_nextToken = (ListFilters -> Maybe Text)
-> (ListFilters -> Maybe Text -> ListFilters)
-> Lens ListFilters ListFilters (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFilters' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFilters' :: ListFilters -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFilters
s@ListFilters' {} Maybe Text
a -> ListFilters
s {$sel:nextToken:ListFilters' :: Maybe Text
nextToken = Maybe Text
a} :: ListFilters)

-- | You can use this parameter to indicate the maximum number of items that
-- you want in the response. The default value is 50. The maximum value is
-- 50.
listFilters_maxResults :: Lens.Lens' ListFilters (Prelude.Maybe Prelude.Natural)
listFilters_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListFilters -> f ListFilters
listFilters_maxResults = (ListFilters -> Maybe Natural)
-> (ListFilters -> Maybe Natural -> ListFilters)
-> Lens ListFilters ListFilters (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFilters' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListFilters' :: ListFilters -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListFilters
s@ListFilters' {} Maybe Natural
a -> ListFilters
s {$sel:maxResults:ListFilters' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListFilters)

-- | The unique ID of the detector that the filter is associated with.
listFilters_detectorId :: Lens.Lens' ListFilters Prelude.Text
listFilters_detectorId :: (Text -> f Text) -> ListFilters -> f ListFilters
listFilters_detectorId = (ListFilters -> Text)
-> (ListFilters -> Text -> ListFilters)
-> Lens ListFilters ListFilters Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFilters' {Text
detectorId :: Text
$sel:detectorId:ListFilters' :: ListFilters -> Text
detectorId} -> Text
detectorId) (\s :: ListFilters
s@ListFilters' {} Text
a -> ListFilters
s {$sel:detectorId:ListFilters' :: Text
detectorId = Text
a} :: ListFilters)

instance Core.AWSPager ListFilters where
  page :: ListFilters -> AWSResponse ListFilters -> Maybe ListFilters
page ListFilters
rq AWSResponse ListFilters
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListFilters
ListFiltersResponse
rs
            ListFiltersResponse
-> Getting (First Text) ListFiltersResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListFiltersResponse -> Const (First Text) ListFiltersResponse
Lens' ListFiltersResponse (Maybe Text)
listFiltersResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListFiltersResponse -> Const (First Text) ListFiltersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListFiltersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListFilters
forall a. Maybe a
Prelude.Nothing
    | [Text] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListFilters
ListFiltersResponse
rs ListFiltersResponse
-> Getting [Text] ListFiltersResponse [Text] -> [Text]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [Text] ListFiltersResponse [Text]
Lens' ListFiltersResponse [Text]
listFiltersResponse_filterNames) =
      Maybe ListFilters
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListFilters -> Maybe ListFilters
forall a. a -> Maybe a
Prelude.Just (ListFilters -> Maybe ListFilters)
-> ListFilters -> Maybe ListFilters
forall a b. (a -> b) -> a -> b
Prelude.$
        ListFilters
rq
          ListFilters -> (ListFilters -> ListFilters) -> ListFilters
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListFilters -> Identity ListFilters
Lens ListFilters ListFilters (Maybe Text) (Maybe Text)
listFilters_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListFilters -> Identity ListFilters)
-> Maybe Text -> ListFilters -> ListFilters
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListFilters
ListFiltersResponse
rs
          ListFiltersResponse
-> Getting (First Text) ListFiltersResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListFiltersResponse -> Const (First Text) ListFiltersResponse
Lens' ListFiltersResponse (Maybe Text)
listFiltersResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListFiltersResponse -> Const (First Text) ListFiltersResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListFiltersResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListFilters where
  type AWSResponse ListFilters = ListFiltersResponse
  request :: ListFilters -> Request ListFilters
request = Service -> ListFilters -> Request ListFilters
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListFilters
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListFilters)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListFilters))
-> Logger
-> Service
-> Proxy ListFilters
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListFilters)))
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 -> Int -> [Text] -> ListFiltersResponse
ListFiltersResponse'
            (Maybe Text -> Int -> [Text] -> ListFiltersResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [Text] -> ListFiltersResponse)
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
"nextToken")
            Either String (Int -> [Text] -> ListFiltersResponse)
-> Either String Int
-> Either String ([Text] -> ListFiltersResponse)
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))
            Either String ([Text] -> ListFiltersResponse)
-> Either String [Text] -> Either String ListFiltersResponse
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
"filterNames" Either String (Maybe [Text]) -> [Text] -> Either String [Text]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Text]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListFilters

instance Prelude.NFData ListFilters

instance Core.ToHeaders ListFilters where
  toHeaders :: ListFilters -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListFilters -> 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 ListFilters where
  toPath :: ListFilters -> ByteString
toPath ListFilters' {Maybe Natural
Maybe Text
Text
detectorId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:detectorId:ListFilters' :: ListFilters -> Text
$sel:maxResults:ListFilters' :: ListFilters -> Maybe Natural
$sel:nextToken:ListFilters' :: ListFilters -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/detector/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
detectorId, ByteString
"/filter"]

instance Core.ToQuery ListFilters where
  toQuery :: ListFilters -> QueryString
toQuery ListFilters' {Maybe Natural
Maybe Text
Text
detectorId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:detectorId:ListFilters' :: ListFilters -> Text
$sel:maxResults:ListFilters' :: ListFilters -> Maybe Natural
$sel:nextToken:ListFilters' :: ListFilters -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListFiltersResponse' smart constructor.
data ListFiltersResponse = ListFiltersResponse'
  { -- | The pagination parameter to be used on the next list operation to
    -- retrieve more items.
    ListFiltersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListFiltersResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of filter names.
    ListFiltersResponse -> [Text]
filterNames :: [Prelude.Text]
  }
  deriving (ListFiltersResponse -> ListFiltersResponse -> Bool
(ListFiltersResponse -> ListFiltersResponse -> Bool)
-> (ListFiltersResponse -> ListFiltersResponse -> Bool)
-> Eq ListFiltersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListFiltersResponse -> ListFiltersResponse -> Bool
$c/= :: ListFiltersResponse -> ListFiltersResponse -> Bool
== :: ListFiltersResponse -> ListFiltersResponse -> Bool
$c== :: ListFiltersResponse -> ListFiltersResponse -> Bool
Prelude.Eq, ReadPrec [ListFiltersResponse]
ReadPrec ListFiltersResponse
Int -> ReadS ListFiltersResponse
ReadS [ListFiltersResponse]
(Int -> ReadS ListFiltersResponse)
-> ReadS [ListFiltersResponse]
-> ReadPrec ListFiltersResponse
-> ReadPrec [ListFiltersResponse]
-> Read ListFiltersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListFiltersResponse]
$creadListPrec :: ReadPrec [ListFiltersResponse]
readPrec :: ReadPrec ListFiltersResponse
$creadPrec :: ReadPrec ListFiltersResponse
readList :: ReadS [ListFiltersResponse]
$creadList :: ReadS [ListFiltersResponse]
readsPrec :: Int -> ReadS ListFiltersResponse
$creadsPrec :: Int -> ReadS ListFiltersResponse
Prelude.Read, Int -> ListFiltersResponse -> ShowS
[ListFiltersResponse] -> ShowS
ListFiltersResponse -> String
(Int -> ListFiltersResponse -> ShowS)
-> (ListFiltersResponse -> String)
-> ([ListFiltersResponse] -> ShowS)
-> Show ListFiltersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListFiltersResponse] -> ShowS
$cshowList :: [ListFiltersResponse] -> ShowS
show :: ListFiltersResponse -> String
$cshow :: ListFiltersResponse -> String
showsPrec :: Int -> ListFiltersResponse -> ShowS
$cshowsPrec :: Int -> ListFiltersResponse -> ShowS
Prelude.Show, (forall x. ListFiltersResponse -> Rep ListFiltersResponse x)
-> (forall x. Rep ListFiltersResponse x -> ListFiltersResponse)
-> Generic ListFiltersResponse
forall x. Rep ListFiltersResponse x -> ListFiltersResponse
forall x. ListFiltersResponse -> Rep ListFiltersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListFiltersResponse x -> ListFiltersResponse
$cfrom :: forall x. ListFiltersResponse -> Rep ListFiltersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListFiltersResponse' 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:
--
-- 'nextToken', 'listFiltersResponse_nextToken' - The pagination parameter to be used on the next list operation to
-- retrieve more items.
--
-- 'httpStatus', 'listFiltersResponse_httpStatus' - The response's http status code.
--
-- 'filterNames', 'listFiltersResponse_filterNames' - A list of filter names.
newListFiltersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListFiltersResponse
newListFiltersResponse :: Int -> ListFiltersResponse
newListFiltersResponse Int
pHttpStatus_ =
  ListFiltersResponse' :: Maybe Text -> Int -> [Text] -> ListFiltersResponse
ListFiltersResponse'
    { $sel:nextToken:ListFiltersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListFiltersResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:filterNames:ListFiltersResponse' :: [Text]
filterNames = [Text]
forall a. Monoid a => a
Prelude.mempty
    }

-- | The pagination parameter to be used on the next list operation to
-- retrieve more items.
listFiltersResponse_nextToken :: Lens.Lens' ListFiltersResponse (Prelude.Maybe Prelude.Text)
listFiltersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListFiltersResponse -> f ListFiltersResponse
listFiltersResponse_nextToken = (ListFiltersResponse -> Maybe Text)
-> (ListFiltersResponse -> Maybe Text -> ListFiltersResponse)
-> Lens' ListFiltersResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFiltersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListFiltersResponse' :: ListFiltersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListFiltersResponse
s@ListFiltersResponse' {} Maybe Text
a -> ListFiltersResponse
s {$sel:nextToken:ListFiltersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListFiltersResponse)

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

-- | A list of filter names.
listFiltersResponse_filterNames :: Lens.Lens' ListFiltersResponse [Prelude.Text]
listFiltersResponse_filterNames :: ([Text] -> f [Text])
-> ListFiltersResponse -> f ListFiltersResponse
listFiltersResponse_filterNames = (ListFiltersResponse -> [Text])
-> (ListFiltersResponse -> [Text] -> ListFiltersResponse)
-> Lens' ListFiltersResponse [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListFiltersResponse' {[Text]
filterNames :: [Text]
$sel:filterNames:ListFiltersResponse' :: ListFiltersResponse -> [Text]
filterNames} -> [Text]
filterNames) (\s :: ListFiltersResponse
s@ListFiltersResponse' {} [Text]
a -> ListFiltersResponse
s {$sel:filterNames:ListFiltersResponse' :: [Text]
filterNames = [Text]
a} :: ListFiltersResponse) (([Text] -> f [Text])
 -> ListFiltersResponse -> f ListFiltersResponse)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> ListFiltersResponse
-> f ListFiltersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListFiltersResponse