{-# 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.Connect.ListSecurityProfiles
-- 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)
--
-- Provides summary information about the security profiles for the
-- specified Amazon Connect instance.
--
-- For more information about security profiles, see
-- <https://docs.aws.amazon.com/connect/latest/adminguide/connect-security-profiles.html Security Profiles>
-- in the /Amazon Connect Administrator Guide/.
--
-- This operation returns paginated results.
module Amazonka.Connect.ListSecurityProfiles
  ( -- * Creating a Request
    ListSecurityProfiles (..),
    newListSecurityProfiles,

    -- * Request Lenses
    listSecurityProfiles_nextToken,
    listSecurityProfiles_maxResults,
    listSecurityProfiles_instanceId,

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

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

import Amazonka.Connect.Types
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

-- | /See:/ 'newListSecurityProfiles' smart constructor.
data ListSecurityProfiles = ListSecurityProfiles'
  { -- | The token for the next set of results. Use the value returned in the
    -- previous response in the next request to retrieve the next set of
    -- results.
    ListSecurityProfiles -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return per page.
    ListSecurityProfiles -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    ListSecurityProfiles -> Text
instanceId :: Prelude.Text
  }
  deriving (ListSecurityProfiles -> ListSecurityProfiles -> Bool
(ListSecurityProfiles -> ListSecurityProfiles -> Bool)
-> (ListSecurityProfiles -> ListSecurityProfiles -> Bool)
-> Eq ListSecurityProfiles
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]
(Int -> ReadS ListSecurityProfiles)
-> ReadS [ListSecurityProfiles]
-> ReadPrec ListSecurityProfiles
-> ReadPrec [ListSecurityProfiles]
-> Read 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
(Int -> ListSecurityProfiles -> ShowS)
-> (ListSecurityProfiles -> String)
-> ([ListSecurityProfiles] -> ShowS)
-> Show ListSecurityProfiles
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. ListSecurityProfiles -> Rep ListSecurityProfiles x)
-> (forall x. Rep ListSecurityProfiles x -> ListSecurityProfiles)
-> Generic ListSecurityProfiles
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:
--
-- 'nextToken', 'listSecurityProfiles_nextToken' - The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
--
-- 'maxResults', 'listSecurityProfiles_maxResults' - The maximum number of results to return per page.
--
-- 'instanceId', 'listSecurityProfiles_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
newListSecurityProfiles ::
  -- | 'instanceId'
  Prelude.Text ->
  ListSecurityProfiles
newListSecurityProfiles :: Text -> ListSecurityProfiles
newListSecurityProfiles Text
pInstanceId_ =
  ListSecurityProfiles' :: Maybe Text -> Maybe Natural -> Text -> ListSecurityProfiles
ListSecurityProfiles'
    { $sel:nextToken:ListSecurityProfiles' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListSecurityProfiles' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceId:ListSecurityProfiles' :: Text
instanceId = Text
pInstanceId_
    }

-- | The token for the next set of results. Use the value returned in the
-- previous response in the next request to retrieve the next set of
-- results.
listSecurityProfiles_nextToken :: Lens.Lens' ListSecurityProfiles (Prelude.Maybe Prelude.Text)
listSecurityProfiles_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSecurityProfiles -> f ListSecurityProfiles
listSecurityProfiles_nextToken = (ListSecurityProfiles -> Maybe Text)
-> (ListSecurityProfiles -> Maybe Text -> ListSecurityProfiles)
-> Lens
     ListSecurityProfiles ListSecurityProfiles (Maybe Text) (Maybe Text)
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)

