{-# 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.WellArchitected.ListAnswers
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- List of answers.
module Amazonka.WellArchitected.ListAnswers
  ( -- * Creating a Request
    ListAnswers (..),
    newListAnswers,

    -- * Request Lenses
    listAnswers_maxResults,
    listAnswers_milestoneNumber,
    listAnswers_nextToken,
    listAnswers_pillarId,
    listAnswers_workloadId,
    listAnswers_lensAlias,

    -- * Destructuring the Response
    ListAnswersResponse (..),
    newListAnswersResponse,

    -- * Response Lenses
    listAnswersResponse_answerSummaries,
    listAnswersResponse_lensAlias,
    listAnswersResponse_lensArn,
    listAnswersResponse_milestoneNumber,
    listAnswersResponse_nextToken,
    listAnswersResponse_workloadId,
    listAnswersResponse_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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WellArchitected.Types

-- | Input to list answers.
--
-- /See:/ 'newListAnswers' smart constructor.
data ListAnswers = ListAnswers'
  { -- | The maximum number of results to return for this request.
    ListAnswers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    ListAnswers -> Maybe Natural
milestoneNumber :: Prelude.Maybe Prelude.Natural,
    ListAnswers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    ListAnswers -> Maybe Text
pillarId :: Prelude.Maybe Prelude.Text,
    ListAnswers -> Text
workloadId :: Prelude.Text,
    ListAnswers -> Text
lensAlias :: Prelude.Text
  }
  deriving (ListAnswers -> ListAnswers -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAnswers -> ListAnswers -> Bool
$c/= :: ListAnswers -> ListAnswers -> Bool
== :: ListAnswers -> ListAnswers -> Bool
$c== :: ListAnswers -> ListAnswers -> Bool
Prelude.Eq, ReadPrec [ListAnswers]
ReadPrec ListAnswers
Int -> ReadS ListAnswers
ReadS [ListAnswers]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAnswers]
$creadListPrec :: ReadPrec [ListAnswers]
readPrec :: ReadPrec ListAnswers
$creadPrec :: ReadPrec ListAnswers
readList :: ReadS [ListAnswers]
$creadList :: ReadS [ListAnswers]
readsPrec :: Int -> ReadS ListAnswers
$creadsPrec :: Int -> ReadS ListAnswers
Prelude.Read, Int -> ListAnswers -> ShowS
[ListAnswers] -> ShowS
ListAnswers -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAnswers] -> ShowS
$cshowList :: [ListAnswers] -> ShowS
show :: ListAnswers -> String
$cshow :: ListAnswers -> String
showsPrec :: Int -> ListAnswers -> ShowS
$cshowsPrec :: Int -> ListAnswers -> ShowS
Prelude.Show, forall x. Rep ListAnswers x -> ListAnswers
forall x. ListAnswers -> Rep ListAnswers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAnswers x -> ListAnswers
$cfrom :: forall x. ListAnswers -> Rep ListAnswers x
Prelude.Generic)

-- |
-- Create a value of 'ListAnswers' 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', 'listAnswers_maxResults' - The maximum number of results to return for this request.
--
-- 'milestoneNumber', 'listAnswers_milestoneNumber' - Undocumented member.
--
-- 'nextToken', 'listAnswers_nextToken' - Undocumented member.
--
-- 'pillarId', 'listAnswers_pillarId' - Undocumented member.
--
-- 'workloadId', 'listAnswers_workloadId' - Undocumented member.
--
-- 'lensAlias', 'listAnswers_lensAlias' - Undocumented member.
newListAnswers ::
  -- | 'workloadId'
  Prelude.Text ->
  -- | 'lensAlias'
  Prelude.Text ->
  ListAnswers
newListAnswers :: Text -> Text -> ListAnswers
newListAnswers Text
pWorkloadId_ Text
pLensAlias_ =
  ListAnswers'
    { $sel:maxResults:ListAnswers' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:milestoneNumber:ListAnswers' :: Maybe Natural
milestoneNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAnswers' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:pillarId:ListAnswers' :: Maybe Text
pillarId = forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:ListAnswers' :: Text
workloadId = Text
pWorkloadId_,
      $sel:lensAlias:ListAnswers' :: Text
lensAlias = Text
pLensAlias_
    }

-- | The maximum number of results to return for this request.
listAnswers_maxResults :: Lens.Lens' ListAnswers (Prelude.Maybe Prelude.Natural)
listAnswers_maxResults :: Lens' ListAnswers (Maybe Natural)
listAnswers_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAnswers' :: ListAnswers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAnswers
s@ListAnswers' {} Maybe Natural
a -> ListAnswers
s {$sel:maxResults:ListAnswers' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAnswers)

-- | Undocumented member.
listAnswers_milestoneNumber :: Lens.Lens' ListAnswers (Prelude.Maybe Prelude.Natural)
listAnswers_milestoneNumber :: Lens' ListAnswers (Maybe Natural)
listAnswers_milestoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswers' {Maybe Natural
milestoneNumber :: Maybe Natural
$sel:milestoneNumber:ListAnswers' :: ListAnswers -> Maybe Natural
milestoneNumber} -> Maybe Natural
milestoneNumber) (\s :: ListAnswers
s@ListAnswers' {} Maybe Natural
a -> ListAnswers
s {$sel:milestoneNumber:ListAnswers' :: Maybe Natural
milestoneNumber = Maybe Natural
a} :: ListAnswers)

-- | Undocumented member.
listAnswers_nextToken :: Lens.Lens' ListAnswers (Prelude.Maybe Prelude.Text)
listAnswers_nextToken :: Lens' ListAnswers (Maybe Text)
listAnswers_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAnswers' :: ListAnswers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAnswers
s@ListAnswers' {} Maybe Text
a -> ListAnswers
s {$sel:nextToken:ListAnswers' :: Maybe Text
nextToken = Maybe Text
a} :: ListAnswers)

-- | Undocumented member.
listAnswers_pillarId :: Lens.Lens' ListAnswers (Prelude.Maybe Prelude.Text)
listAnswers_pillarId :: Lens' ListAnswers (Maybe Text)
listAnswers_pillarId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswers' {Maybe Text
pillarId :: Maybe Text
$sel:pillarId:ListAnswers' :: ListAnswers -> Maybe Text
pillarId} -> Maybe Text
pillarId) (\s :: ListAnswers
s@ListAnswers' {} Maybe Text
a -> ListAnswers
s {$sel:pillarId:ListAnswers' :: Maybe Text
pillarId = Maybe Text
a} :: ListAnswers)

-- | Undocumented member.
listAnswers_workloadId :: Lens.Lens' ListAnswers Prelude.Text
listAnswers_workloadId :: Lens' ListAnswers Text
listAnswers_workloadId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswers' {Text
workloadId :: Text
$sel:workloadId:ListAnswers' :: ListAnswers -> Text
workloadId} -> Text
workloadId) (\s :: ListAnswers
s@ListAnswers' {} Text
a -> ListAnswers
s {$sel:workloadId:ListAnswers' :: Text
workloadId = Text
a} :: ListAnswers)

-- | Undocumented member.
listAnswers_lensAlias :: Lens.Lens' ListAnswers Prelude.Text
listAnswers_lensAlias :: Lens' ListAnswers Text
listAnswers_lensAlias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswers' {Text
lensAlias :: Text
$sel:lensAlias:ListAnswers' :: ListAnswers -> Text
lensAlias} -> Text
lensAlias) (\s :: ListAnswers
s@ListAnswers' {} Text
a -> ListAnswers
s {$sel:lensAlias:ListAnswers' :: Text
lensAlias = Text
a} :: ListAnswers)

instance Core.AWSRequest ListAnswers where
  type AWSResponse ListAnswers = ListAnswersResponse
  request :: (Service -> Service) -> ListAnswers -> Request ListAnswers
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAnswers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListAnswers)))
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 [AnswerSummary]
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Int
-> ListAnswersResponse
ListAnswersResponse'
            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
"AnswerSummaries"
                            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.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LensAlias")
            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
"LensArn")
            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
"MilestoneNumber")
            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
"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
"WorkloadId")
            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 ListAnswers where
  hashWithSalt :: Int -> ListAnswers -> Int
hashWithSalt Int
_salt ListAnswers' {Maybe Natural
Maybe Text
Text
lensAlias :: Text
workloadId :: Text
pillarId :: Maybe Text
nextToken :: Maybe Text
milestoneNumber :: Maybe Natural
maxResults :: Maybe Natural
$sel:lensAlias:ListAnswers' :: ListAnswers -> Text
$sel:workloadId:ListAnswers' :: ListAnswers -> Text
$sel:pillarId:ListAnswers' :: ListAnswers -> Maybe Text
$sel:nextToken:ListAnswers' :: ListAnswers -> Maybe Text
$sel:milestoneNumber:ListAnswers' :: ListAnswers -> Maybe Natural
$sel:maxResults:ListAnswers' :: ListAnswers -> 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 Natural
milestoneNumber
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
pillarId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
workloadId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
lensAlias

instance Prelude.NFData ListAnswers where
  rnf :: ListAnswers -> ()
rnf ListAnswers' {Maybe Natural
Maybe Text
Text
lensAlias :: Text
workloadId :: Text
pillarId :: Maybe Text
nextToken :: Maybe Text
milestoneNumber :: Maybe Natural
maxResults :: Maybe Natural
$sel:lensAlias:ListAnswers' :: ListAnswers -> Text
$sel:workloadId:ListAnswers' :: ListAnswers -> Text
$sel:pillarId:ListAnswers' :: ListAnswers -> Maybe Text
$sel:nextToken:ListAnswers' :: ListAnswers -> Maybe Text
$sel:milestoneNumber:ListAnswers' :: ListAnswers -> Maybe Natural
$sel:maxResults:ListAnswers' :: ListAnswers -> 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 Natural
milestoneNumber
      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 Text
pillarId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
workloadId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lensAlias

instance Data.ToHeaders ListAnswers where
  toHeaders :: ListAnswers -> 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.ToPath ListAnswers where
  toPath :: ListAnswers -> ByteString
toPath ListAnswers' {Maybe Natural
Maybe Text
Text
lensAlias :: Text
workloadId :: Text
pillarId :: Maybe Text
nextToken :: Maybe Text
milestoneNumber :: Maybe Natural
maxResults :: Maybe Natural
$sel:lensAlias:ListAnswers' :: ListAnswers -> Text
$sel:workloadId:ListAnswers' :: ListAnswers -> Text
$sel:pillarId:ListAnswers' :: ListAnswers -> Maybe Text
$sel:nextToken:ListAnswers' :: ListAnswers -> Maybe Text
$sel:milestoneNumber:ListAnswers' :: ListAnswers -> Maybe Natural
$sel:maxResults:ListAnswers' :: ListAnswers -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/workloads/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
workloadId,
        ByteString
"/lensReviews/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
lensAlias,
        ByteString
"/answers"
      ]

instance Data.ToQuery ListAnswers where
  toQuery :: ListAnswers -> QueryString
toQuery ListAnswers' {Maybe Natural
Maybe Text
Text
lensAlias :: Text
workloadId :: Text
pillarId :: Maybe Text
nextToken :: Maybe Text
milestoneNumber :: Maybe Natural
maxResults :: Maybe Natural
$sel:lensAlias:ListAnswers' :: ListAnswers -> Text
$sel:workloadId:ListAnswers' :: ListAnswers -> Text
$sel:pillarId:ListAnswers' :: ListAnswers -> Maybe Text
$sel:nextToken:ListAnswers' :: ListAnswers -> Maybe Text
$sel:milestoneNumber:ListAnswers' :: ListAnswers -> Maybe Natural
$sel:maxResults:ListAnswers' :: ListAnswers -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"MilestoneNumber" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
milestoneNumber,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"PillarId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
pillarId
      ]

