{-# 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.AuditManager.GetEvidenceFoldersByAssessment
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns the evidence folders from a specified assessment in Audit
-- Manager.
module Amazonka.AuditManager.GetEvidenceFoldersByAssessment
  ( -- * Creating a Request
    GetEvidenceFoldersByAssessment (..),
    newGetEvidenceFoldersByAssessment,

    -- * Request Lenses
    getEvidenceFoldersByAssessment_nextToken,
    getEvidenceFoldersByAssessment_maxResults,
    getEvidenceFoldersByAssessment_assessmentId,

    -- * Destructuring the Response
    GetEvidenceFoldersByAssessmentResponse (..),
    newGetEvidenceFoldersByAssessmentResponse,

    -- * Response Lenses
    getEvidenceFoldersByAssessmentResponse_nextToken,
    getEvidenceFoldersByAssessmentResponse_evidenceFolders,
    getEvidenceFoldersByAssessmentResponse_httpStatus,
  )
where

import Amazonka.AuditManager.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:/ 'newGetEvidenceFoldersByAssessment' smart constructor.
data GetEvidenceFoldersByAssessment = GetEvidenceFoldersByAssessment'
  { -- | The pagination token used to fetch the next set of results.
    GetEvidenceFoldersByAssessment -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Represents the maximum number of results per page, or per API request
    -- call.
    GetEvidenceFoldersByAssessment -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier for the specified assessment.
    GetEvidenceFoldersByAssessment -> Text
assessmentId :: Prelude.Text
  }
  deriving (GetEvidenceFoldersByAssessment
-> GetEvidenceFoldersByAssessment -> Bool
(GetEvidenceFoldersByAssessment
 -> GetEvidenceFoldersByAssessment -> Bool)
-> (GetEvidenceFoldersByAssessment
    -> GetEvidenceFoldersByAssessment -> Bool)
-> Eq GetEvidenceFoldersByAssessment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEvidenceFoldersByAssessment
-> GetEvidenceFoldersByAssessment -> Bool
$c/= :: GetEvidenceFoldersByAssessment
-> GetEvidenceFoldersByAssessment -> Bool
== :: GetEvidenceFoldersByAssessment
-> GetEvidenceFoldersByAssessment -> Bool
$c== :: GetEvidenceFoldersByAssessment
-> GetEvidenceFoldersByAssessment -> Bool
Prelude.Eq, ReadPrec [GetEvidenceFoldersByAssessment]
ReadPrec GetEvidenceFoldersByAssessment
Int -> ReadS GetEvidenceFoldersByAssessment
ReadS [GetEvidenceFoldersByAssessment]
(Int -> ReadS GetEvidenceFoldersByAssessment)
-> ReadS [GetEvidenceFoldersByAssessment]
-> ReadPrec GetEvidenceFoldersByAssessment
-> ReadPrec [GetEvidenceFoldersByAssessment]
-> Read GetEvidenceFoldersByAssessment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEvidenceFoldersByAssessment]
$creadListPrec :: ReadPrec [GetEvidenceFoldersByAssessment]
readPrec :: ReadPrec GetEvidenceFoldersByAssessment
$creadPrec :: ReadPrec GetEvidenceFoldersByAssessment
readList :: ReadS [GetEvidenceFoldersByAssessment]
$creadList :: ReadS [GetEvidenceFoldersByAssessment]
readsPrec :: Int -> ReadS GetEvidenceFoldersByAssessment
$creadsPrec :: Int -> ReadS GetEvidenceFoldersByAssessment
Prelude.Read, Int -> GetEvidenceFoldersByAssessment -> ShowS
[GetEvidenceFoldersByAssessment] -> ShowS
GetEvidenceFoldersByAssessment -> String
(Int -> GetEvidenceFoldersByAssessment -> ShowS)
-> (GetEvidenceFoldersByAssessment -> String)
-> ([GetEvidenceFoldersByAssessment] -> ShowS)
-> Show GetEvidenceFoldersByAssessment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEvidenceFoldersByAssessment] -> ShowS
$cshowList :: [GetEvidenceFoldersByAssessment] -> ShowS
show :: GetEvidenceFoldersByAssessment -> String
$cshow :: GetEvidenceFoldersByAssessment -> String
showsPrec :: Int -> GetEvidenceFoldersByAssessment -> ShowS
$cshowsPrec :: Int -> GetEvidenceFoldersByAssessment -> ShowS
Prelude.Show, (forall x.
 GetEvidenceFoldersByAssessment
 -> Rep GetEvidenceFoldersByAssessment x)
-> (forall x.
    Rep GetEvidenceFoldersByAssessment x
    -> GetEvidenceFoldersByAssessment)
-> Generic GetEvidenceFoldersByAssessment
forall x.
Rep GetEvidenceFoldersByAssessment x
-> GetEvidenceFoldersByAssessment
forall x.
GetEvidenceFoldersByAssessment
-> Rep GetEvidenceFoldersByAssessment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetEvidenceFoldersByAssessment x
-> GetEvidenceFoldersByAssessment
$cfrom :: forall x.
GetEvidenceFoldersByAssessment
-> Rep GetEvidenceFoldersByAssessment x
Prelude.Generic)

-- |
-- Create a value of 'GetEvidenceFoldersByAssessment' 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', 'getEvidenceFoldersByAssessment_nextToken' - The pagination token used to fetch the next set of results.
--
-- 'maxResults', 'getEvidenceFoldersByAssessment_maxResults' - Represents the maximum number of results per page, or per API request
-- call.
--
-- 'assessmentId', 'getEvidenceFoldersByAssessment_assessmentId' - The identifier for the specified assessment.
newGetEvidenceFoldersByAssessment ::
  -- | 'assessmentId'
  Prelude.Text ->
  GetEvidenceFoldersByAssessment
newGetEvidenceFoldersByAssessment :: Text -> GetEvidenceFoldersByAssessment
newGetEvidenceFoldersByAssessment Text
pAssessmentId_ =
  GetEvidenceFoldersByAssessment' :: Maybe Text
-> Maybe Natural -> Text -> GetEvidenceFoldersByAssessment
GetEvidenceFoldersByAssessment'
    { $sel:nextToken:GetEvidenceFoldersByAssessment' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetEvidenceFoldersByAssessment' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:assessmentId:GetEvidenceFoldersByAssessment' :: Text
assessmentId = Text
pAssessmentId_
    }

-- | The pagination token used to fetch the next set of results.
getEvidenceFoldersByAssessment_nextToken :: Lens.Lens' GetEvidenceFoldersByAssessment (Prelude.Maybe Prelude.Text)
getEvidenceFoldersByAssessment_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetEvidenceFoldersByAssessment
-> f GetEvidenceFoldersByAssessment
getEvidenceFoldersByAssessment_nextToken = (GetEvidenceFoldersByAssessment -> Maybe Text)
-> (GetEvidenceFoldersByAssessment
    -> Maybe Text -> GetEvidenceFoldersByAssessment)
-> Lens
     GetEvidenceFoldersByAssessment
     GetEvidenceFoldersByAssessment
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvidenceFoldersByAssessment' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetEvidenceFoldersByAssessment' :: GetEvidenceFoldersByAssessment -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetEvidenceFoldersByAssessment
s@GetEvidenceFoldersByAssessment' {} Maybe Text
a -> GetEvidenceFoldersByAssessment
s {$sel:nextToken:GetEvidenceFoldersByAssessment' :: Maybe Text
nextToken = Maybe Text
a} :: GetEvidenceFoldersByAssessment)

-- | Represents the maximum number of results per page, or per API request
-- call.
getEvidenceFoldersByAssessment_maxResults :: Lens.Lens' GetEvidenceFoldersByAssessment (Prelude.Maybe Prelude.Natural)
getEvidenceFoldersByAssessment_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetEvidenceFoldersByAssessment
-> f GetEvidenceFoldersByAssessment
getEvidenceFoldersByAssessment_maxResults = (GetEvidenceFoldersByAssessment -> Maybe Natural)
-> (GetEvidenceFoldersByAssessment
    -> Maybe Natural -> GetEvidenceFoldersByAssessment)
-> Lens
     GetEvidenceFoldersByAssessment
     GetEvidenceFoldersByAssessment
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvidenceFoldersByAssessment' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetEvidenceFoldersByAssessment' :: GetEvidenceFoldersByAssessment -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetEvidenceFoldersByAssessment
s@GetEvidenceFoldersByAssessment' {} Maybe Natural
a -> GetEvidenceFoldersByAssessment
s {$sel:maxResults:GetEvidenceFoldersByAssessment' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetEvidenceFoldersByAssessment)

-- | The identifier for the specified assessment.
getEvidenceFoldersByAssessment_assessmentId :: Lens.Lens' GetEvidenceFoldersByAssessment Prelude.Text
getEvidenceFoldersByAssessment_assessmentId :: (Text -> f Text)
-> GetEvidenceFoldersByAssessment
-> f GetEvidenceFoldersByAssessment
getEvidenceFoldersByAssessment_assessmentId = (GetEvidenceFoldersByAssessment -> Text)
-> (GetEvidenceFoldersByAssessment
    -> Text -> GetEvidenceFoldersByAssessment)
-> Lens
     GetEvidenceFoldersByAssessment
     GetEvidenceFoldersByAssessment
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvidenceFoldersByAssessment' {Text
assessmentId :: Text
$sel:assessmentId:GetEvidenceFoldersByAssessment' :: GetEvidenceFoldersByAssessment -> Text
assessmentId} -> Text
assessmentId) (\s :: GetEvidenceFoldersByAssessment
s@GetEvidenceFoldersByAssessment' {} Text
a -> GetEvidenceFoldersByAssessment
s {$sel:assessmentId:GetEvidenceFoldersByAssessment' :: Text
assessmentId = Text
a} :: GetEvidenceFoldersByAssessment)

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

instance
  Prelude.NFData
    GetEvidenceFoldersByAssessment

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

instance Core.ToQuery GetEvidenceFoldersByAssessment where
  toQuery :: GetEvidenceFoldersByAssessment -> QueryString
toQuery GetEvidenceFoldersByAssessment' {Maybe Natural
Maybe Text
Text
assessmentId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:assessmentId:GetEvidenceFoldersByAssessment' :: GetEvidenceFoldersByAssessment -> Text
$sel:maxResults:GetEvidenceFoldersByAssessment' :: GetEvidenceFoldersByAssessment -> Maybe Natural
$sel:nextToken:GetEvidenceFoldersByAssessment' :: GetEvidenceFoldersByAssessment -> 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:/ 'newGetEvidenceFoldersByAssessmentResponse' smart constructor.
data GetEvidenceFoldersByAssessmentResponse = GetEvidenceFoldersByAssessmentResponse'
  { -- | The pagination token used to fetch the next set of results.
    GetEvidenceFoldersByAssessmentResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The list of evidence folders returned by the
    -- @GetEvidenceFoldersByAssessment@ API.
    GetEvidenceFoldersByAssessmentResponse
-> Maybe [AssessmentEvidenceFolder]
evidenceFolders :: Prelude.Maybe [AssessmentEvidenceFolder],
    -- | The response's http status code.
    GetEvidenceFoldersByAssessmentResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetEvidenceFoldersByAssessmentResponse
-> GetEvidenceFoldersByAssessmentResponse -> Bool
(GetEvidenceFoldersByAssessmentResponse
 -> GetEvidenceFoldersByAssessmentResponse -> Bool)
-> (GetEvidenceFoldersByAssessmentResponse
    -> GetEvidenceFoldersByAssessmentResponse -> Bool)
-> Eq GetEvidenceFoldersByAssessmentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetEvidenceFoldersByAssessmentResponse
-> GetEvidenceFoldersByAssessmentResponse -> Bool
$c/= :: GetEvidenceFoldersByAssessmentResponse
-> GetEvidenceFoldersByAssessmentResponse -> Bool
== :: GetEvidenceFoldersByAssessmentResponse
-> GetEvidenceFoldersByAssessmentResponse -> Bool
$c== :: GetEvidenceFoldersByAssessmentResponse
-> GetEvidenceFoldersByAssessmentResponse -> Bool
Prelude.Eq, ReadPrec [GetEvidenceFoldersByAssessmentResponse]
ReadPrec GetEvidenceFoldersByAssessmentResponse
Int -> ReadS GetEvidenceFoldersByAssessmentResponse
ReadS [GetEvidenceFoldersByAssessmentResponse]
(Int -> ReadS GetEvidenceFoldersByAssessmentResponse)
-> ReadS [GetEvidenceFoldersByAssessmentResponse]
-> ReadPrec GetEvidenceFoldersByAssessmentResponse
-> ReadPrec [GetEvidenceFoldersByAssessmentResponse]
-> Read GetEvidenceFoldersByAssessmentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetEvidenceFoldersByAssessmentResponse]
$creadListPrec :: ReadPrec [GetEvidenceFoldersByAssessmentResponse]
readPrec :: ReadPrec GetEvidenceFoldersByAssessmentResponse
$creadPrec :: ReadPrec GetEvidenceFoldersByAssessmentResponse
readList :: ReadS [GetEvidenceFoldersByAssessmentResponse]
$creadList :: ReadS [GetEvidenceFoldersByAssessmentResponse]
readsPrec :: Int -> ReadS GetEvidenceFoldersByAssessmentResponse
$creadsPrec :: Int -> ReadS GetEvidenceFoldersByAssessmentResponse
Prelude.Read, Int -> GetEvidenceFoldersByAssessmentResponse -> ShowS
[GetEvidenceFoldersByAssessmentResponse] -> ShowS
GetEvidenceFoldersByAssessmentResponse -> String
(Int -> GetEvidenceFoldersByAssessmentResponse -> ShowS)
-> (GetEvidenceFoldersByAssessmentResponse -> String)
-> ([GetEvidenceFoldersByAssessmentResponse] -> ShowS)
-> Show GetEvidenceFoldersByAssessmentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetEvidenceFoldersByAssessmentResponse] -> ShowS
$cshowList :: [GetEvidenceFoldersByAssessmentResponse] -> ShowS
show :: GetEvidenceFoldersByAssessmentResponse -> String
$cshow :: GetEvidenceFoldersByAssessmentResponse -> String
showsPrec :: Int -> GetEvidenceFoldersByAssessmentResponse -> ShowS
$cshowsPrec :: Int -> GetEvidenceFoldersByAssessmentResponse -> ShowS
Prelude.Show, (forall x.
 GetEvidenceFoldersByAssessmentResponse
 -> Rep GetEvidenceFoldersByAssessmentResponse x)
-> (forall x.
    Rep GetEvidenceFoldersByAssessmentResponse x
    -> GetEvidenceFoldersByAssessmentResponse)
-> Generic GetEvidenceFoldersByAssessmentResponse
forall x.
Rep GetEvidenceFoldersByAssessmentResponse x
-> GetEvidenceFoldersByAssessmentResponse
forall x.
GetEvidenceFoldersByAssessmentResponse
-> Rep GetEvidenceFoldersByAssessmentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetEvidenceFoldersByAssessmentResponse x
-> GetEvidenceFoldersByAssessmentResponse
$cfrom :: forall x.
GetEvidenceFoldersByAssessmentResponse
-> Rep GetEvidenceFoldersByAssessmentResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetEvidenceFoldersByAssessmentResponse' 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', 'getEvidenceFoldersByAssessmentResponse_nextToken' - The pagination token used to fetch the next set of results.
--
-- 'evidenceFolders', 'getEvidenceFoldersByAssessmentResponse_evidenceFolders' - The list of evidence folders returned by the
-- @GetEvidenceFoldersByAssessment@ API.
--
-- 'httpStatus', 'getEvidenceFoldersByAssessmentResponse_httpStatus' - The response's http status code.
newGetEvidenceFoldersByAssessmentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetEvidenceFoldersByAssessmentResponse
newGetEvidenceFoldersByAssessmentResponse :: Int -> GetEvidenceFoldersByAssessmentResponse
newGetEvidenceFoldersByAssessmentResponse
  Int
pHttpStatus_ =
    GetEvidenceFoldersByAssessmentResponse' :: Maybe Text
-> Maybe [AssessmentEvidenceFolder]
-> Int
-> GetEvidenceFoldersByAssessmentResponse
GetEvidenceFoldersByAssessmentResponse'
      { $sel:nextToken:GetEvidenceFoldersByAssessmentResponse' :: Maybe Text
nextToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:evidenceFolders:GetEvidenceFoldersByAssessmentResponse' :: Maybe [AssessmentEvidenceFolder]
evidenceFolders = Maybe [AssessmentEvidenceFolder]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetEvidenceFoldersByAssessmentResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The pagination token used to fetch the next set of results.
getEvidenceFoldersByAssessmentResponse_nextToken :: Lens.Lens' GetEvidenceFoldersByAssessmentResponse (Prelude.Maybe Prelude.Text)
getEvidenceFoldersByAssessmentResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetEvidenceFoldersByAssessmentResponse
-> f GetEvidenceFoldersByAssessmentResponse
getEvidenceFoldersByAssessmentResponse_nextToken = (GetEvidenceFoldersByAssessmentResponse -> Maybe Text)
-> (GetEvidenceFoldersByAssessmentResponse
    -> Maybe Text -> GetEvidenceFoldersByAssessmentResponse)
-> Lens
     GetEvidenceFoldersByAssessmentResponse
     GetEvidenceFoldersByAssessmentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvidenceFoldersByAssessmentResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetEvidenceFoldersByAssessmentResponse' :: GetEvidenceFoldersByAssessmentResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetEvidenceFoldersByAssessmentResponse
s@GetEvidenceFoldersByAssessmentResponse' {} Maybe Text
a -> GetEvidenceFoldersByAssessmentResponse
s {$sel:nextToken:GetEvidenceFoldersByAssessmentResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetEvidenceFoldersByAssessmentResponse)

-- | The list of evidence folders returned by the
-- @GetEvidenceFoldersByAssessment@ API.
getEvidenceFoldersByAssessmentResponse_evidenceFolders :: Lens.Lens' GetEvidenceFoldersByAssessmentResponse (Prelude.Maybe [AssessmentEvidenceFolder])
getEvidenceFoldersByAssessmentResponse_evidenceFolders :: (Maybe [AssessmentEvidenceFolder]
 -> f (Maybe [AssessmentEvidenceFolder]))
-> GetEvidenceFoldersByAssessmentResponse
-> f GetEvidenceFoldersByAssessmentResponse
getEvidenceFoldersByAssessmentResponse_evidenceFolders = (GetEvidenceFoldersByAssessmentResponse
 -> Maybe [AssessmentEvidenceFolder])
-> (GetEvidenceFoldersByAssessmentResponse
    -> Maybe [AssessmentEvidenceFolder]
    -> GetEvidenceFoldersByAssessmentResponse)
-> Lens
     GetEvidenceFoldersByAssessmentResponse
     GetEvidenceFoldersByAssessmentResponse
     (Maybe [AssessmentEvidenceFolder])
     (Maybe [AssessmentEvidenceFolder])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetEvidenceFoldersByAssessmentResponse' {Maybe [AssessmentEvidenceFolder]
evidenceFolders :: Maybe [AssessmentEvidenceFolder]
$sel:evidenceFolders:GetEvidenceFoldersByAssessmentResponse' :: GetEvidenceFoldersByAssessmentResponse
-> Maybe [AssessmentEvidenceFolder]
evidenceFolders} -> Maybe [AssessmentEvidenceFolder]
evidenceFolders) (\s :: GetEvidenceFoldersByAssessmentResponse
s@GetEvidenceFoldersByAssessmentResponse' {} Maybe [AssessmentEvidenceFolder]
a -> GetEvidenceFoldersByAssessmentResponse
s {$sel:evidenceFolders:GetEvidenceFoldersByAssessmentResponse' :: Maybe [AssessmentEvidenceFolder]
evidenceFolders = Maybe [AssessmentEvidenceFolder]
a} :: GetEvidenceFoldersByAssessmentResponse) ((Maybe [AssessmentEvidenceFolder]
  -> f (Maybe [AssessmentEvidenceFolder]))
 -> GetEvidenceFoldersByAssessmentResponse
 -> f GetEvidenceFoldersByAssessmentResponse)
-> ((Maybe [AssessmentEvidenceFolder]
     -> f (Maybe [AssessmentEvidenceFolder]))
    -> Maybe [AssessmentEvidenceFolder]
    -> f (Maybe [AssessmentEvidenceFolder]))
-> (Maybe [AssessmentEvidenceFolder]
    -> f (Maybe [AssessmentEvidenceFolder]))
-> GetEvidenceFoldersByAssessmentResponse
-> f GetEvidenceFoldersByAssessmentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AssessmentEvidenceFolder]
  [AssessmentEvidenceFolder]
  [AssessmentEvidenceFolder]
  [AssessmentEvidenceFolder]
-> Iso
     (Maybe [AssessmentEvidenceFolder])
     (Maybe [AssessmentEvidenceFolder])
     (Maybe [AssessmentEvidenceFolder])
     (Maybe [AssessmentEvidenceFolder])
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
  [AssessmentEvidenceFolder]
  [AssessmentEvidenceFolder]
  [AssessmentEvidenceFolder]
  [AssessmentEvidenceFolder]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    GetEvidenceFoldersByAssessmentResponse