-- | The maximum number of results to return per page.
listSecurityProfiles_maxResults :: Lens.Lens' ListSecurityProfiles (Prelude.Maybe Prelude.Natural)
listSecurityProfiles_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListSecurityProfiles -> f ListSecurityProfiles
listSecurityProfiles_maxResults = (ListSecurityProfiles -> Maybe Natural)
-> (ListSecurityProfiles -> Maybe Natural -> ListSecurityProfiles)
-> Lens
     ListSecurityProfiles
     ListSecurityProfiles
     (Maybe Natural)
     (Maybe Natural)
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 identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
listSecurityProfiles_instanceId :: Lens.Lens' ListSecurityProfiles Prelude.Text
listSecurityProfiles_instanceId :: (Text -> f Text) -> ListSecurityProfiles -> f ListSecurityProfiles
listSecurityProfiles_instanceId = (ListSecurityProfiles -> Text)
-> (ListSecurityProfiles -> Text -> ListSecurityProfiles)
-> Lens ListSecurityProfiles ListSecurityProfiles Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityProfiles' {Text
instanceId :: Text
$sel:instanceId:ListSecurityProfiles' :: ListSecurityProfiles -> Text
instanceId} -> Text
instanceId) (\s :: ListSecurityProfiles
s@ListSecurityProfiles' {} Text
a -> ListSecurityProfiles
s {$sel:instanceId:ListSecurityProfiles' :: Text
instanceId = Text
a} :: ListSecurityProfiles)

instance Core.AWSPager ListSecurityProfiles where
  page :: ListSecurityProfiles
-> AWSResponse ListSecurityProfiles -> Maybe ListSecurityProfiles
page ListSecurityProfiles
rq AWSResponse ListSecurityProfiles
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSecurityProfiles
ListSecurityProfilesResponse
rs
            ListSecurityProfilesResponse
-> Getting (First Text) ListSecurityProfilesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSecurityProfilesResponse
-> Const (First Text) ListSecurityProfilesResponse
Lens' ListSecurityProfilesResponse (Maybe Text)
listSecurityProfilesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSecurityProfilesResponse
 -> Const (First Text) ListSecurityProfilesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSecurityProfilesResponse 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 ListSecurityProfiles
forall a. Maybe a
Prelude.Nothing
    | Maybe [SecurityProfileSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListSecurityProfiles
ListSecurityProfilesResponse
rs
            ListSecurityProfilesResponse
-> Getting
     (First [SecurityProfileSummary])
     ListSecurityProfilesResponse
     [SecurityProfileSummary]
-> Maybe [SecurityProfileSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [SecurityProfileSummary]
 -> Const
      (First [SecurityProfileSummary]) (Maybe [SecurityProfileSummary]))
-> ListSecurityProfilesResponse
-> Const
     (First [SecurityProfileSummary]) ListSecurityProfilesResponse
Lens' ListSecurityProfilesResponse (Maybe [SecurityProfileSummary])
listSecurityProfilesResponse_securityProfileSummaryList
              ((Maybe [SecurityProfileSummary]
  -> Const
       (First [SecurityProfileSummary]) (Maybe [SecurityProfileSummary]))
 -> ListSecurityProfilesResponse
 -> Const
      (First [SecurityProfileSummary]) ListSecurityProfilesResponse)
-> (([SecurityProfileSummary]
     -> Const (First [SecurityProfileSummary]) [SecurityProfileSummary])
    -> Maybe [SecurityProfileSummary]
    -> Const
         (First [SecurityProfileSummary]) (Maybe [SecurityProfileSummary]))
-> Getting
     (First [SecurityProfileSummary])
     ListSecurityProfilesResponse
     [SecurityProfileSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([SecurityProfileSummary]
 -> Const (First [SecurityProfileSummary]) [SecurityProfileSummary])
-> Maybe [SecurityProfileSummary]
-> Const
     (First [SecurityProfileSummary]) (Maybe [SecurityProfileSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListSecurityProfiles
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListSecurityProfiles -> Maybe ListSecurityProfiles
forall a. a -> Maybe a
Prelude.Just (ListSecurityProfiles -> Maybe ListSecurityProfiles)
-> ListSecurityProfiles -> Maybe ListSecurityProfiles
forall a b. (a -> b) -> a -> b
Prelude.$
        ListSecurityProfiles
rq
          ListSecurityProfiles
-> (ListSecurityProfiles -> ListSecurityProfiles)
-> ListSecurityProfiles
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListSecurityProfiles -> Identity ListSecurityProfiles
Lens
  ListSecurityProfiles ListSecurityProfiles (Maybe Text) (Maybe Text)
listSecurityProfiles_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListSecurityProfiles -> Identity ListSecurityProfiles)
-> Maybe Text -> ListSecurityProfiles -> ListSecurityProfiles
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListSecurityProfiles
ListSecurityProfilesResponse
rs
          ListSecurityProfilesResponse
-> Getting (First Text) ListSecurityProfilesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListSecurityProfilesResponse
-> Const (First Text) ListSecurityProfilesResponse
Lens' ListSecurityProfilesResponse (Maybe Text)
listSecurityProfilesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListSecurityProfilesResponse
 -> Const (First Text) ListSecurityProfilesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListSecurityProfilesResponse 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 ListSecurityProfiles where
  type
    AWSResponse ListSecurityProfiles =
      ListSecurityProfilesResponse
  request :: ListSecurityProfiles -> Request ListSecurityProfiles
request = Service -> ListSecurityProfiles -> Request ListSecurityProfiles
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListSecurityProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSecurityProfiles)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListSecurityProfiles))
-> Logger
-> Service
-> Proxy ListSecurityProfiles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListSecurityProfiles)))
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 [SecurityProfileSummary]
-> Int
-> ListSecurityProfilesResponse
ListSecurityProfilesResponse'
            (Maybe Text
 -> Maybe [SecurityProfileSummary]
 -> Int
 -> ListSecurityProfilesResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [SecurityProfileSummary]
      -> Int -> ListSecurityProfilesResponse)
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
  (Maybe [SecurityProfileSummary]
   -> Int -> ListSecurityProfilesResponse)