-- | Output of a list answers call.
--
-- /See:/ 'newListAnswersResponse' smart constructor.
data ListAnswersResponse = ListAnswersResponse'
  { ListAnswersResponse -> Maybe [AnswerSummary]
answerSummaries :: Prelude.Maybe [AnswerSummary],
    ListAnswersResponse -> Maybe Text
lensAlias :: Prelude.Maybe Prelude.Text,
    -- | The ARN for the lens.
    ListAnswersResponse -> Maybe Text
lensArn :: Prelude.Maybe Prelude.Text,
    ListAnswersResponse -> Maybe Natural
milestoneNumber :: Prelude.Maybe Prelude.Natural,
    ListAnswersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    ListAnswersResponse -> Maybe Text
workloadId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAnswersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListAnswersResponse -> ListAnswersResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAnswersResponse -> ListAnswersResponse -> Bool
$c/= :: ListAnswersResponse -> ListAnswersResponse -> Bool
== :: ListAnswersResponse -> ListAnswersResponse -> Bool
$c== :: ListAnswersResponse -> ListAnswersResponse -> Bool
Prelude.Eq, ReadPrec [ListAnswersResponse]
ReadPrec ListAnswersResponse
Int -> ReadS ListAnswersResponse
ReadS [ListAnswersResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAnswersResponse]
$creadListPrec :: ReadPrec [ListAnswersResponse]
readPrec :: ReadPrec ListAnswersResponse
$creadPrec :: ReadPrec ListAnswersResponse
readList :: ReadS [ListAnswersResponse]
$creadList :: ReadS [ListAnswersResponse]
readsPrec :: Int -> ReadS ListAnswersResponse
$creadsPrec :: Int -> ReadS ListAnswersResponse
Prelude.Read, Int -> ListAnswersResponse -> ShowS
[ListAnswersResponse] -> ShowS
ListAnswersResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAnswersResponse] -> ShowS
$cshowList :: [ListAnswersResponse] -> ShowS
show :: ListAnswersResponse -> String
$cshow :: ListAnswersResponse -> String
showsPrec :: Int -> ListAnswersResponse -> ShowS
$cshowsPrec :: Int -> ListAnswersResponse -> ShowS
Prelude.Show, forall x. Rep ListAnswersResponse x -> ListAnswersResponse
forall x. ListAnswersResponse -> Rep ListAnswersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAnswersResponse x -> ListAnswersResponse
$cfrom :: forall x. ListAnswersResponse -> Rep ListAnswersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAnswersResponse' 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:
--
-- 'answerSummaries', 'listAnswersResponse_answerSummaries' - Undocumented member.
--
-- 'lensAlias', 'listAnswersResponse_lensAlias' - Undocumented member.
--
-- 'lensArn', 'listAnswersResponse_lensArn' - The ARN for the lens.
--
-- 'milestoneNumber', 'listAnswersResponse_milestoneNumber' - Undocumented member.
--
-- 'nextToken', 'listAnswersResponse_nextToken' - Undocumented member.
--
-- 'workloadId', 'listAnswersResponse_workloadId' - Undocumented member.
--
-- 'httpStatus', 'listAnswersResponse_httpStatus' - The response's http status code.
newListAnswersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAnswersResponse
newListAnswersResponse :: Int -> ListAnswersResponse
newListAnswersResponse Int
pHttpStatus_ =
  ListAnswersResponse'
    { $sel:answerSummaries:ListAnswersResponse' :: Maybe [AnswerSummary]
answerSummaries =
        forall a. Maybe a
Prelude.Nothing,
      $sel:lensAlias:ListAnswersResponse' :: Maybe Text
lensAlias = forall a. Maybe a
Prelude.Nothing,
      $sel:lensArn:ListAnswersResponse' :: Maybe Text
lensArn = forall a. Maybe a
Prelude.Nothing,
      $sel:milestoneNumber:ListAnswersResponse' :: Maybe Natural
milestoneNumber = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAnswersResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:ListAnswersResponse' :: Maybe Text
workloadId = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAnswersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
listAnswersResponse_answerSummaries :: Lens.Lens' ListAnswersResponse (Prelude.Maybe [AnswerSummary])
listAnswersResponse_answerSummaries :: Lens' ListAnswersResponse (Maybe [AnswerSummary])
listAnswersResponse_answerSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswersResponse' {Maybe [AnswerSummary]
answerSummaries :: Maybe [AnswerSummary]
$sel:answerSummaries:ListAnswersResponse' :: ListAnswersResponse -> Maybe [AnswerSummary]
answerSummaries} -> Maybe [AnswerSummary]
answerSummaries) (\s :: ListAnswersResponse
s@ListAnswersResponse' {} Maybe [AnswerSummary]
a -> ListAnswersResponse
s {$sel:answerSummaries:ListAnswersResponse' :: Maybe [AnswerSummary]
answerSummaries = Maybe [AnswerSummary]
a} :: ListAnswersResponse) 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

-- | Undocumented member.
listAnswersResponse_lensAlias :: Lens.Lens' ListAnswersResponse (Prelude.Maybe Prelude.Text)
listAnswersResponse_lensAlias :: Lens' ListAnswersResponse (Maybe Text)
listAnswersResponse_lensAlias = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswersResponse' {Maybe Text
lensAlias :: Maybe Text
$sel:lensAlias:ListAnswersResponse' :: ListAnswersResponse -> Maybe Text
lensAlias} -> Maybe Text
lensAlias) (\s :: ListAnswersResponse
s@ListAnswersResponse' {} Maybe Text
a -> ListAnswersResponse
s {$sel:lensAlias:ListAnswersResponse' :: Maybe Text
lensAlias = Maybe Text
a} :: ListAnswersResponse)

-- | The ARN for the lens.
listAnswersResponse_lensArn :: Lens.Lens' ListAnswersResponse (Prelude.Maybe Prelude.Text)
listAnswersResponse_lensArn :: Lens' ListAnswersResponse (Maybe Text)
listAnswersResponse_lensArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswersResponse' {Maybe Text
lensArn :: Maybe Text
$sel:lensArn:ListAnswersResponse' :: ListAnswersResponse -> Maybe Text
lensArn} -> Maybe Text
lensArn) (\s :: ListAnswersResponse
s@ListAnswersResponse' {} Maybe Text
a -> ListAnswersResponse
s {$sel:lensArn:ListAnswersResponse' :: Maybe Text
lensArn = Maybe Text
a} :: ListAnswersResponse)

-- | Undocumented member.
listAnswersResponse_milestoneNumber :: Lens.Lens' ListAnswersResponse (Prelude.Maybe Prelude.Natural)
listAnswersResponse_milestoneNumber :: Lens' ListAnswersResponse (Maybe Natural)
listAnswersResponse_milestoneNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswersResponse' {Maybe Natural
milestoneNumber :: Maybe Natural
$sel:milestoneNumber:ListAnswersResponse' :: ListAnswersResponse -> Maybe Natural
milestoneNumber} -> Maybe Natural
milestoneNumber) (\s :: ListAnswersResponse
s@ListAnswersResponse' {} Maybe Natural
a -> ListAnswersResponse
s {$sel:milestoneNumber:ListAnswersResponse' :: Maybe Natural
milestoneNumber = Maybe Natural
a} :: ListAnswersResponse)

-- | Undocumented member.
listAnswersResponse_nextToken :: Lens.Lens' ListAnswersResponse (Prelude.Maybe Prelude.Text)
listAnswersResponse_nextToken :: Lens' ListAnswersResponse (Maybe Text)
listAnswersResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAnswersResponse' :: ListAnswersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAnswersResponse
s@ListAnswersResponse' {} Maybe Text
a -> ListAnswersResponse
s {$sel:nextToken:ListAnswersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAnswersResponse)

-- | Undocumented member.
listAnswersResponse_workloadId :: Lens.Lens' ListAnswersResponse (Prelude.Maybe Prelude.Text)
listAnswersResponse_workloadId :: Lens' ListAnswersResponse (Maybe Text)
listAnswersResponse_workloadId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnswersResponse' {Maybe Text
workloadId :: Maybe Text
$sel:workloadId:ListAnswersResponse' :: ListAnswersResponse -> Maybe Text
workloadId} -> Maybe Text
workloadId) (\s :: ListAnswersResponse
s@ListAnswersResponse' {} Maybe Text
a -> ListAnswersResponse
s {$sel:workloadId:ListAnswersResponse' :: Maybe Text
workloadId = Maybe Text
a} :: ListAnswersResponse)

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

instance Prelude.NFData ListAnswersResponse where
  rnf :: ListAnswersResponse -> ()
rnf ListAnswersResponse' {Int
Maybe Natural
Maybe [AnswerSummary]
Maybe Text
httpStatus :: Int
workloadId :: Maybe Text
nextToken :: Maybe Text
milestoneNumber :: Maybe Natural
lensArn :: Maybe Text
lensAlias :: Maybe Text
answerSummaries :: Maybe [AnswerSummary]
$sel:httpStatus:ListAnswersResponse' :: ListAnswersResponse -> Int
$sel:workloadId:ListAnswersResponse' :: ListAnswersResponse -> Maybe Text
$sel:nextToken:ListAnswersResponse' :: ListAnswersResponse -> Maybe Text
$sel:milestoneNumber:ListAnswersResponse' :: ListAnswersResponse -> Maybe Natural
$sel:lensArn:ListAnswersResponse' :: ListAnswersResponse -> Maybe Text
$sel:lensAlias:ListAnswersResponse' :: ListAnswersResponse -> Maybe Text
$sel:answerSummaries:ListAnswersResponse' :: ListAnswersResponse -> Maybe [AnswerSummary]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [AnswerSummary]
answerSummaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lensAlias
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
lensArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
milestoneNumber
      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 Text
workloadId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus