{-# 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.Inspector2.ListAccountPermissions
-- 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 permissions an account has to configure Amazon Inspector.
--
-- This operation returns paginated results.
module Amazonka.Inspector2.ListAccountPermissions
  ( -- * Creating a Request
    ListAccountPermissions (..),
    newListAccountPermissions,

    -- * Request Lenses
    listAccountPermissions_maxResults,
    listAccountPermissions_nextToken,
    listAccountPermissions_service,

    -- * Destructuring the Response
    ListAccountPermissionsResponse (..),
    newListAccountPermissionsResponse,

    -- * Response Lenses
    listAccountPermissionsResponse_nextToken,
    listAccountPermissionsResponse_httpStatus,
    listAccountPermissionsResponse_permissions,
  )
where

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

-- | /See:/ 'newListAccountPermissions' smart constructor.
data ListAccountPermissions = ListAccountPermissions'
  { -- | The maximum number of results to return in the response.
    ListAccountPermissions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A token to use for paginating results that are returned in the response.
    -- Set the value of this parameter to null for the first request to a list
    -- action. For subsequent calls, use the @NextToken@ value returned from
    -- the previous request to continue listing results after the first page.
    ListAccountPermissions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The service scan type to check permissions for.
    ListAccountPermissions -> Maybe Service
service :: Prelude.Maybe Service
  }
  deriving (ListAccountPermissions -> ListAccountPermissions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAccountPermissions -> ListAccountPermissions -> Bool
$c/= :: ListAccountPermissions -> ListAccountPermissions -> Bool
== :: ListAccountPermissions -> ListAccountPermissions -> Bool
$c== :: ListAccountPermissions -> ListAccountPermissions -> Bool
Prelude.Eq, ReadPrec [ListAccountPermissions]
ReadPrec ListAccountPermissions
Int -> ReadS ListAccountPermissions
ReadS [ListAccountPermissions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAccountPermissions]
$creadListPrec :: ReadPrec [ListAccountPermissions]
readPrec :: ReadPrec ListAccountPermissions
$creadPrec :: ReadPrec ListAccountPermissions
readList :: ReadS [ListAccountPermissions]
$creadList :: ReadS [ListAccountPermissions]
readsPrec :: Int -> ReadS ListAccountPermissions
$creadsPrec :: Int -> ReadS ListAccountPermissions
Prelude.Read, Int -> ListAccountPermissions -> ShowS
[ListAccountPermissions] -> ShowS
ListAccountPermissions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAccountPermissions] -> ShowS
$cshowList :: [ListAccountPermissions] -> ShowS
show :: ListAccountPermissions -> String
$cshow :: ListAccountPermissions -> String
showsPrec :: Int -> ListAccountPermissions -> ShowS
$cshowsPrec :: Int -> ListAccountPermissions -> ShowS
Prelude.Show, forall x. Rep ListAccountPermissions x -> ListAccountPermissions
forall x. ListAccountPermissions -> Rep ListAccountPermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAccountPermissions x -> ListAccountPermissions
$cfrom :: forall x. ListAccountPermissions -> Rep ListAccountPermissions x
Prelude.Generic)

-- |
-- Create a value of 'ListAccountPermissions' 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:
--
-- 'maxResults', 'listAccountPermissions_maxResults' - The maximum number of results to return in the response.
--
-- 'nextToken', 'listAccountPermissions_nextToken' - A token to use for paginating results that are returned in the response.
-- Set the value of this parameter to null for the first request to a list
-- action. For subsequent calls, use the @NextToken@ value returned from
-- the previous request to continue listing results after the first page.
--
-- 'service', 'listAccountPermissions_service' - The service scan type to check permissions for.
newListAccountPermissions ::
  ListAccountPermissions
newListAccountPermissions :: ListAccountPermissions
newListAccountPermissions =
  ListAccountPermissions'
    { $sel:maxResults:ListAccountPermissions' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAccountPermissions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:service:ListAccountPermissions' :: Maybe Service
service = forall a. Maybe a
Prelude.Nothing
    }

-- | The maximum number of results to return in the response.
listAccountPermissions_maxResults :: Lens.Lens' ListAccountPermissions (Prelude.Maybe Prelude.Natural)
listAccountPermissions_maxResults :: Lens' ListAccountPermissions (Maybe Natural)
listAccountPermissions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountPermissions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAccountPermissions' :: ListAccountPermissions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAccountPermissions
s@ListAccountPermissions' {} Maybe Natural
a -> ListAccountPermissions
s {$sel:maxResults:ListAccountPermissions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAccountPermissions)

-- | A token to use for paginating results that are returned in the response.
-- Set the value of this parameter to null for the first request to a list
-- action. For subsequent calls, use the @NextToken@ value returned from
-- the previous request to continue listing results after the first page.
listAccountPermissions_nextToken :: Lens.Lens' ListAccountPermissions (Prelude.Maybe Prelude.Text)
listAccountPermissions_nextToken :: Lens' ListAccountPermissions (Maybe Text)
listAccountPermissions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountPermissions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAccountPermissions' :: ListAccountPermissions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAccountPermissions
s@ListAccountPermissions' {} Maybe Text
a -> ListAccountPermissions
s {$sel:nextToken:ListAccountPermissions' :: Maybe Text
nextToken = Maybe Text
a} :: ListAccountPermissions)

-- | The service scan type to check permissions for.
listAccountPermissions_service :: Lens.Lens' ListAccountPermissions (Prelude.Maybe Service)
listAccountPermissions_service :: Lens' ListAccountPermissions (Maybe Service)
listAccountPermissions_service = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountPermissions' {Maybe Service
service :: Maybe Service
$sel:service:ListAccountPermissions' :: ListAccountPermissions -> Maybe Service
service} -> Maybe Service
service) (\s :: ListAccountPermissions
s@ListAccountPermissions' {} Maybe Service
a -> ListAccountPermissions
s {$sel:service:ListAccountPermissions' :: Maybe Service
service = Maybe Service
a} :: ListAccountPermissions)

instance Core.AWSPager ListAccountPermissions where
  page :: ListAccountPermissions
-> AWSResponse ListAccountPermissions
-> Maybe ListAccountPermissions
page ListAccountPermissions
rq AWSResponse ListAccountPermissions
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListAccountPermissions
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAccountPermissionsResponse (Maybe Text)
listAccountPermissionsResponse_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 ListAccountPermissions
rs
            forall s a. s -> Getting a s a -> a
Lens.^. Lens' ListAccountPermissionsResponse [Permission]
listAccountPermissionsResponse_permissions
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListAccountPermissions
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListAccountPermissions (Maybe Text)
listAccountPermissions_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAccountPermissions
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListAccountPermissionsResponse (Maybe Text)
listAccountPermissionsResponse_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 ListAccountPermissions where
  type
    AWSResponse ListAccountPermissions =
      ListAccountPermissionsResponse
  request :: (Service -> Service)
-> ListAccountPermissions -> Request ListAccountPermissions
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAccountPermissions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAccountPermissions)))
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 -> Int -> [Permission] -> ListAccountPermissionsResponse
ListAccountPermissionsResponse'
            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            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
"permissions" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListAccountPermissions where
  hashWithSalt :: Int -> ListAccountPermissions -> Int
hashWithSalt Int
_salt ListAccountPermissions' {Maybe Natural
Maybe Text
Maybe Service
service :: Maybe Service
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:service:ListAccountPermissions' :: ListAccountPermissions -> Maybe Service
$sel:nextToken:ListAccountPermissions' :: ListAccountPermissions -> Maybe Text
$sel:maxResults:ListAccountPermissions' :: ListAccountPermissions -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Service
service

instance Prelude.NFData ListAccountPermissions where
  rnf :: ListAccountPermissions -> ()
rnf ListAccountPermissions' {Maybe Natural
Maybe Text
Maybe Service
service :: Maybe Service
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:service:ListAccountPermissions' :: ListAccountPermissions -> Maybe Service
$sel:nextToken:ListAccountPermissions' :: ListAccountPermissions -> Maybe Text
$sel:maxResults:ListAccountPermissions' :: ListAccountPermissions -> Maybe Natural
..} =
    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
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Service
service

instance Data.ToHeaders ListAccountPermissions where
  toHeaders :: ListAccountPermissions -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListAccountPermissions where
  toJSON :: ListAccountPermissions -> Value
toJSON ListAccountPermissions' {Maybe Natural
Maybe Text
Maybe Service
service :: Maybe Service
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:service:ListAccountPermissions' :: ListAccountPermissions -> Maybe Service
$sel:nextToken:ListAccountPermissions' :: ListAccountPermissions -> Maybe Text
$sel:maxResults:ListAccountPermissions' :: ListAccountPermissions -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"maxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"nextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"service" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Service
service
          ]
      )

instance Data.ToPath ListAccountPermissions where
  toPath :: ListAccountPermissions -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/accountpermissions/list"

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

-- | /See:/ 'newListAccountPermissionsResponse' smart constructor.
data ListAccountPermissionsResponse = ListAccountPermissionsResponse'
  { -- | A token to use for paginating results that are returned in the response.
    -- Set the value of this parameter to null for the first request to a list
    -- action. For subsequent calls, use the @NextToken@ value returned from
    -- the previous request to continue listing results after the first page.
    ListAccountPermissionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAccountPermissionsResponse -> Int
httpStatus :: Prelude.Int,
    -- | Contains details on the permissions an account has to configure Amazon
    -- Inspector.
    ListAccountPermissionsResponse -> [Permission]
permissions :: [Permission]
  }
  deriving (ListAccountPermissionsResponse
-> ListAccountPermissionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAccountPermissionsResponse
-> ListAccountPermissionsResponse -> Bool
$c/= :: ListAccountPermissionsResponse
-> ListAccountPermissionsResponse -> Bool
== :: ListAccountPermissionsResponse
-> ListAccountPermissionsResponse -> Bool
$c== :: ListAccountPermissionsResponse
-> ListAccountPermissionsResponse -> Bool
Prelude.Eq, ReadPrec [ListAccountPermissionsResponse]
ReadPrec ListAccountPermissionsResponse
Int -> ReadS ListAccountPermissionsResponse
ReadS [ListAccountPermissionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAccountPermissionsResponse]
$creadListPrec :: ReadPrec [ListAccountPermissionsResponse]
readPrec :: ReadPrec ListAccountPermissionsResponse
$creadPrec :: ReadPrec ListAccountPermissionsResponse
readList :: ReadS [ListAccountPermissionsResponse]
$creadList :: ReadS [ListAccountPermissionsResponse]
readsPrec :: Int -> ReadS ListAccountPermissionsResponse
$creadsPrec :: Int -> ReadS ListAccountPermissionsResponse
Prelude.Read, Int -> ListAccountPermissionsResponse -> ShowS
[ListAccountPermissionsResponse] -> ShowS
ListAccountPermissionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAccountPermissionsResponse] -> ShowS
$cshowList :: [ListAccountPermissionsResponse] -> ShowS
show :: ListAccountPermissionsResponse -> String
$cshow :: ListAccountPermissionsResponse -> String
showsPrec :: Int -> ListAccountPermissionsResponse -> ShowS
$cshowsPrec :: Int -> ListAccountPermissionsResponse -> ShowS
Prelude.Show, forall x.
Rep ListAccountPermissionsResponse x
-> ListAccountPermissionsResponse
forall x.
ListAccountPermissionsResponse
-> Rep ListAccountPermissionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAccountPermissionsResponse x
-> ListAccountPermissionsResponse
$cfrom :: forall x.
ListAccountPermissionsResponse
-> Rep ListAccountPermissionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAccountPermissionsResponse' 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', 'listAccountPermissionsResponse_nextToken' - A token to use for paginating results that are returned in the response.
-- Set the value of this parameter to null for the first request to a list
-- action. For subsequent calls, use the @NextToken@ value returned from
-- the previous request to continue listing results after the first page.
--
-- 'httpStatus', 'listAccountPermissionsResponse_httpStatus' - The response's http status code.
--
-- 'permissions', 'listAccountPermissionsResponse_permissions' - Contains details on the permissions an account has to configure Amazon
-- Inspector.
newListAccountPermissionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAccountPermissionsResponse
newListAccountPermissionsResponse :: Int -> ListAccountPermissionsResponse
newListAccountPermissionsResponse Int
pHttpStatus_ =
  ListAccountPermissionsResponse'
    { $sel:nextToken:ListAccountPermissionsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAccountPermissionsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:permissions:ListAccountPermissionsResponse' :: [Permission]
permissions = forall a. Monoid a => a
Prelude.mempty
    }

-- | A token to use for paginating results that are returned in the response.
-- Set the value of this parameter to null for the first request to a list
-- action. For subsequent calls, use the @NextToken@ value returned from
-- the previous request to continue listing results after the first page.
listAccountPermissionsResponse_nextToken :: Lens.Lens' ListAccountPermissionsResponse (Prelude.Maybe Prelude.Text)
listAccountPermissionsResponse_nextToken :: Lens' ListAccountPermissionsResponse (Maybe Text)
listAccountPermissionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountPermissionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAccountPermissionsResponse' :: ListAccountPermissionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAccountPermissionsResponse
s@ListAccountPermissionsResponse' {} Maybe Text
a -> ListAccountPermissionsResponse
s {$sel:nextToken:ListAccountPermissionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAccountPermissionsResponse)

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

-- | Contains details on the permissions an account has to configure Amazon
-- Inspector.
listAccountPermissionsResponse_permissions :: Lens.Lens' ListAccountPermissionsResponse [Permission]
listAccountPermissionsResponse_permissions :: Lens' ListAccountPermissionsResponse [Permission]
listAccountPermissionsResponse_permissions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountPermissionsResponse' {[Permission]
permissions :: [Permission]
$sel:permissions:ListAccountPermissionsResponse' :: ListAccountPermissionsResponse -> [Permission]
permissions} -> [Permission]
permissions) (\s :: ListAccountPermissionsResponse
s@ListAccountPermissionsResponse' {} [Permission]
a -> ListAccountPermissionsResponse
s {$sel:permissions:ListAccountPermissionsResponse' :: [Permission]
permissions = [Permission]
a} :: ListAccountPermissionsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Prelude.NFData
    ListAccountPermissionsResponse
  where
  rnf :: ListAccountPermissionsResponse -> ()
rnf ListAccountPermissionsResponse' {Int
[Permission]
Maybe Text
permissions :: [Permission]
httpStatus :: Int
nextToken :: Maybe Text
$sel:permissions:ListAccountPermissionsResponse' :: ListAccountPermissionsResponse -> [Permission]
$sel:httpStatus:ListAccountPermissionsResponse' :: ListAccountPermissionsResponse -> Int
$sel:nextToken:ListAccountPermissionsResponse' :: ListAccountPermissionsResponse -> 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 Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Permission]
permissions