-> Either String (Maybe [SecurityProfileSummary])
-> Either String (Int -> ListSecurityProfilesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [SecurityProfileSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"SecurityProfileSummaryList"
                            Either String (Maybe (Maybe [SecurityProfileSummary]))
-> Maybe [SecurityProfileSummary]
-> Either String (Maybe [SecurityProfileSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [SecurityProfileSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListSecurityProfilesResponse)
-> Either String Int -> Either String ListSecurityProfilesResponse
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 ListSecurityProfiles

instance Prelude.NFData ListSecurityProfiles

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

instance Core.ToQuery ListSecurityProfiles where
  toQuery :: ListSecurityProfiles -> QueryString
toQuery ListSecurityProfiles' {Maybe Natural
Maybe Text
Text
instanceId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:instanceId:ListSecurityProfiles' :: ListSecurityProfiles -> Text
$sel:maxResults:ListSecurityProfiles' :: ListSecurityProfiles -> Maybe Natural
$sel:nextToken:ListSecurityProfiles' :: ListSecurityProfiles -> 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:/ 'newListSecurityProfilesResponse' smart constructor.
data ListSecurityProfilesResponse = ListSecurityProfilesResponse'
  { -- | If there are additional results, this is the token for the next set of
    -- results.
    ListSecurityProfilesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the security profiles.
    ListSecurityProfilesResponse -> Maybe [SecurityProfileSummary]
securityProfileSummaryList :: Prelude.Maybe [SecurityProfileSummary],
    -- | The response's http status code.
    ListSecurityProfilesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListSecurityProfilesResponse
-> ListSecurityProfilesResponse -> Bool
(ListSecurityProfilesResponse
 -> ListSecurityProfilesResponse -> Bool)
-> (ListSecurityProfilesResponse
    -> ListSecurityProfilesResponse -> Bool)
-> Eq ListSecurityProfilesResponse
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]
(Int -> ReadS ListSecurityProfilesResponse)
-> ReadS [ListSecurityProfilesResponse]
-> ReadPrec ListSecurityProfilesResponse
-> ReadPrec [ListSecurityProfilesResponse]
-> Read 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
(Int -> ListSecurityProfilesResponse -> ShowS)
-> (ListSecurityProfilesResponse -> String)
-> ([ListSecurityProfilesResponse] -> ShowS)
-> Show ListSecurityProfilesResponse
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.
 ListSecurityProfilesResponse -> Rep ListSecurityProfilesResponse x)
-> (forall x.
    Rep ListSecurityProfilesResponse x -> ListSecurityProfilesResponse)
-> Generic ListSecurityProfilesResponse
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' - If there are additional results, this is the token for the next set of
-- results.
--
-- 'securityProfileSummaryList', 'listSecurityProfilesResponse_securityProfileSummaryList' - Information about the security profiles.
--
-- 'httpStatus', 'listSecurityProfilesResponse_httpStatus' - The response's http status code.
newListSecurityProfilesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListSecurityProfilesResponse
newListSecurityProfilesResponse :: Int -> ListSecurityProfilesResponse
newListSecurityProfilesResponse Int
pHttpStatus_ =
  ListSecurityProfilesResponse' :: Maybe Text
-> Maybe [SecurityProfileSummary]
-> Int
-> ListSecurityProfilesResponse
ListSecurityProfilesResponse'
    { $sel:nextToken:ListSecurityProfilesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:securityProfileSummaryList:ListSecurityProfilesResponse' :: Maybe [SecurityProfileSummary]
securityProfileSummaryList = Maybe [SecurityProfileSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListSecurityProfilesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If there are additional results, this is the token for the next set of
-- results.
listSecurityProfilesResponse_nextToken :: Lens.Lens' ListSecurityProfilesResponse (Prelude.Maybe Prelude.Text)
listSecurityProfilesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListSecurityProfilesResponse -> f ListSecurityProfilesResponse
listSecurityProfilesResponse_nextToken = (ListSecurityProfilesResponse -> Maybe Text)
-> (ListSecurityProfilesResponse
    -> Maybe Text -> ListSecurityProfilesResponse)
-> Lens' ListSecurityProfilesResponse (Maybe Text)
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)

-- | Information about the security profiles.
listSecurityProfilesResponse_securityProfileSummaryList :: Lens.Lens' ListSecurityProfilesResponse (Prelude.Maybe [SecurityProfileSummary])
listSecurityProfilesResponse_securityProfileSummaryList :: (Maybe [SecurityProfileSummary]
 -> f (Maybe [SecurityProfileSummary]))
-> ListSecurityProfilesResponse -> f ListSecurityProfilesResponse
listSecurityProfilesResponse_securityProfileSummaryList = (ListSecurityProfilesResponse -> Maybe [SecurityProfileSummary])
-> (ListSecurityProfilesResponse
    -> Maybe [SecurityProfileSummary] -> ListSecurityProfilesResponse)
-> Lens'
     ListSecurityProfilesResponse (Maybe [SecurityProfileSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListSecurityProfilesResponse' {Maybe [SecurityProfileSummary]
securityProfileSummaryList :: Maybe [SecurityProfileSummary]
$sel:securityProfileSummaryList:ListSecurityProfilesResponse' :: ListSecurityProfilesResponse -> Maybe [SecurityProfileSummary]
securityProfileSummaryList} -> Maybe [SecurityProfileSummary]
securityProfileSummaryList) (\s :: ListSecurityProfilesResponse
s@ListSecurityProfilesResponse' {} Maybe [SecurityProfileSummary]
a -> ListSecurityProfilesResponse
s {$sel:securityProfileSummaryList:ListSecurityProfilesResponse' :: Maybe [SecurityProfileSummary]
securityProfileSummaryList = Maybe [SecurityProfileSummary]
a} :: ListSecurityProfilesResponse) ((Maybe [SecurityProfileSummary]
  -> f (Maybe [SecurityProfileSummary]))
 -> ListSecurityProfilesResponse -> f ListSecurityProfilesResponse)
-> ((Maybe [SecurityProfileSummary]
     -> f (Maybe [SecurityProfileSummary]))
    -> Maybe [SecurityProfileSummary]
    -> f (Maybe [SecurityProfileSummary]))
-> (Maybe [SecurityProfileSummary]
    -> f (Maybe [SecurityProfileSummary]))
-> ListSecurityProfilesResponse
-> f ListSecurityProfilesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [SecurityProfileSummary]
  [SecurityProfileSummary]
  [SecurityProfileSummary]
  [SecurityProfileSummary]
-> Iso
     (Maybe [SecurityProfileSummary])
     (Maybe [SecurityProfileSummary])
     (Maybe [SecurityProfileSummary])
     (Maybe [SecurityProfileSummary])
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
  [SecurityProfileSummary]
  [SecurityProfileSummary]
  [SecurityProfileSummary]
  [SecurityProfileSummary]
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 :: (Int -> f Int)
-> ListSecurityProfilesResponse -> f ListSecurityProfilesResponse
listSecurityProfilesResponse_httpStatus = (ListSecurityProfilesResponse -> Int)
-> (ListSecurityProfilesResponse
    -> Int -> ListSecurityProfilesResponse)
-> Lens
     ListSecurityProfilesResponse ListSecurityProfilesResponse Int Int
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