{-# 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-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)
--
-- List of answers.
module Amazonka.WellArchitected.ListAnswers
  ( -- * Creating a Request
    ListAnswers (..),
    newListAnswers,

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

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

    -- * Response Lenses
    listAnswersResponse_lensAlias,
    listAnswersResponse_milestoneNumber,
    listAnswersResponse_nextToken,
    listAnswersResponse_workloadId,
    listAnswersResponse_answerSummaries,
    listAnswersResponse_httpStatus,
  )
where

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

-- | Input to list answers.
--
-- /See:/ 'newListAnswers' smart constructor.
data ListAnswers = ListAnswers'
  { ListAnswers -> Maybe Text
pillarId :: Prelude.Maybe Prelude.Text,
    ListAnswers -> Maybe Natural
milestoneNumber :: Prelude.Maybe Prelude.Natural,
    ListAnswers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return for this request.
    ListAnswers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    ListAnswers -> Text
workloadId :: Prelude.Text,
    ListAnswers -> Text
lensAlias :: Prelude.Text
  }
  deriving (ListAnswers -> ListAnswers -> Bool
(ListAnswers -> ListAnswers -> Bool)
-> (ListAnswers -> ListAnswers -> Bool) -> Eq ListAnswers
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]
(Int -> ReadS ListAnswers)
-> ReadS [ListAnswers]
-> ReadPrec ListAnswers
-> ReadPrec [ListAnswers]
-> Read 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
(Int -> ListAnswers -> ShowS)
-> (ListAnswers -> String)
-> ([ListAnswers] -> ShowS)
-> Show ListAnswers
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. ListAnswers -> Rep ListAnswers x)
-> (forall x. Rep ListAnswers x -> ListAnswers)
-> Generic ListAnswers
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:
--
-- 'pillarId', 'listAnswers_pillarId' - Undocumented member.
--
-- 'milestoneNumber', 'listAnswers_milestoneNumber' - Undocumented member.
--
-- 'nextToken', 'listAnswers_nextToken' - Undocumented member.
--
-- 'maxResults', 'listAnswers_maxResults' - The maximum number of results to return for this request.
--
-- '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' :: Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Natural
-> Text
-> Text
-> ListAnswers
ListAnswers'
    { $sel:pillarId:ListAnswers' :: Maybe Text
pillarId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:milestoneNumber:ListAnswers' :: Maybe Natural
milestoneNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAnswers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListAnswers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:ListAnswers' :: Text
workloadId = Text
pWorkloadId_,
      $sel:lensAlias:ListAnswers' :: Text
lensAlias = Text
pLensAlias_
    }

-- | Undocumented member.
listAnswers_pillarId :: Lens.Lens' ListAnswers (Prelude.Maybe Prelude.Text)
listAnswers_pillarId :: (Maybe Text -> f (Maybe Text)) -> ListAnswers -> f ListAnswers
listAnswers_pillarId = (ListAnswers -> Maybe Text)
-> (ListAnswers -> Maybe Text -> ListAnswers)
-> Lens ListAnswers ListAnswers (Maybe Text) (Maybe Text)
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_milestoneNumber :: Lens.Lens' ListAnswers (Prelude.Maybe Prelude.Natural)
listAnswers_milestoneNumber :: (Maybe Natural -> f (Maybe Natural))
-> ListAnswers -> f ListAnswers
listAnswers_milestoneNumber = (ListAnswers -> Maybe Natural)
-> (ListAnswers -> Maybe Natural -> ListAnswers)
-> Lens ListAnswers ListAnswers (Maybe Natural) (Maybe Natural)
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 :: (Maybe Text -> f (Maybe Text)) -> ListAnswers -> f ListAnswers
listAnswers_nextToken = (ListAnswers -> Maybe Text)
-> (ListAnswers -> Maybe Text -> ListAnswers)
-> Lens ListAnswers ListAnswers (Maybe Text) (Maybe Text)
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)

-- | The maximum number of results to return for this request.
listAnswers_maxResults :: Lens.Lens' ListAnswers (Prelude.Maybe Prelude.Natural)
listAnswers_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListAnswers -> f ListAnswers
listAnswers_maxResults = (ListAnswers -> Maybe Natural)
-> (ListAnswers -> Maybe Natural -> ListAnswers)
-> Lens ListAnswers ListAnswers (Maybe Natural) (Maybe Natural)
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_workloadId :: Lens.Lens' ListAnswers Prelude.Text
listAnswers_workloadId :: (Text -> f Text) -> ListAnswers -> f ListAnswers
listAnswers_workloadId = (ListAnswers -> Text)
-> (ListAnswers -> Text -> ListAnswers)
-> Lens ListAnswers ListAnswers Text Text
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 :: (Text -> f Text) -> ListAnswers -> f ListAnswers
listAnswers_lensAlias = (ListAnswers -> Text)
-> (ListAnswers -> Text -> ListAnswers)
-> Lens ListAnswers ListAnswers Text Text
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 :: ListAnswers -> Request ListAnswers
request = Service -> ListAnswers -> Request ListAnswers
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListAnswers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListAnswers)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListAnswers))
-> Logger
-> Service
-> Proxy ListAnswers
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListAnswers)))
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 Natural
-> Maybe Text
-> Maybe Text
-> Maybe [AnswerSummary]
-> Int
-> ListAnswersResponse
ListAnswersResponse'
            (Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> Maybe Text
 -> Maybe [AnswerSummary]
 -> Int
 -> ListAnswersResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe Text
      -> Maybe Text
      -> Maybe [AnswerSummary]
      -> Int
      -> ListAnswersResponse)
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
"LensAlias")
            Either
  String
  (Maybe Natural
   -> Maybe Text
   -> Maybe Text
   -> Maybe [AnswerSummary]
   -> Int
   -> ListAnswersResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe [AnswerSummary]
      -> Int
      -> ListAnswersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"MilestoneNumber")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe [AnswerSummary]
   -> Int
   -> ListAnswersResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text -> Maybe [AnswerSummary] -> Int -> ListAnswersResponse)
forall (f :: * -> *) a b. Applicative f => 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 Text -> Maybe [AnswerSummary] -> Int -> ListAnswersResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe [AnswerSummary] -> Int -> ListAnswersResponse)
forall (f :: * -> *) a b. Applicative f => 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
"WorkloadId")
            Either String (Maybe [AnswerSummary] -> Int -> ListAnswersResponse)
-> Either String (Maybe [AnswerSummary])
-> Either String (Int -> ListAnswersResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [AnswerSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AnswerSummaries"
                            Either String (Maybe (Maybe [AnswerSummary]))
-> Maybe [AnswerSummary] -> Either String (Maybe [AnswerSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AnswerSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Int -> ListAnswersResponse)
-> Either String Int -> Either String ListAnswersResponse
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 ListAnswers

instance Prelude.NFData ListAnswers

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

instance Core.ToQuery ListAnswers where
  toQuery :: ListAnswers -> QueryString
toQuery ListAnswers' {Maybe Natural
Maybe Text
Text
lensAlias :: Text
workloadId :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
milestoneNumber :: Maybe Natural
pillarId :: Maybe Text
$sel:lensAlias:ListAnswers' :: ListAnswers -> Text
$sel:workloadId:ListAnswers' :: ListAnswers -> Text
$sel:maxResults:ListAnswers' :: ListAnswers -> Maybe Natural
$sel:nextToken:ListAnswers' :: ListAnswers -> Maybe Text
$sel:milestoneNumber:ListAnswers' :: ListAnswers -> Maybe Natural
$sel:pillarId:ListAnswers' :: ListAnswers -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"PillarId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
pillarId,
        ByteString
"MilestoneNumber" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
milestoneNumber,
        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
      ]

-- | Output of a list answers call.
--
-- /See:/ 'newListAnswersResponse' smart constructor.
data ListAnswersResponse = ListAnswersResponse'
  { ListAnswersResponse -> Maybe Text
lensAlias :: 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,
    ListAnswersResponse -> Maybe [AnswerSummary]
answerSummaries :: Prelude.Maybe [AnswerSummary],
    -- | The response's http status code.
    ListAnswersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListAnswersResponse -> ListAnswersResponse -> Bool
(ListAnswersResponse -> ListAnswersResponse -> Bool)
-> (ListAnswersResponse -> ListAnswersResponse -> Bool)
-> Eq ListAnswersResponse
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]
(Int -> ReadS ListAnswersResponse)
-> ReadS [ListAnswersResponse]
-> ReadPrec ListAnswersResponse
-> ReadPrec [ListAnswersResponse]
-> Read 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
(Int -> ListAnswersResponse -> ShowS)
-> (ListAnswersResponse -> String)
-> ([ListAnswersResponse] -> ShowS)
-> Show ListAnswersResponse
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. ListAnswersResponse -> Rep ListAnswersResponse x)
-> (forall x. Rep ListAnswersResponse x -> ListAnswersResponse)
-> Generic ListAnswersResponse
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:
--
-- 'lensAlias', 'listAnswersResponse_lensAlias' - Undocumented member.
--
-- 'milestoneNumber', 'listAnswersResponse_milestoneNumber' - Undocumented member.
--
-- 'nextToken', 'listAnswersResponse_nextToken' - Undocumented member.
--
-- 'workloadId', 'listAnswersResponse_workloadId' - Undocumented member.
--
-- 'answerSummaries', 'listAnswersResponse_answerSummaries' - Undocumented member.
--
-- 'httpStatus', 'listAnswersResponse_httpStatus' - The response's http status code.
newListAnswersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAnswersResponse
newListAnswersResponse :: Int -> ListAnswersResponse
newListAnswersResponse Int
pHttpStatus_ =
  ListAnswersResponse' :: Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe Text
-> Maybe [AnswerSummary]
-> Int
-> ListAnswersResponse
ListAnswersResponse'
    { $sel:lensAlias:ListAnswersResponse' :: Maybe Text
lensAlias = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:milestoneNumber:ListAnswersResponse' :: Maybe Natural
milestoneNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAnswersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:ListAnswersResponse' :: Maybe Text
workloadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:answerSummaries:ListAnswersResponse' :: Maybe [AnswerSummary]
answerSummaries = Maybe [AnswerSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAnswersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
listAnswersResponse_lensAlias :: Lens.Lens' ListAnswersResponse (Prelude.Maybe Prelude.Text)
listAnswersResponse_lensAlias :: (Maybe Text -> f (Maybe Text))
-> ListAnswersResponse -> f ListAnswersResponse
listAnswersResponse_lensAlias = (ListAnswersResponse -> Maybe Text)
-> (ListAnswersResponse -> Maybe Text -> ListAnswersResponse)
-> Lens
     ListAnswersResponse ListAnswersResponse (Maybe Text) (Maybe Text)
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)

-- | Undocumented member.
listAnswersResponse_milestoneNumber :: Lens.Lens' ListAnswersResponse (Prelude.Maybe Prelude.Natural)
listAnswersResponse_milestoneNumber :: (Maybe Natural -> f (Maybe Natural))
-> ListAnswersResponse -> f ListAnswersResponse
listAnswersResponse_milestoneNumber = (ListAnswersResponse -> Maybe Natural)
-> (ListAnswersResponse -> Maybe Natural -> ListAnswersResponse)
-> Lens
     ListAnswersResponse
     ListAnswersResponse
     (Maybe Natural)
     (Maybe Natural)
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 :: (Maybe Text -> f (Maybe Text))
-> ListAnswersResponse -> f ListAnswersResponse
listAnswersResponse_nextToken = (ListAnswersResponse -> Maybe Text)
-> (ListAnswersResponse -> Maybe Text -> ListAnswersResponse)
-> Lens
     ListAnswersResponse ListAnswersResponse (Maybe Text) (Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> ListAnswersResponse -> f ListAnswersResponse
listAnswersResponse_workloadId = (ListAnswersResponse -> Maybe Text)
-> (ListAnswersResponse -> Maybe Text -> ListAnswersResponse)
-> Lens
     ListAnswersResponse ListAnswersResponse (Maybe Text) (Maybe Text)
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)

-- | Undocumented member.
listAnswersResponse_answerSummaries :: Lens.Lens' ListAnswersResponse (Prelude.Maybe [AnswerSummary])
listAnswersResponse_answerSummaries :: (Maybe [AnswerSummary] -> f (Maybe [AnswerSummary]))
-> ListAnswersResponse -> f ListAnswersResponse
listAnswersResponse_answerSummaries = (ListAnswersResponse -> Maybe [AnswerSummary])
-> (ListAnswersResponse
    -> Maybe [AnswerSummary] -> ListAnswersResponse)
-> Lens
     ListAnswersResponse
     ListAnswersResponse
     (Maybe [AnswerSummary])
     (Maybe [AnswerSummary])
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) ((Maybe [AnswerSummary] -> f (Maybe [AnswerSummary]))
 -> ListAnswersResponse -> f ListAnswersResponse)
-> ((Maybe [AnswerSummary] -> f (Maybe [AnswerSummary]))
    -> Maybe [AnswerSummary] -> f (Maybe [AnswerSummary]))
-> (Maybe [AnswerSummary] -> f (Maybe [AnswerSummary]))
-> ListAnswersResponse
-> f ListAnswersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AnswerSummary] [AnswerSummary] [AnswerSummary] [AnswerSummary]
-> Iso
     (Maybe [AnswerSummary])
     (Maybe [AnswerSummary])
     (Maybe [AnswerSummary])
     (Maybe [AnswerSummary])
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
  [AnswerSummary] [AnswerSummary] [AnswerSummary] [AnswerSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
listAnswersResponse_httpStatus :: Lens.Lens' ListAnswersResponse Prelude.Int
listAnswersResponse_httpStatus :: (Int -> f Int) -> ListAnswersResponse -> f ListAnswersResponse
listAnswersResponse_httpStatus = (ListAnswersResponse -> Int)
-> (ListAnswersResponse -> Int -> ListAnswersResponse)
-> Lens ListAnswersResponse ListAnswersResponse Int Int
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