{-# 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.CodeGuruReviewer.ListRecommendationFeedback
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RecommendationFeedbackSummary.html RecommendationFeedbackSummary>
-- objects that contain customer recommendation feedback for all CodeGuru
-- Reviewer users.
module Amazonka.CodeGuruReviewer.ListRecommendationFeedback
  ( -- * Creating a Request
    ListRecommendationFeedback (..),
    newListRecommendationFeedback,

    -- * Request Lenses
    listRecommendationFeedback_maxResults,
    listRecommendationFeedback_nextToken,
    listRecommendationFeedback_recommendationIds,
    listRecommendationFeedback_userIds,
    listRecommendationFeedback_codeReviewArn,

    -- * Destructuring the Response
    ListRecommendationFeedbackResponse (..),
    newListRecommendationFeedbackResponse,

    -- * Response Lenses
    listRecommendationFeedbackResponse_nextToken,
    listRecommendationFeedbackResponse_recommendationFeedbackSummaries,
    listRecommendationFeedbackResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListRecommendationFeedback' smart constructor.
data ListRecommendationFeedback = ListRecommendationFeedback'
  { -- | The maximum number of results that are returned per call. The default is
    -- 100.
    ListRecommendationFeedback -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If @nextToken@ is returned, there are more results available. The value
    -- of @nextToken@ is a unique pagination token for each page. Make the call
    -- again using the returned token to retrieve the next page. Keep all other
    -- arguments unchanged.
    ListRecommendationFeedback -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Used to query the recommendation feedback for a given recommendation.
    ListRecommendationFeedback -> Maybe (NonEmpty Text)
recommendationIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | An Amazon Web Services user\'s account ID or Amazon Resource Name (ARN).
    -- Use this ID to query the recommendation feedback for a code review from
    -- that user.
    --
    -- The @UserId@ is an IAM principal that can be specified as an Amazon Web
    -- Services account ID or an Amazon Resource Name (ARN). For more
    -- information, see
    -- <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying Specifying a Principal>
    -- in the /Amazon Web Services Identity and Access Management User Guide/.
    ListRecommendationFeedback -> Maybe (NonEmpty Text)
userIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The Amazon Resource Name (ARN) of the
    -- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html CodeReview>
    -- object.
    ListRecommendationFeedback -> Text
codeReviewArn :: Prelude.Text
  }
  deriving (ListRecommendationFeedback -> ListRecommendationFeedback -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecommendationFeedback -> ListRecommendationFeedback -> Bool
$c/= :: ListRecommendationFeedback -> ListRecommendationFeedback -> Bool
== :: ListRecommendationFeedback -> ListRecommendationFeedback -> Bool
$c== :: ListRecommendationFeedback -> ListRecommendationFeedback -> Bool
Prelude.Eq, ReadPrec [ListRecommendationFeedback]
ReadPrec ListRecommendationFeedback
Int -> ReadS ListRecommendationFeedback
ReadS [ListRecommendationFeedback]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecommendationFeedback]
$creadListPrec :: ReadPrec [ListRecommendationFeedback]
readPrec :: ReadPrec ListRecommendationFeedback
$creadPrec :: ReadPrec ListRecommendationFeedback
readList :: ReadS [ListRecommendationFeedback]
$creadList :: ReadS [ListRecommendationFeedback]
readsPrec :: Int -> ReadS ListRecommendationFeedback
$creadsPrec :: Int -> ReadS ListRecommendationFeedback
Prelude.Read, Int -> ListRecommendationFeedback -> ShowS
[ListRecommendationFeedback] -> ShowS
ListRecommendationFeedback -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecommendationFeedback] -> ShowS
$cshowList :: [ListRecommendationFeedback] -> ShowS
show :: ListRecommendationFeedback -> String
$cshow :: ListRecommendationFeedback -> String
showsPrec :: Int -> ListRecommendationFeedback -> ShowS
$cshowsPrec :: Int -> ListRecommendationFeedback -> ShowS
Prelude.Show, forall x.
Rep ListRecommendationFeedback x -> ListRecommendationFeedback
forall x.
ListRecommendationFeedback -> Rep ListRecommendationFeedback x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRecommendationFeedback x -> ListRecommendationFeedback
$cfrom :: forall x.
ListRecommendationFeedback -> Rep ListRecommendationFeedback x
Prelude.Generic)

-- |
-- Create a value of 'ListRecommendationFeedback' 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', 'listRecommendationFeedback_maxResults' - The maximum number of results that are returned per call. The default is
-- 100.
--
-- 'nextToken', 'listRecommendationFeedback_nextToken' - If @nextToken@ is returned, there are more results available. The value
-- of @nextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged.
--
-- 'recommendationIds', 'listRecommendationFeedback_recommendationIds' - Used to query the recommendation feedback for a given recommendation.
--
-- 'userIds', 'listRecommendationFeedback_userIds' - An Amazon Web Services user\'s account ID or Amazon Resource Name (ARN).
-- Use this ID to query the recommendation feedback for a code review from
-- that user.
--
-- The @UserId@ is an IAM principal that can be specified as an Amazon Web
-- Services account ID or an Amazon Resource Name (ARN). For more
-- information, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying Specifying a Principal>
-- in the /Amazon Web Services Identity and Access Management User Guide/.
--
-- 'codeReviewArn', 'listRecommendationFeedback_codeReviewArn' - The Amazon Resource Name (ARN) of the
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html CodeReview>
-- object.
newListRecommendationFeedback ::
  -- | 'codeReviewArn'
  Prelude.Text ->
  ListRecommendationFeedback
newListRecommendationFeedback :: Text -> ListRecommendationFeedback
newListRecommendationFeedback Text
pCodeReviewArn_ =
  ListRecommendationFeedback'
    { $sel:maxResults:ListRecommendationFeedback' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListRecommendationFeedback' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:recommendationIds:ListRecommendationFeedback' :: Maybe (NonEmpty Text)
recommendationIds = forall a. Maybe a
Prelude.Nothing,
      $sel:userIds:ListRecommendationFeedback' :: Maybe (NonEmpty Text)
userIds = forall a. Maybe a
Prelude.Nothing,
      $sel:codeReviewArn:ListRecommendationFeedback' :: Text
codeReviewArn = Text
pCodeReviewArn_
    }

-- | The maximum number of results that are returned per call. The default is
-- 100.
listRecommendationFeedback_maxResults :: Lens.Lens' ListRecommendationFeedback (Prelude.Maybe Prelude.Natural)
listRecommendationFeedback_maxResults :: Lens' ListRecommendationFeedback (Maybe Natural)
listRecommendationFeedback_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationFeedback' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListRecommendationFeedback
s@ListRecommendationFeedback' {} Maybe Natural
a -> ListRecommendationFeedback
s {$sel:maxResults:ListRecommendationFeedback' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListRecommendationFeedback)

-- | If @nextToken@ is returned, there are more results available. The value
-- of @nextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged.
listRecommendationFeedback_nextToken :: Lens.Lens' ListRecommendationFeedback (Prelude.Maybe Prelude.Text)
listRecommendationFeedback_nextToken :: Lens' ListRecommendationFeedback (Maybe Text)
listRecommendationFeedback_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationFeedback' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecommendationFeedback
s@ListRecommendationFeedback' {} Maybe Text
a -> ListRecommendationFeedback
s {$sel:nextToken:ListRecommendationFeedback' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecommendationFeedback)

-- | Used to query the recommendation feedback for a given recommendation.
listRecommendationFeedback_recommendationIds :: Lens.Lens' ListRecommendationFeedback (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listRecommendationFeedback_recommendationIds :: Lens' ListRecommendationFeedback (Maybe (NonEmpty Text))
listRecommendationFeedback_recommendationIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationFeedback' {Maybe (NonEmpty Text)
recommendationIds :: Maybe (NonEmpty Text)
$sel:recommendationIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
recommendationIds} -> Maybe (NonEmpty Text)
recommendationIds) (\s :: ListRecommendationFeedback
s@ListRecommendationFeedback' {} Maybe (NonEmpty Text)
a -> ListRecommendationFeedback
s {$sel:recommendationIds:ListRecommendationFeedback' :: Maybe (NonEmpty Text)
recommendationIds = Maybe (NonEmpty Text)
a} :: ListRecommendationFeedback) 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

-- | An Amazon Web Services user\'s account ID or Amazon Resource Name (ARN).
-- Use this ID to query the recommendation feedback for a code review from
-- that user.
--
-- The @UserId@ is an IAM principal that can be specified as an Amazon Web
-- Services account ID or an Amazon Resource Name (ARN). For more
-- information, see
-- <https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying Specifying a Principal>
-- in the /Amazon Web Services Identity and Access Management User Guide/.
listRecommendationFeedback_userIds :: Lens.Lens' ListRecommendationFeedback (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
listRecommendationFeedback_userIds :: Lens' ListRecommendationFeedback (Maybe (NonEmpty Text))
listRecommendationFeedback_userIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationFeedback' {Maybe (NonEmpty Text)
userIds :: Maybe (NonEmpty Text)
$sel:userIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
userIds} -> Maybe (NonEmpty Text)
userIds) (\s :: ListRecommendationFeedback
s@ListRecommendationFeedback' {} Maybe (NonEmpty Text)
a -> ListRecommendationFeedback
s {$sel:userIds:ListRecommendationFeedback' :: Maybe (NonEmpty Text)
userIds = Maybe (NonEmpty Text)
a} :: ListRecommendationFeedback) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html CodeReview>
-- object.
listRecommendationFeedback_codeReviewArn :: Lens.Lens' ListRecommendationFeedback Prelude.Text
listRecommendationFeedback_codeReviewArn :: Lens' ListRecommendationFeedback Text
listRecommendationFeedback_codeReviewArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationFeedback' {Text
codeReviewArn :: Text
$sel:codeReviewArn:ListRecommendationFeedback' :: ListRecommendationFeedback -> Text
codeReviewArn} -> Text
codeReviewArn) (\s :: ListRecommendationFeedback
s@ListRecommendationFeedback' {} Text
a -> ListRecommendationFeedback
s {$sel:codeReviewArn:ListRecommendationFeedback' :: Text
codeReviewArn = Text
a} :: ListRecommendationFeedback)

instance Core.AWSRequest ListRecommendationFeedback where
  type
    AWSResponse ListRecommendationFeedback =
      ListRecommendationFeedbackResponse
  request :: (Service -> Service)
-> ListRecommendationFeedback -> Request ListRecommendationFeedback
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 ListRecommendationFeedback
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListRecommendationFeedback)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [RecommendationFeedbackSummary]
-> Int
-> ListRecommendationFeedbackResponse
ListRecommendationFeedbackResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"RecommendationFeedbackSummaries"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListRecommendationFeedback where
  hashWithSalt :: Int -> ListRecommendationFeedback -> Int
hashWithSalt Int
_salt ListRecommendationFeedback' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
codeReviewArn :: Text
userIds :: Maybe (NonEmpty Text)
recommendationIds :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:codeReviewArn:ListRecommendationFeedback' :: ListRecommendationFeedback -> Text
$sel:userIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
$sel:recommendationIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
$sel:nextToken:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Text
$sel:maxResults:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
recommendationIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
userIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
codeReviewArn

instance Prelude.NFData ListRecommendationFeedback where
  rnf :: ListRecommendationFeedback -> ()
rnf ListRecommendationFeedback' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
codeReviewArn :: Text
userIds :: Maybe (NonEmpty Text)
recommendationIds :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:codeReviewArn:ListRecommendationFeedback' :: ListRecommendationFeedback -> Text
$sel:userIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
$sel:recommendationIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
$sel:nextToken:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Text
$sel:maxResults:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
recommendationIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
userIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
codeReviewArn

instance Data.ToHeaders ListRecommendationFeedback where
  toHeaders :: ListRecommendationFeedback -> 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 ListRecommendationFeedback where
  toPath :: ListRecommendationFeedback -> ByteString
toPath ListRecommendationFeedback' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
codeReviewArn :: Text
userIds :: Maybe (NonEmpty Text)
recommendationIds :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:codeReviewArn:ListRecommendationFeedback' :: ListRecommendationFeedback -> Text
$sel:userIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
$sel:recommendationIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
$sel:nextToken:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Text
$sel:maxResults:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/feedback/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
codeReviewArn,
        ByteString
"/RecommendationFeedback"
      ]

instance Data.ToQuery ListRecommendationFeedback where
  toQuery :: ListRecommendationFeedback -> QueryString
toQuery ListRecommendationFeedback' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
codeReviewArn :: Text
userIds :: Maybe (NonEmpty Text)
recommendationIds :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:codeReviewArn:ListRecommendationFeedback' :: ListRecommendationFeedback -> Text
$sel:userIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
$sel:recommendationIds:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe (NonEmpty Text)
$sel:nextToken:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Text
$sel:maxResults:ListRecommendationFeedback' :: ListRecommendationFeedback -> Maybe Natural
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"RecommendationIds"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            ( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member"
                forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
recommendationIds
            ),
        ByteString
"UserIds"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a. ToQuery a => a -> QueryString
Data.toQuery
            (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
userIds)
      ]

-- | /See:/ 'newListRecommendationFeedbackResponse' smart constructor.
data ListRecommendationFeedbackResponse = ListRecommendationFeedbackResponse'
  { -- | If @nextToken@ is returned, there are more results available. The value
    -- of @nextToken@ is a unique pagination token for each page. Make the call
    -- again using the returned token to retrieve the next page. Keep all other
    -- arguments unchanged.
    ListRecommendationFeedbackResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Recommendation feedback summaries corresponding to the code review ARN.
    ListRecommendationFeedbackResponse
-> Maybe [RecommendationFeedbackSummary]
recommendationFeedbackSummaries :: Prelude.Maybe [RecommendationFeedbackSummary],
    -- | The response's http status code.
    ListRecommendationFeedbackResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListRecommendationFeedbackResponse
-> ListRecommendationFeedbackResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListRecommendationFeedbackResponse
-> ListRecommendationFeedbackResponse -> Bool
$c/= :: ListRecommendationFeedbackResponse
-> ListRecommendationFeedbackResponse -> Bool
== :: ListRecommendationFeedbackResponse
-> ListRecommendationFeedbackResponse -> Bool
$c== :: ListRecommendationFeedbackResponse
-> ListRecommendationFeedbackResponse -> Bool
Prelude.Eq, ReadPrec [ListRecommendationFeedbackResponse]
ReadPrec ListRecommendationFeedbackResponse
Int -> ReadS ListRecommendationFeedbackResponse
ReadS [ListRecommendationFeedbackResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListRecommendationFeedbackResponse]
$creadListPrec :: ReadPrec [ListRecommendationFeedbackResponse]
readPrec :: ReadPrec ListRecommendationFeedbackResponse
$creadPrec :: ReadPrec ListRecommendationFeedbackResponse
readList :: ReadS [ListRecommendationFeedbackResponse]
$creadList :: ReadS [ListRecommendationFeedbackResponse]
readsPrec :: Int -> ReadS ListRecommendationFeedbackResponse
$creadsPrec :: Int -> ReadS ListRecommendationFeedbackResponse
Prelude.Read, Int -> ListRecommendationFeedbackResponse -> ShowS
[ListRecommendationFeedbackResponse] -> ShowS
ListRecommendationFeedbackResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListRecommendationFeedbackResponse] -> ShowS
$cshowList :: [ListRecommendationFeedbackResponse] -> ShowS
show :: ListRecommendationFeedbackResponse -> String
$cshow :: ListRecommendationFeedbackResponse -> String
showsPrec :: Int -> ListRecommendationFeedbackResponse -> ShowS
$cshowsPrec :: Int -> ListRecommendationFeedbackResponse -> ShowS
Prelude.Show, forall x.
Rep ListRecommendationFeedbackResponse x
-> ListRecommendationFeedbackResponse
forall x.
ListRecommendationFeedbackResponse
-> Rep ListRecommendationFeedbackResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListRecommendationFeedbackResponse x
-> ListRecommendationFeedbackResponse
$cfrom :: forall x.
ListRecommendationFeedbackResponse
-> Rep ListRecommendationFeedbackResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListRecommendationFeedbackResponse' 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', 'listRecommendationFeedbackResponse_nextToken' - If @nextToken@ is returned, there are more results available. The value
-- of @nextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged.
--
-- 'recommendationFeedbackSummaries', 'listRecommendationFeedbackResponse_recommendationFeedbackSummaries' - Recommendation feedback summaries corresponding to the code review ARN.
--
-- 'httpStatus', 'listRecommendationFeedbackResponse_httpStatus' - The response's http status code.
newListRecommendationFeedbackResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListRecommendationFeedbackResponse
newListRecommendationFeedbackResponse :: Int -> ListRecommendationFeedbackResponse
newListRecommendationFeedbackResponse Int
pHttpStatus_ =
  ListRecommendationFeedbackResponse'
    { $sel:nextToken:ListRecommendationFeedbackResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:recommendationFeedbackSummaries:ListRecommendationFeedbackResponse' :: Maybe [RecommendationFeedbackSummary]
recommendationFeedbackSummaries =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListRecommendationFeedbackResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If @nextToken@ is returned, there are more results available. The value
-- of @nextToken@ is a unique pagination token for each page. Make the call
-- again using the returned token to retrieve the next page. Keep all other
-- arguments unchanged.
listRecommendationFeedbackResponse_nextToken :: Lens.Lens' ListRecommendationFeedbackResponse (Prelude.Maybe Prelude.Text)
listRecommendationFeedbackResponse_nextToken :: Lens' ListRecommendationFeedbackResponse (Maybe Text)
listRecommendationFeedbackResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationFeedbackResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListRecommendationFeedbackResponse' :: ListRecommendationFeedbackResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListRecommendationFeedbackResponse
s@ListRecommendationFeedbackResponse' {} Maybe Text
a -> ListRecommendationFeedbackResponse
s {$sel:nextToken:ListRecommendationFeedbackResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListRecommendationFeedbackResponse)

-- | Recommendation feedback summaries corresponding to the code review ARN.
listRecommendationFeedbackResponse_recommendationFeedbackSummaries :: Lens.Lens' ListRecommendationFeedbackResponse (Prelude.Maybe [RecommendationFeedbackSummary])
listRecommendationFeedbackResponse_recommendationFeedbackSummaries :: Lens'
  ListRecommendationFeedbackResponse
  (Maybe [RecommendationFeedbackSummary])
listRecommendationFeedbackResponse_recommendationFeedbackSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListRecommendationFeedbackResponse' {Maybe [RecommendationFeedbackSummary]
recommendationFeedbackSummaries :: Maybe [RecommendationFeedbackSummary]
$sel:recommendationFeedbackSummaries:ListRecommendationFeedbackResponse' :: ListRecommendationFeedbackResponse
-> Maybe [RecommendationFeedbackSummary]
recommendationFeedbackSummaries} -> Maybe [RecommendationFeedbackSummary]
recommendationFeedbackSummaries) (\s :: ListRecommendationFeedbackResponse
s@ListRecommendationFeedbackResponse' {} Maybe [RecommendationFeedbackSummary]
a -> ListRecommendationFeedbackResponse
s {$sel:recommendationFeedbackSummaries:ListRecommendationFeedbackResponse' :: Maybe [RecommendationFeedbackSummary]
recommendationFeedbackSummaries = Maybe [RecommendationFeedbackSummary]
a} :: ListRecommendationFeedbackResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    ListRecommendationFeedbackResponse
  where
  rnf :: ListRecommendationFeedbackResponse -> ()
rnf ListRecommendationFeedbackResponse' {Int
Maybe [RecommendationFeedbackSummary]
Maybe Text
httpStatus :: Int
recommendationFeedbackSummaries :: Maybe [RecommendationFeedbackSummary]
nextToken :: Maybe Text
$sel:httpStatus:ListRecommendationFeedbackResponse' :: ListRecommendationFeedbackResponse -> Int
$sel:recommendationFeedbackSummaries:ListRecommendationFeedbackResponse' :: ListRecommendationFeedbackResponse
-> Maybe [RecommendationFeedbackSummary]
$sel:nextToken:ListRecommendationFeedbackResponse' :: ListRecommendationFeedbackResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [RecommendationFeedbackSummary]
recommendationFeedbackSummaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus