{-# 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.IoT.ListSecurityProfiles
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists the Device Defender security profiles you\'ve created. You can
-- filter security profiles by dimension or custom metric.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions ListSecurityProfiles>
-- action.
--
-- @dimensionName@ and @metricName@ cannot be used in the same request.
--
-- This operation returns paginated results.
module Amazonka.IoT.ListSecurityProfiles
  ( -- * Creating a Request
    ListSecurityProfiles (..),
    newListSecurityProfiles,

    -- * Request Lenses
    listSecurityProfiles_dimensionName,
    listSecurityProfiles_maxResults,
    listSecurityProfiles_metricName,
    listSecurityProfiles_nextToken,

    -- * Destructuring the Response
    ListSecurityProfilesResponse (..),
    newListSecurityProfilesResponse,

    -- * Response Lenses
    listSecurityProfilesResponse_nextToken,
    listSecurityProfilesResponse_securityProfileIdentifiers,
    listSecurityProfilesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoT.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListSecurityProfiles' smart constructor.
data ListSecurityProfiles = ListSecurityProfiles'
  { -- | A filter to limit results to the security profiles that use the defined
    -- dimension. Cannot be used with @metricName@
    ListSecurityProfiles -> Maybe Text
dimensionName :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return at one time.
    ListSecurityProfiles -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The name of the custom metric. Cannot be used with @dimensionName@.
    ListSecurityProfiles -> Maybe Text
metricName :: Prelude.Maybe Prelude.Text,
    -- | The token for the next set of results.
    ListSecurityProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListSecurityProfiles -> ListSecurityProfiles -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSecurityProfiles -> ListSecurityProfiles -> Bool
$c/= :: ListSecurityProfiles -> ListSecurityProfiles -> Bool
== :: ListSecurityProfiles -> ListSecurityProfiles -> Bool
$c== :: ListSecurityProfiles -> ListSecurityProfiles -> Bool
Prelude.Eq, ReadPrec [ListSecurityProfiles]
ReadPrec ListSecurityProfiles
Int -> ReadS ListSecurityProfiles
ReadS [ListSecurityProfiles]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSecurityProfiles]
$creadListPrec :: ReadPrec [ListSecurityProfiles]
readPrec :: ReadPrec ListSecurityProfiles
$creadPrec :: ReadPrec ListSecurityProfiles
readList :: ReadS [ListSecurityProfiles]
$creadList :: ReadS [ListSecurityProfiles]
readsPrec :: Int -> ReadS ListSecurityProfiles
$creadsPrec :: Int -> ReadS ListSecurityProfiles
Prelude.Read, Int -> ListSecurityProfiles -> ShowS
[ListSecurityProfiles] -> ShowS
ListSecurityProfiles -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSecurityProfiles] -> ShowS
$cshowList :: [ListSecurityProfiles] -> ShowS
show :: ListSecurityProfiles -> String
$cshow :: ListSecurityProfiles -> String
showsPrec :: Int -> ListSecurityProfiles -> ShowS
$cshowsPrec :: Int -> ListSecurityProfiles -> ShowS
Prelude.Show, forall x. Rep ListSecurityProfiles x -> ListSecurityProfiles
forall x. ListSecurityProfiles -> Rep ListSecurityProfiles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListSecurityProfiles x -> ListSecurityProfiles
$cfrom :: forall x. ListSecurityProfiles -> Rep ListSecurityProfiles x
Prelude.Generic)

-- |
-- Create a value of 'ListSecurityProfiles' 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:
--
-- 'dimensionName', 'listSecurityProfiles_dimensionName' - A filter to limit results to the security profiles that use the defined
-- dimension. Cannot be used with @metricName@
--
-- 'maxResults', 'listSecurityProfiles_maxResults' - The maximum number of results to return at one time.
--
-- 'metricName', 'listSecurityProfiles_metricName' - The name of the custom metric. Cannot be used with @dimensionName@.
--
-- 'nextToken', 'listSecurityProfiles_nextToken' - The token for the next set of results.
newListSecurityProfiles ::
  ListSecurityProfiles
newListSecurityProfiles :: ListSecurityProfiles
newListSecurityProfiles =
  ListSecurityProfiles'
    { $sel:dimensionName:ListSecurityProfiles' :: Maybe Text
dimensionName =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListSecurityProfiles' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:metricName:ListSecurityProfiles' :: Maybe Text
metricName = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListSecurityProfiles' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | A filter to limit results to the security profiles that use the defined
-- dimension. Cannot be used with @metricName@
listSecurityProfiles_dimensionName :: Lens.Lens' ListSecurityProfiles (Prelude.Maybe Prelude.Text)
listSecurityProfiles_dimensionName :: Lens' ListSecurityProfiles (Maybe Text)
listSecurityProfiles_dimensionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityProfiles' {Maybe Text
dimensionName :: Maybe Text
$sel:dimensionName:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Text
dimensionName} -> Maybe Text
dimensionName) (\s :: ListSecurityProfiles
s@ListSecurityProfiles' {} Maybe Text
a -> ListSecurityProfiles
s {$sel:dimensionName:ListSecurityProfiles' :: Maybe Text
dimensionName = Maybe Text
a} :: ListSecurityProfiles)

-- | The maximum number of results to return at one time.
listSecurityProfiles_maxResults :: Lens.Lens' ListSecurityProfiles (Prelude.Maybe Prelude.Natural)
listSecurityProfiles_maxResults :: Lens' ListSecurityProfiles (Maybe Natural)
listSecurityProfiles_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityProfiles' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListSecurityProfiles
s@ListSecurityProfiles' {} Maybe Natural
a -> ListSecurityProfiles
s {$sel:maxResults:ListSecurityProfiles' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListSecurityProfiles)

-- | The name of the custom metric. Cannot be used with @dimensionName@.
listSecurityProfiles_metricName :: Lens.Lens' ListSecurityProfiles (Prelude.Maybe Prelude.Text)
listSecurityProfiles_metricName :: Lens' ListSecurityProfiles (Maybe Text)
listSecurityProfiles_metricName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityProfiles' {Maybe Text
metricName :: Maybe Text
$sel:metricName:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Text
metricName} -> Maybe Text
metricName) (\s :: ListSecurityProfiles
s@ListSecurityProfiles' {} Maybe Text
a -> ListSecurityProfiles
s {$sel:metricName:ListSecurityProfiles' :: Maybe Text
metricName = Maybe Text
a} :: ListSecurityProfiles)

-- | The token for the next set of results.
listSecurityProfiles_nextToken :: Lens.Lens' ListSecurityProfiles (Prelude.Maybe Prelude.Text)
listSecurityProfiles_nextToken :: Lens' ListSecurityProfiles (Maybe Text)
listSecurityProfiles_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityProfiles' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSecurityProfiles
s@ListSecurityProfiles' {} Maybe Text
a -> ListSecurityProfiles
s {$sel:nextToken:ListSecurityProfiles' :: Maybe Text
nextToken = Maybe Text
a} :: ListSecurityProfiles)

instance Core.AWSPager ListSecurityProfiles where
  page :: ListSecurityProfiles
-> AWSResponse ListSecurityProfiles -> Maybe ListSecurityProfiles
page ListSecurityProfiles
rq AWSResponse ListSecurityProfiles
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSecurityProfiles
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSecurityProfilesResponse (Maybe Text)
listSecurityProfilesResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSecurityProfiles
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListSecurityProfilesResponse (Maybe [SecurityProfileIdentifier])
listSecurityProfilesResponse_securityProfileIdentifiers
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListSecurityProfiles
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListSecurityProfiles (Maybe Text)
listSecurityProfiles_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSecurityProfiles
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListSecurityProfilesResponse (Maybe Text)
listSecurityProfilesResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListSecurityProfiles where
  type
    AWSResponse ListSecurityProfiles =
      ListSecurityProfilesResponse
  request :: (Service -> Service)
-> ListSecurityProfiles -> Request ListSecurityProfiles
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListSecurityProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSecurityProfiles)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [SecurityProfileIdentifier]
-> Int
-> ListSecurityProfilesResponse
ListSecurityProfilesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"securityProfileIdentifiers"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => 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 ListSecurityProfiles where
  hashWithSalt :: Int -> ListSecurityProfiles -> Int
hashWithSalt Int
_salt ListSecurityProfiles' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
metricName :: Maybe Text
maxResults :: Maybe Natural
dimensionName :: Maybe Text
$sel:nextToken:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Text
$sel:metricName:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Text
$sel:maxResults:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Natural
$sel:dimensionName:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dimensionName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
metricName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken

instance Prelude.NFData ListSecurityProfiles where
  rnf :: ListSecurityProfiles -> ()
rnf ListSecurityProfiles' {Maybe Natural
Maybe Text
nextToken :: Maybe Text
metricName :: Maybe Text
maxResults :: Maybe Natural
dimensionName :: Maybe Text
$sel:nextToken:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Text
$sel:metricName:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Text
$sel:maxResults:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Natural
$sel:dimensionName:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
dimensionName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
metricName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken

instance Data.ToHeaders ListSecurityProfiles where
  toHeaders :: ListSecurityProfiles -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath ListSecurityProfiles where
  toPath :: ListSecurityProfiles -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/security-profiles"

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

-- | /See:/ 'newListSecurityProfilesResponse' smart constructor.
data ListSecurityProfilesResponse = ListSecurityProfilesResponse'
  { -- | A token that can be used to retrieve the next set of results, or @null@
    -- if there are no additional results.
    ListSecurityProfilesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of security profile identifiers (names and ARNs).
    ListSecurityProfilesResponse -> Maybe [SecurityProfileIdentifier]
securityProfileIdentifiers :: Prelude.Maybe [SecurityProfileIdentifier],
    -- | The response's http status code.
    ListSecurityProfilesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSecurityProfilesResponse
-> ListSecurityProfilesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListSecurityProfilesResponse
-> ListSecurityProfilesResponse -> Bool
$c/= :: ListSecurityProfilesResponse
-> ListSecurityProfilesResponse -> Bool
== :: ListSecurityProfilesResponse
-> ListSecurityProfilesResponse -> Bool
$c== :: ListSecurityProfilesResponse
-> ListSecurityProfilesResponse -> Bool
Prelude.Eq, ReadPrec [ListSecurityProfilesResponse]
ReadPrec ListSecurityProfilesResponse
Int -> ReadS ListSecurityProfilesResponse
ReadS [ListSecurityProfilesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListSecurityProfilesResponse]
$creadListPrec :: ReadPrec [ListSecurityProfilesResponse]
readPrec :: ReadPrec ListSecurityProfilesResponse
$creadPrec :: ReadPrec ListSecurityProfilesResponse
readList :: ReadS [ListSecurityProfilesResponse]
$creadList :: ReadS [ListSecurityProfilesResponse]
readsPrec :: Int -> ReadS ListSecurityProfilesResponse
$creadsPrec :: Int -> ReadS ListSecurityProfilesResponse
Prelude.Read, Int -> ListSecurityProfilesResponse -> ShowS
[ListSecurityProfilesResponse] -> ShowS
ListSecurityProfilesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListSecurityProfilesResponse] -> ShowS
$cshowList :: [ListSecurityProfilesResponse] -> ShowS
show :: ListSecurityProfilesResponse -> String
$cshow :: ListSecurityProfilesResponse -> String
showsPrec :: Int -> ListSecurityProfilesResponse -> ShowS
$cshowsPrec :: Int -> ListSecurityProfilesResponse -> ShowS
Prelude.Show, forall x.
Rep ListSecurityProfilesResponse x -> ListSecurityProfilesResponse
forall x.
ListSecurityProfilesResponse -> Rep ListSecurityProfilesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListSecurityProfilesResponse x -> ListSecurityProfilesResponse
$cfrom :: forall x.
ListSecurityProfilesResponse -> Rep ListSecurityProfilesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListSecurityProfilesResponse' 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', 'listSecurityProfilesResponse_nextToken' - A token that can be used to retrieve the next set of results, or @null@
-- if there are no additional results.
--
-- 'securityProfileIdentifiers', 'listSecurityProfilesResponse_securityProfileIdentifiers' - A list of security profile identifiers (names and ARNs).
--
-- 'httpStatus', 'listSecurityProfilesResponse_httpStatus' - The response's http status code.
newListSecurityProfilesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSecurityProfilesResponse
newListSecurityProfilesResponse :: Int -> ListSecurityProfilesResponse
newListSecurityProfilesResponse Int
pHttpStatus_ =
  ListSecurityProfilesResponse'
    { $sel:nextToken:ListSecurityProfilesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:securityProfileIdentifiers:ListSecurityProfilesResponse' :: Maybe [SecurityProfileIdentifier]
securityProfileIdentifiers = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSecurityProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A token that can be used to retrieve the next set of results, or @null@
-- if there are no additional results.
listSecurityProfilesResponse_nextToken :: Lens.Lens' ListSecurityProfilesResponse (Prelude.Maybe Prelude.Text)
listSecurityProfilesResponse_nextToken :: Lens' ListSecurityProfilesResponse (Maybe Text)
listSecurityProfilesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityProfilesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListSecurityProfilesResponse' :: ListSecurityProfilesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListSecurityProfilesResponse
s@ListSecurityProfilesResponse' {} Maybe Text
a -> ListSecurityProfilesResponse
s {$sel:nextToken:ListSecurityProfilesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListSecurityProfilesResponse)

-- | A list of security profile identifiers (names and ARNs).
listSecurityProfilesResponse_securityProfileIdentifiers :: Lens.Lens' ListSecurityProfilesResponse (Prelude.Maybe [SecurityProfileIdentifier])
listSecurityProfilesResponse_securityProfileIdentifiers :: Lens'
  ListSecurityProfilesResponse (Maybe [SecurityProfileIdentifier])
listSecurityProfilesResponse_securityProfileIdentifiers = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityProfilesResponse' {Maybe [SecurityProfileIdentifier]
securityProfileIdentifiers :: Maybe [SecurityProfileIdentifier]
$sel:securityProfileIdentifiers:ListSecurityProfilesResponse' :: ListSecurityProfilesResponse -> Maybe [SecurityProfileIdentifier]
securityProfileIdentifiers} -> Maybe [SecurityProfileIdentifier]
securityProfileIdentifiers) (\s :: ListSecurityProfilesResponse
s@ListSecurityProfilesResponse' {} Maybe [SecurityProfileIdentifier]
a -> ListSecurityProfilesResponse
s {$sel:securityProfileIdentifiers:ListSecurityProfilesResponse' :: Maybe [SecurityProfileIdentifier]
securityProfileIdentifiers = Maybe [SecurityProfileIdentifier]
a} :: ListSecurityProfilesResponse) 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

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

instance Prelude.NFData ListSecurityProfilesResponse where
  rnf :: ListSecurityProfilesResponse -> ()
rnf ListSecurityProfilesResponse' {Int
Maybe [SecurityProfileIdentifier]
Maybe Text
httpStatus :: Int
securityProfileIdentifiers :: Maybe [SecurityProfileIdentifier]
nextToken :: Maybe Text
$sel:httpStatus:ListSecurityProfilesResponse' :: ListSecurityProfilesResponse -> Int
$sel:securityProfileIdentifiers:ListSecurityProfilesResponse' :: ListSecurityProfilesResponse -> Maybe [SecurityProfileIdentifier]
$sel:nextToken:ListSecurityProfilesResponse' :: ListSecurityProfilesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SecurityProfileIdentifier]
securityProfileIdentifiers
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus