{-# 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.Rekognition.ListProjectPolicies
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets a list of the project policies attached to a project.
--
-- To attach a project policy to a project, call PutProjectPolicy. To
-- remove a project policy from a project, call DeleteProjectPolicy.
--
-- This operation returns paginated results.
module Amazonka.Rekognition.ListProjectPolicies
  ( -- * Creating a Request
    ListProjectPolicies (..),
    newListProjectPolicies,

    -- * Request Lenses
    listProjectPolicies_maxResults,
    listProjectPolicies_nextToken,
    listProjectPolicies_projectArn,

    -- * Destructuring the Response
    ListProjectPoliciesResponse (..),
    newListProjectPoliciesResponse,

    -- * Response Lenses
    listProjectPoliciesResponse_nextToken,
    listProjectPoliciesResponse_projectPolicies,
    listProjectPoliciesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListProjectPolicies' smart constructor.
data ListProjectPolicies = ListProjectPolicies'
  { -- | The maximum number of results to return per paginated call. The largest
    -- value you can specify is 5. If you specify a value greater than 5, a
    -- ValidationException error occurs. The default value is 5.
    ListProjectPolicies -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the previous response was incomplete (because there is more results
    -- to retrieve), Amazon Rekognition Custom Labels returns a pagination
    -- token in the response. You can use this pagination token to retrieve the
    -- next set of results.
    ListProjectPolicies -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the project for which you want to list the project policies.
    ListProjectPolicies -> Text
projectArn :: Prelude.Text
  }
  deriving (ListProjectPolicies -> ListProjectPolicies -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListProjectPolicies -> ListProjectPolicies -> Bool
$c/= :: ListProjectPolicies -> ListProjectPolicies -> Bool
== :: ListProjectPolicies -> ListProjectPolicies -> Bool
$c== :: ListProjectPolicies -> ListProjectPolicies -> Bool
Prelude.Eq, ReadPrec [ListProjectPolicies]
ReadPrec ListProjectPolicies
Int -> ReadS ListProjectPolicies
ReadS [ListProjectPolicies]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListProjectPolicies]
$creadListPrec :: ReadPrec [ListProjectPolicies]
readPrec :: ReadPrec ListProjectPolicies
$creadPrec :: ReadPrec ListProjectPolicies
readList :: ReadS [ListProjectPolicies]
$creadList :: ReadS [ListProjectPolicies]
readsPrec :: Int -> ReadS ListProjectPolicies
$creadsPrec :: Int -> ReadS ListProjectPolicies
Prelude.Read, Int -> ListProjectPolicies -> ShowS
[ListProjectPolicies] -> ShowS
ListProjectPolicies -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListProjectPolicies] -> ShowS
$cshowList :: [ListProjectPolicies] -> ShowS
show :: ListProjectPolicies -> String
$cshow :: ListProjectPolicies -> String
showsPrec :: Int -> ListProjectPolicies -> ShowS
$cshowsPrec :: Int -> ListProjectPolicies -> ShowS
Prelude.Show, forall x. Rep ListProjectPolicies x -> ListProjectPolicies
forall x. ListProjectPolicies -> Rep ListProjectPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListProjectPolicies x -> ListProjectPolicies
$cfrom :: forall x. ListProjectPolicies -> Rep ListProjectPolicies x
Prelude.Generic)

-- |
-- Create a value of 'ListProjectPolicies' 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', 'listProjectPolicies_maxResults' - The maximum number of results to return per paginated call. The largest
-- value you can specify is 5. If you specify a value greater than 5, a
-- ValidationException error occurs. The default value is 5.
--
-- 'nextToken', 'listProjectPolicies_nextToken' - If the previous response was incomplete (because there is more results
-- to retrieve), Amazon Rekognition Custom Labels returns a pagination
-- token in the response. You can use this pagination token to retrieve the
-- next set of results.
--
-- 'projectArn', 'listProjectPolicies_projectArn' - The ARN of the project for which you want to list the project policies.
newListProjectPolicies ::
  -- | 'projectArn'
  Prelude.Text ->
  ListProjectPolicies
newListProjectPolicies :: Text -> ListProjectPolicies
newListProjectPolicies Text
pProjectArn_ =
  ListProjectPolicies'
    { $sel:maxResults:ListProjectPolicies' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListProjectPolicies' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:projectArn:ListProjectPolicies' :: Text
projectArn = Text
pProjectArn_
    }

-- | The maximum number of results to return per paginated call. The largest
-- value you can specify is 5. If you specify a value greater than 5, a
-- ValidationException error occurs. The default value is 5.
listProjectPolicies_maxResults :: Lens.Lens' ListProjectPolicies (Prelude.Maybe Prelude.Natural)
listProjectPolicies_maxResults :: Lens' ListProjectPolicies (Maybe Natural)
listProjectPolicies_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectPolicies' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListProjectPolicies' :: ListProjectPolicies -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListProjectPolicies
s@ListProjectPolicies' {} Maybe Natural
a -> ListProjectPolicies
s {$sel:maxResults:ListProjectPolicies' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListProjectPolicies)

-- | If the previous response was incomplete (because there is more results
-- to retrieve), Amazon Rekognition Custom Labels returns a pagination
-- token in the response. You can use this pagination token to retrieve the
-- next set of results.
listProjectPolicies_nextToken :: Lens.Lens' ListProjectPolicies (Prelude.Maybe Prelude.Text)
listProjectPolicies_nextToken :: Lens' ListProjectPolicies (Maybe Text)
listProjectPolicies_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectPolicies' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListProjectPolicies' :: ListProjectPolicies -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListProjectPolicies
s@ListProjectPolicies' {} Maybe Text
a -> ListProjectPolicies
s {$sel:nextToken:ListProjectPolicies' :: Maybe Text
nextToken = Maybe Text
a} :: ListProjectPolicies)

-- | The ARN of the project for which you want to list the project policies.
listProjectPolicies_projectArn :: Lens.Lens' ListProjectPolicies Prelude.Text
listProjectPolicies_projectArn :: Lens' ListProjectPolicies Text
listProjectPolicies_projectArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectPolicies' {Text
projectArn :: Text
$sel:projectArn:ListProjectPolicies' :: ListProjectPolicies -> Text
projectArn} -> Text
projectArn) (\s :: ListProjectPolicies
s@ListProjectPolicies' {} Text
a -> ListProjectPolicies
s {$sel:projectArn:ListProjectPolicies' :: Text
projectArn = Text
a} :: ListProjectPolicies)

instance Core.AWSPager ListProjectPolicies where
  page :: ListProjectPolicies
-> AWSResponse ListProjectPolicies -> Maybe ListProjectPolicies
page ListProjectPolicies
rq AWSResponse ListProjectPolicies
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListProjectPolicies
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListProjectPoliciesResponse (Maybe Text)
listProjectPoliciesResponse_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 ListProjectPolicies
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListProjectPoliciesResponse (Maybe [ProjectPolicy])
listProjectPoliciesResponse_projectPolicies
            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.$ ListProjectPolicies
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListProjectPolicies (Maybe Text)
listProjectPolicies_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListProjectPolicies
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListProjectPoliciesResponse (Maybe Text)
listProjectPoliciesResponse_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 ListProjectPolicies where
  type
    AWSResponse ListProjectPolicies =
      ListProjectPoliciesResponse
  request :: (Service -> Service)
-> ListProjectPolicies -> Request ListProjectPolicies
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 ListProjectPolicies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListProjectPolicies)))
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 [ProjectPolicy] -> Int -> ListProjectPoliciesResponse
ListProjectPoliciesResponse'
            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
"ProjectPolicies"
                            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 ListProjectPolicies where
  hashWithSalt :: Int -> ListProjectPolicies -> Int
hashWithSalt Int
_salt ListProjectPolicies' {Maybe Natural
Maybe Text
Text
projectArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:projectArn:ListProjectPolicies' :: ListProjectPolicies -> Text
$sel:nextToken:ListProjectPolicies' :: ListProjectPolicies -> Maybe Text
$sel:maxResults:ListProjectPolicies' :: ListProjectPolicies -> 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` Text
projectArn

instance Prelude.NFData ListProjectPolicies where
  rnf :: ListProjectPolicies -> ()
rnf ListProjectPolicies' {Maybe Natural
Maybe Text
Text
projectArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:projectArn:ListProjectPolicies' :: ListProjectPolicies -> Text
$sel:nextToken:ListProjectPolicies' :: ListProjectPolicies -> Maybe Text
$sel:maxResults:ListProjectPolicies' :: ListProjectPolicies -> 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 Text
projectArn

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

instance Data.ToJSON ListProjectPolicies where
  toJSON :: ListProjectPolicies -> Value
toJSON ListProjectPolicies' {Maybe Natural
Maybe Text
Text
projectArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:projectArn:ListProjectPolicies' :: ListProjectPolicies -> Text
$sel:nextToken:ListProjectPolicies' :: ListProjectPolicies -> Maybe Text
$sel:maxResults:ListProjectPolicies' :: ListProjectPolicies -> 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,
            forall a. a -> Maybe a
Prelude.Just (Key
"ProjectArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
projectArn)
          ]
      )

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

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

-- | /See:/ 'newListProjectPoliciesResponse' smart constructor.
data ListProjectPoliciesResponse = ListProjectPoliciesResponse'
  { -- | If the response is truncated, Amazon Rekognition returns this token that
    -- you can use in the subsequent request to retrieve the next set of
    -- project policies.
    ListProjectPoliciesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A list of project policies attached to the project.
    ListProjectPoliciesResponse -> Maybe [ProjectPolicy]
projectPolicies :: Prelude.Maybe [ProjectPolicy],
    -- | The response's http status code.
    ListProjectPoliciesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListProjectPoliciesResponse -> ListProjectPoliciesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListProjectPoliciesResponse -> ListProjectPoliciesResponse -> Bool
$c/= :: ListProjectPoliciesResponse -> ListProjectPoliciesResponse -> Bool
== :: ListProjectPoliciesResponse -> ListProjectPoliciesResponse -> Bool
$c== :: ListProjectPoliciesResponse -> ListProjectPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [ListProjectPoliciesResponse]
ReadPrec ListProjectPoliciesResponse
Int -> ReadS ListProjectPoliciesResponse
ReadS [ListProjectPoliciesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListProjectPoliciesResponse]
$creadListPrec :: ReadPrec [ListProjectPoliciesResponse]
readPrec :: ReadPrec ListProjectPoliciesResponse
$creadPrec :: ReadPrec ListProjectPoliciesResponse
readList :: ReadS [ListProjectPoliciesResponse]
$creadList :: ReadS [ListProjectPoliciesResponse]
readsPrec :: Int -> ReadS ListProjectPoliciesResponse
$creadsPrec :: Int -> ReadS ListProjectPoliciesResponse
Prelude.Read, Int -> ListProjectPoliciesResponse -> ShowS
[ListProjectPoliciesResponse] -> ShowS
ListProjectPoliciesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListProjectPoliciesResponse] -> ShowS
$cshowList :: [ListProjectPoliciesResponse] -> ShowS
show :: ListProjectPoliciesResponse -> String
$cshow :: ListProjectPoliciesResponse -> String
showsPrec :: Int -> ListProjectPoliciesResponse -> ShowS
$cshowsPrec :: Int -> ListProjectPoliciesResponse -> ShowS
Prelude.Show, forall x.
Rep ListProjectPoliciesResponse x -> ListProjectPoliciesResponse
forall x.
ListProjectPoliciesResponse -> Rep ListProjectPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListProjectPoliciesResponse x -> ListProjectPoliciesResponse
$cfrom :: forall x.
ListProjectPoliciesResponse -> Rep ListProjectPoliciesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListProjectPoliciesResponse' 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', 'listProjectPoliciesResponse_nextToken' - If the response is truncated, Amazon Rekognition returns this token that
-- you can use in the subsequent request to retrieve the next set of
-- project policies.
--
-- 'projectPolicies', 'listProjectPoliciesResponse_projectPolicies' - A list of project policies attached to the project.
--
-- 'httpStatus', 'listProjectPoliciesResponse_httpStatus' - The response's http status code.
newListProjectPoliciesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListProjectPoliciesResponse
newListProjectPoliciesResponse :: Int -> ListProjectPoliciesResponse
newListProjectPoliciesResponse Int
pHttpStatus_ =
  ListProjectPoliciesResponse'
    { $sel:nextToken:ListProjectPoliciesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:projectPolicies:ListProjectPoliciesResponse' :: Maybe [ProjectPolicy]
projectPolicies = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListProjectPoliciesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the response is truncated, Amazon Rekognition returns this token that
-- you can use in the subsequent request to retrieve the next set of
-- project policies.
listProjectPoliciesResponse_nextToken :: Lens.Lens' ListProjectPoliciesResponse (Prelude.Maybe Prelude.Text)
listProjectPoliciesResponse_nextToken :: Lens' ListProjectPoliciesResponse (Maybe Text)
listProjectPoliciesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectPoliciesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListProjectPoliciesResponse' :: ListProjectPoliciesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListProjectPoliciesResponse
s@ListProjectPoliciesResponse' {} Maybe Text
a -> ListProjectPoliciesResponse
s {$sel:nextToken:ListProjectPoliciesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListProjectPoliciesResponse)

-- | A list of project policies attached to the project.
listProjectPoliciesResponse_projectPolicies :: Lens.Lens' ListProjectPoliciesResponse (Prelude.Maybe [ProjectPolicy])
listProjectPoliciesResponse_projectPolicies :: Lens' ListProjectPoliciesResponse (Maybe [ProjectPolicy])
listProjectPoliciesResponse_projectPolicies = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectPoliciesResponse' {Maybe [ProjectPolicy]
projectPolicies :: Maybe [ProjectPolicy]
$sel:projectPolicies:ListProjectPoliciesResponse' :: ListProjectPoliciesResponse -> Maybe [ProjectPolicy]
projectPolicies} -> Maybe [ProjectPolicy]
projectPolicies) (\s :: ListProjectPoliciesResponse
s@ListProjectPoliciesResponse' {} Maybe [ProjectPolicy]
a -> ListProjectPoliciesResponse
s {$sel:projectPolicies:ListProjectPoliciesResponse' :: Maybe [ProjectPolicy]
projectPolicies = Maybe [ProjectPolicy]
a} :: ListProjectPoliciesResponse) 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.
listProjectPoliciesResponse_httpStatus :: Lens.Lens' ListProjectPoliciesResponse Prelude.Int
listProjectPoliciesResponse_httpStatus :: Lens' ListProjectPoliciesResponse Int
listProjectPoliciesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListProjectPoliciesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListProjectPoliciesResponse' :: ListProjectPoliciesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListProjectPoliciesResponse
s@ListProjectPoliciesResponse' {} Int
a -> ListProjectPoliciesResponse
s {$sel:httpStatus:ListProjectPoliciesResponse' :: Int
httpStatus = Int
a} :: ListProjectPoliciesResponse)

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