{-# 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.GetAnswer
-- 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)
--
-- Get the answer to a specific question in a workload review.
module Amazonka.WellArchitected.GetAnswer
  ( -- * Creating a Request
    GetAnswer (..),
    newGetAnswer,

    -- * Request Lenses
    getAnswer_milestoneNumber,
    getAnswer_workloadId,
    getAnswer_lensAlias,
    getAnswer_questionId,

    -- * Destructuring the Response
    GetAnswerResponse (..),
    newGetAnswerResponse,

    -- * Response Lenses
    getAnswerResponse_lensAlias,
    getAnswerResponse_milestoneNumber,
    getAnswerResponse_answer,
    getAnswerResponse_workloadId,
    getAnswerResponse_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 get answer.
--
-- /See:/ 'newGetAnswer' smart constructor.
data GetAnswer = GetAnswer'
  { GetAnswer -> Maybe Natural
milestoneNumber :: Prelude.Maybe Prelude.Natural,
    GetAnswer -> Text
workloadId :: Prelude.Text,
    GetAnswer -> Text
lensAlias :: Prelude.Text,
    GetAnswer -> Text
questionId :: Prelude.Text
  }
  deriving (GetAnswer -> GetAnswer -> Bool
(GetAnswer -> GetAnswer -> Bool)
-> (GetAnswer -> GetAnswer -> Bool) -> Eq GetAnswer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAnswer -> GetAnswer -> Bool
$c/= :: GetAnswer -> GetAnswer -> Bool
== :: GetAnswer -> GetAnswer -> Bool
$c== :: GetAnswer -> GetAnswer -> Bool
Prelude.Eq, ReadPrec [GetAnswer]
ReadPrec GetAnswer
Int -> ReadS GetAnswer
ReadS [GetAnswer]
(Int -> ReadS GetAnswer)
-> ReadS [GetAnswer]
-> ReadPrec GetAnswer
-> ReadPrec [GetAnswer]
-> Read GetAnswer
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAnswer]
$creadListPrec :: ReadPrec [GetAnswer]
readPrec :: ReadPrec GetAnswer
$creadPrec :: ReadPrec GetAnswer
readList :: ReadS [GetAnswer]
$creadList :: ReadS [GetAnswer]
readsPrec :: Int -> ReadS GetAnswer
$creadsPrec :: Int -> ReadS GetAnswer
Prelude.Read, Int -> GetAnswer -> ShowS
[GetAnswer] -> ShowS
GetAnswer -> String
(Int -> GetAnswer -> ShowS)
-> (GetAnswer -> String)
-> ([GetAnswer] -> ShowS)
-> Show GetAnswer
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAnswer] -> ShowS
$cshowList :: [GetAnswer] -> ShowS
show :: GetAnswer -> String
$cshow :: GetAnswer -> String
showsPrec :: Int -> GetAnswer -> ShowS
$cshowsPrec :: Int -> GetAnswer -> ShowS
Prelude.Show, (forall x. GetAnswer -> Rep GetAnswer x)
-> (forall x. Rep GetAnswer x -> GetAnswer) -> Generic GetAnswer
forall x. Rep GetAnswer x -> GetAnswer
forall x. GetAnswer -> Rep GetAnswer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAnswer x -> GetAnswer
$cfrom :: forall x. GetAnswer -> Rep GetAnswer x
Prelude.Generic)

-- |
-- Create a value of 'GetAnswer' 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:
--
-- 'milestoneNumber', 'getAnswer_milestoneNumber' - Undocumented member.
--
-- 'workloadId', 'getAnswer_workloadId' - Undocumented member.
--
-- 'lensAlias', 'getAnswer_lensAlias' - Undocumented member.
--
-- 'questionId', 'getAnswer_questionId' - Undocumented member.
newGetAnswer ::
  -- | 'workloadId'
  Prelude.Text ->
  -- | 'lensAlias'
  Prelude.Text ->
  -- | 'questionId'
  Prelude.Text ->
  GetAnswer
newGetAnswer :: Text -> Text -> Text -> GetAnswer
newGetAnswer Text
pWorkloadId_ Text
pLensAlias_ Text
pQuestionId_ =
  GetAnswer' :: Maybe Natural -> Text -> Text -> Text -> GetAnswer
GetAnswer'
    { $sel:milestoneNumber:GetAnswer' :: Maybe Natural
milestoneNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:GetAnswer' :: Text
workloadId = Text
pWorkloadId_,
      $sel:lensAlias:GetAnswer' :: Text
lensAlias = Text
pLensAlias_,
      $sel:questionId:GetAnswer' :: Text
questionId = Text
pQuestionId_
    }

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

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

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

-- | Undocumented member.
getAnswer_questionId :: Lens.Lens' GetAnswer Prelude.Text
getAnswer_questionId :: (Text -> f Text) -> GetAnswer -> f GetAnswer
getAnswer_questionId = (GetAnswer -> Text)
-> (GetAnswer -> Text -> GetAnswer)
-> Lens GetAnswer GetAnswer Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAnswer' {Text
questionId :: Text
$sel:questionId:GetAnswer' :: GetAnswer -> Text
questionId} -> Text
questionId) (\s :: GetAnswer
s@GetAnswer' {} Text
a -> GetAnswer
s {$sel:questionId:GetAnswer' :: Text
questionId = Text
a} :: GetAnswer)

instance Core.AWSRequest GetAnswer where
  type AWSResponse GetAnswer = GetAnswerResponse
  request :: GetAnswer -> Request GetAnswer
request = Service -> GetAnswer -> Request GetAnswer
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetAnswer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetAnswer)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetAnswer))
-> Logger
-> Service
-> Proxy GetAnswer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetAnswer)))
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 Answer
-> Maybe Text
-> Int
-> GetAnswerResponse
GetAnswerResponse'
            (Maybe Text
 -> Maybe Natural
 -> Maybe Answer
 -> Maybe Text
 -> Int
 -> GetAnswerResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe Answer -> Maybe Text -> Int -> GetAnswerResponse)
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 Answer -> Maybe Text -> Int -> GetAnswerResponse)
-> Either String (Maybe Natural)
-> Either
     String (Maybe Answer -> Maybe Text -> Int -> GetAnswerResponse)
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 Answer -> Maybe Text -> Int -> GetAnswerResponse)
-> Either String (Maybe Answer)
-> Either String (Maybe Text -> Int -> GetAnswerResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Answer)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Answer")
            Either String (Maybe Text -> Int -> GetAnswerResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetAnswerResponse)
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 (Int -> GetAnswerResponse)
-> Either String Int -> Either String GetAnswerResponse
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 GetAnswer

instance Prelude.NFData GetAnswer

instance Core.ToHeaders GetAnswer where
  toHeaders :: GetAnswer -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetAnswer -> 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 GetAnswer where
  toPath :: GetAnswer -> ByteString
toPath GetAnswer' {Maybe Natural
Text
questionId :: Text
lensAlias :: Text
workloadId :: Text
milestoneNumber :: Maybe Natural
$sel:questionId:GetAnswer' :: GetAnswer -> Text
$sel:lensAlias:GetAnswer' :: GetAnswer -> Text
$sel:workloadId:GetAnswer' :: GetAnswer -> Text
$sel:milestoneNumber:GetAnswer' :: GetAnswer -> Maybe Natural
..} =
    [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/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
questionId
      ]

instance Core.ToQuery GetAnswer where
  toQuery :: GetAnswer -> QueryString
toQuery GetAnswer' {Maybe Natural
Text
questionId :: Text
lensAlias :: Text
workloadId :: Text
milestoneNumber :: Maybe Natural
$sel:questionId:GetAnswer' :: GetAnswer -> Text
$sel:lensAlias:GetAnswer' :: GetAnswer -> Text
$sel:workloadId:GetAnswer' :: GetAnswer -> Text
$sel:milestoneNumber:GetAnswer' :: GetAnswer -> Maybe Natural
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"MilestoneNumber" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
milestoneNumber]

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

-- |
-- Create a value of 'GetAnswerResponse' 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', 'getAnswerResponse_lensAlias' - Undocumented member.
--
-- 'milestoneNumber', 'getAnswerResponse_milestoneNumber' - Undocumented member.
--
-- 'answer', 'getAnswerResponse_answer' - Undocumented member.
--
-- 'workloadId', 'getAnswerResponse_workloadId' - Undocumented member.
--
-- 'httpStatus', 'getAnswerResponse_httpStatus' - The response's http status code.
newGetAnswerResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAnswerResponse
newGetAnswerResponse :: Int -> GetAnswerResponse
newGetAnswerResponse Int
pHttpStatus_ =
  GetAnswerResponse' :: Maybe Text
-> Maybe Natural
-> Maybe Answer
-> Maybe Text
-> Int
-> GetAnswerResponse
GetAnswerResponse'
    { $sel:lensAlias:GetAnswerResponse' :: Maybe Text
lensAlias = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:milestoneNumber:GetAnswerResponse' :: Maybe Natural
milestoneNumber = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:answer:GetAnswerResponse' :: Maybe Answer
answer = Maybe Answer
forall a. Maybe a
Prelude.Nothing,
      $sel:workloadId:GetAnswerResponse' :: Maybe Text
workloadId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAnswerResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

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

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

-- | Undocumented member.
getAnswerResponse_answer :: Lens.Lens' GetAnswerResponse (Prelude.Maybe Answer)
getAnswerResponse_answer :: (Maybe Answer -> f (Maybe Answer))
-> GetAnswerResponse -> f GetAnswerResponse
getAnswerResponse_answer = (GetAnswerResponse -> Maybe Answer)
-> (GetAnswerResponse -> Maybe Answer -> GetAnswerResponse)
-> Lens
     GetAnswerResponse GetAnswerResponse (Maybe Answer) (Maybe Answer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAnswerResponse' {Maybe Answer
answer :: Maybe Answer
$sel:answer:GetAnswerResponse' :: GetAnswerResponse -> Maybe Answer
answer} -> Maybe Answer
answer) (\s :: GetAnswerResponse
s@GetAnswerResponse' {} Maybe Answer
a -> GetAnswerResponse
s {$sel:answer:GetAnswerResponse' :: Maybe Answer
answer = Maybe Answer
a} :: GetAnswerResponse)

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

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

instance Prelude.NFData GetAnswerResponse