{-# 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.CodeCommit.GetCommentReactions
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns information about reactions to a specified comment ID. Reactions
-- from users who have been deleted will not be included in the count.
module Amazonka.CodeCommit.GetCommentReactions
  ( -- * Creating a Request
    GetCommentReactions (..),
    newGetCommentReactions,

    -- * Request Lenses
    getCommentReactions_nextToken,
    getCommentReactions_reactionUserArn,
    getCommentReactions_maxResults,
    getCommentReactions_commentId,

    -- * Destructuring the Response
    GetCommentReactionsResponse (..),
    newGetCommentReactionsResponse,

    -- * Response Lenses
    getCommentReactionsResponse_nextToken,
    getCommentReactionsResponse_httpStatus,
    getCommentReactionsResponse_reactionsForComment,
  )
where

import Amazonka.CodeCommit.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetCommentReactions' smart constructor.
data GetCommentReactions = GetCommentReactions'
  { -- | An enumeration token that, when provided in a request, returns the next
    -- batch of the results.
    GetCommentReactions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Optional. The Amazon Resource Name (ARN) of the user or identity for
    -- which you want to get reaction information.
    GetCommentReactions -> Maybe Text
reactionUserArn :: Prelude.Maybe Prelude.Text,
    -- | A non-zero, non-negative integer used to limit the number of returned
    -- results. The default is the same as the allowed maximum, 1,000.
    GetCommentReactions -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The ID of the comment for which you want to get reactions information.
    GetCommentReactions -> Text
commentId :: Prelude.Text
  }
  deriving (GetCommentReactions -> GetCommentReactions -> Bool
(GetCommentReactions -> GetCommentReactions -> Bool)
-> (GetCommentReactions -> GetCommentReactions -> Bool)
-> Eq GetCommentReactions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCommentReactions -> GetCommentReactions -> Bool
$c/= :: GetCommentReactions -> GetCommentReactions -> Bool
== :: GetCommentReactions -> GetCommentReactions -> Bool
$c== :: GetCommentReactions -> GetCommentReactions -> Bool
Prelude.Eq, ReadPrec [GetCommentReactions]
ReadPrec GetCommentReactions
Int -> ReadS GetCommentReactions
ReadS [GetCommentReactions]
(Int -> ReadS GetCommentReactions)
-> ReadS [GetCommentReactions]
-> ReadPrec GetCommentReactions
-> ReadPrec [GetCommentReactions]
-> Read GetCommentReactions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCommentReactions]
$creadListPrec :: ReadPrec [GetCommentReactions]
readPrec :: ReadPrec GetCommentReactions
$creadPrec :: ReadPrec GetCommentReactions
readList :: ReadS [GetCommentReactions]
$creadList :: ReadS [GetCommentReactions]
readsPrec :: Int -> ReadS GetCommentReactions
$creadsPrec :: Int -> ReadS GetCommentReactions
Prelude.Read, Int -> GetCommentReactions -> ShowS
[GetCommentReactions] -> ShowS
GetCommentReactions -> String
(Int -> GetCommentReactions -> ShowS)
-> (GetCommentReactions -> String)
-> ([GetCommentReactions] -> ShowS)
-> Show GetCommentReactions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCommentReactions] -> ShowS
$cshowList :: [GetCommentReactions] -> ShowS
show :: GetCommentReactions -> String
$cshow :: GetCommentReactions -> String
showsPrec :: Int -> GetCommentReactions -> ShowS
$cshowsPrec :: Int -> GetCommentReactions -> ShowS
Prelude.Show, (forall x. GetCommentReactions -> Rep GetCommentReactions x)
-> (forall x. Rep GetCommentReactions x -> GetCommentReactions)
-> Generic GetCommentReactions
forall x. Rep GetCommentReactions x -> GetCommentReactions
forall x. GetCommentReactions -> Rep GetCommentReactions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetCommentReactions x -> GetCommentReactions
$cfrom :: forall x. GetCommentReactions -> Rep GetCommentReactions x
Prelude.Generic)

-- |
-- Create a value of 'GetCommentReactions' 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', 'getCommentReactions_nextToken' - An enumeration token that, when provided in a request, returns the next
-- batch of the results.
--
-- 'reactionUserArn', 'getCommentReactions_reactionUserArn' - Optional. The Amazon Resource Name (ARN) of the user or identity for
-- which you want to get reaction information.
--
-- 'maxResults', 'getCommentReactions_maxResults' - A non-zero, non-negative integer used to limit the number of returned
-- results. The default is the same as the allowed maximum, 1,000.
--
-- 'commentId', 'getCommentReactions_commentId' - The ID of the comment for which you want to get reactions information.
newGetCommentReactions ::
  -- | 'commentId'
  Prelude.Text ->
  GetCommentReactions
newGetCommentReactions :: Text -> GetCommentReactions
newGetCommentReactions Text
pCommentId_ =
  GetCommentReactions' :: Maybe Text
-> Maybe Text -> Maybe Int -> Text -> GetCommentReactions
GetCommentReactions'
    { $sel:nextToken:GetCommentReactions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:reactionUserArn:GetCommentReactions' :: Maybe Text
reactionUserArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetCommentReactions' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:commentId:GetCommentReactions' :: Text
commentId = Text
pCommentId_
    }

-- | An enumeration token that, when provided in a request, returns the next
-- batch of the results.
getCommentReactions_nextToken :: Lens.Lens' GetCommentReactions (Prelude.Maybe Prelude.Text)
getCommentReactions_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetCommentReactions -> f GetCommentReactions
getCommentReactions_nextToken = (GetCommentReactions -> Maybe Text)
-> (GetCommentReactions -> Maybe Text -> GetCommentReactions)
-> Lens
     GetCommentReactions GetCommentReactions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentReactions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCommentReactions' :: GetCommentReactions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetCommentReactions
s@GetCommentReactions' {} Maybe Text
a -> GetCommentReactions
s {$sel:nextToken:GetCommentReactions' :: Maybe Text
nextToken = Maybe Text
a} :: GetCommentReactions)

-- | Optional. The Amazon Resource Name (ARN) of the user or identity for
-- which you want to get reaction information.
getCommentReactions_reactionUserArn :: Lens.Lens' GetCommentReactions (Prelude.Maybe Prelude.Text)
getCommentReactions_reactionUserArn :: (Maybe Text -> f (Maybe Text))
-> GetCommentReactions -> f GetCommentReactions
getCommentReactions_reactionUserArn = (GetCommentReactions -> Maybe Text)
-> (GetCommentReactions -> Maybe Text -> GetCommentReactions)
-> Lens
     GetCommentReactions GetCommentReactions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentReactions' {Maybe Text
reactionUserArn :: Maybe Text
$sel:reactionUserArn:GetCommentReactions' :: GetCommentReactions -> Maybe Text
reactionUserArn} -> Maybe Text
reactionUserArn) (\s :: GetCommentReactions
s@GetCommentReactions' {} Maybe Text
a -> GetCommentReactions
s {$sel:reactionUserArn:GetCommentReactions' :: Maybe Text
reactionUserArn = Maybe Text
a} :: GetCommentReactions)

-- | A non-zero, non-negative integer used to limit the number of returned
-- results. The default is the same as the allowed maximum, 1,000.
getCommentReactions_maxResults :: Lens.Lens' GetCommentReactions (Prelude.Maybe Prelude.Int)
getCommentReactions_maxResults :: (Maybe Int -> f (Maybe Int))
-> GetCommentReactions -> f GetCommentReactions
getCommentReactions_maxResults = (GetCommentReactions -> Maybe Int)
-> (GetCommentReactions -> Maybe Int -> GetCommentReactions)
-> Lens
     GetCommentReactions GetCommentReactions (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentReactions' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetCommentReactions' :: GetCommentReactions -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetCommentReactions
s@GetCommentReactions' {} Maybe Int
a -> GetCommentReactions
s {$sel:maxResults:GetCommentReactions' :: Maybe Int
maxResults = Maybe Int
a} :: GetCommentReactions)

-- | The ID of the comment for which you want to get reactions information.
getCommentReactions_commentId :: Lens.Lens' GetCommentReactions Prelude.Text
getCommentReactions_commentId :: (Text -> f Text) -> GetCommentReactions -> f GetCommentReactions
getCommentReactions_commentId = (GetCommentReactions -> Text)
-> (GetCommentReactions -> Text -> GetCommentReactions)
-> Lens GetCommentReactions GetCommentReactions Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentReactions' {Text
commentId :: Text
$sel:commentId:GetCommentReactions' :: GetCommentReactions -> Text
commentId} -> Text
commentId) (\s :: GetCommentReactions
s@GetCommentReactions' {} Text
a -> GetCommentReactions
s {$sel:commentId:GetCommentReactions' :: Text
commentId = Text
a} :: GetCommentReactions)

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

instance Prelude.Hashable GetCommentReactions

instance Prelude.NFData GetCommentReactions

instance Core.ToHeaders GetCommentReactions where
  toHeaders :: GetCommentReactions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetCommentReactions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"CodeCommit_20150413.GetCommentReactions" ::
                          Prelude.ByteString
                      ),
            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.ToJSON GetCommentReactions where
  toJSON :: GetCommentReactions -> Value
toJSON GetCommentReactions' {Maybe Int
Maybe Text
Text
commentId :: Text
maxResults :: Maybe Int
reactionUserArn :: Maybe Text
nextToken :: Maybe Text
$sel:commentId:GetCommentReactions' :: GetCommentReactions -> Text
$sel:maxResults:GetCommentReactions' :: GetCommentReactions -> Maybe Int
$sel:reactionUserArn:GetCommentReactions' :: GetCommentReactions -> Maybe Text
$sel:nextToken:GetCommentReactions' :: GetCommentReactions -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"reactionUserArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
reactionUserArn,
            (Text
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"commentId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
commentId)
          ]
      )

instance Core.ToPath GetCommentReactions where
  toPath :: GetCommentReactions -> ByteString
toPath = ByteString -> GetCommentReactions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetCommentReactions where
  toQuery :: GetCommentReactions -> QueryString
toQuery = QueryString -> GetCommentReactions -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetCommentReactionsResponse' smart constructor.
data GetCommentReactionsResponse = GetCommentReactionsResponse'
  { -- | An enumeration token that can be used in a request to return the next
    -- batch of the results.
    GetCommentReactionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetCommentReactionsResponse -> Int
httpStatus :: Prelude.Int,
    -- | An array of reactions to the specified comment.
    GetCommentReactionsResponse -> [ReactionForComment]
reactionsForComment :: [ReactionForComment]
  }
  deriving (GetCommentReactionsResponse -> GetCommentReactionsResponse -> Bool
(GetCommentReactionsResponse
 -> GetCommentReactionsResponse -> Bool)
-> (GetCommentReactionsResponse
    -> GetCommentReactionsResponse -> Bool)
-> Eq GetCommentReactionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetCommentReactionsResponse -> GetCommentReactionsResponse -> Bool
$c/= :: GetCommentReactionsResponse -> GetCommentReactionsResponse -> Bool
== :: GetCommentReactionsResponse -> GetCommentReactionsResponse -> Bool
$c== :: GetCommentReactionsResponse -> GetCommentReactionsResponse -> Bool
Prelude.Eq, ReadPrec [GetCommentReactionsResponse]
ReadPrec GetCommentReactionsResponse
Int -> ReadS GetCommentReactionsResponse
ReadS [GetCommentReactionsResponse]
(Int -> ReadS GetCommentReactionsResponse)
-> ReadS [GetCommentReactionsResponse]
-> ReadPrec GetCommentReactionsResponse
-> ReadPrec [GetCommentReactionsResponse]
-> Read GetCommentReactionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetCommentReactionsResponse]
$creadListPrec :: ReadPrec [GetCommentReactionsResponse]
readPrec :: ReadPrec GetCommentReactionsResponse
$creadPrec :: ReadPrec GetCommentReactionsResponse
readList :: ReadS [GetCommentReactionsResponse]
$creadList :: ReadS [GetCommentReactionsResponse]
readsPrec :: Int -> ReadS GetCommentReactionsResponse
$creadsPrec :: Int -> ReadS GetCommentReactionsResponse
Prelude.Read, Int -> GetCommentReactionsResponse -> ShowS
[GetCommentReactionsResponse] -> ShowS
GetCommentReactionsResponse -> String
(Int -> GetCommentReactionsResponse -> ShowS)
-> (GetCommentReactionsResponse -> String)
-> ([GetCommentReactionsResponse] -> ShowS)
-> Show GetCommentReactionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetCommentReactionsResponse] -> ShowS
$cshowList :: [GetCommentReactionsResponse] -> ShowS
show :: GetCommentReactionsResponse -> String
$cshow :: GetCommentReactionsResponse -> String
showsPrec :: Int -> GetCommentReactionsResponse -> ShowS
$cshowsPrec :: Int -> GetCommentReactionsResponse -> ShowS
Prelude.Show, (forall x.
 GetCommentReactionsResponse -> Rep GetCommentReactionsResponse x)
-> (forall x.
    Rep GetCommentReactionsResponse x -> GetCommentReactionsResponse)
-> Generic GetCommentReactionsResponse
forall x.
Rep GetCommentReactionsResponse x -> GetCommentReactionsResponse
forall x.
GetCommentReactionsResponse -> Rep GetCommentReactionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetCommentReactionsResponse x -> GetCommentReactionsResponse
$cfrom :: forall x.
GetCommentReactionsResponse -> Rep GetCommentReactionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetCommentReactionsResponse' 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', 'getCommentReactionsResponse_nextToken' - An enumeration token that can be used in a request to return the next
-- batch of the results.
--
-- 'httpStatus', 'getCommentReactionsResponse_httpStatus' - The response's http status code.
--
-- 'reactionsForComment', 'getCommentReactionsResponse_reactionsForComment' - An array of reactions to the specified comment.
newGetCommentReactionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetCommentReactionsResponse
newGetCommentReactionsResponse :: Int -> GetCommentReactionsResponse
newGetCommentReactionsResponse Int
pHttpStatus_ =
  GetCommentReactionsResponse' :: Maybe Text
-> Int -> [ReactionForComment] -> GetCommentReactionsResponse
GetCommentReactionsResponse'
    { $sel:nextToken:GetCommentReactionsResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetCommentReactionsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:reactionsForComment:GetCommentReactionsResponse' :: [ReactionForComment]
reactionsForComment = [ReactionForComment]
forall a. Monoid a => a
Prelude.mempty
    }

-- | An enumeration token that can be used in a request to return the next
-- batch of the results.
getCommentReactionsResponse_nextToken :: Lens.Lens' GetCommentReactionsResponse (Prelude.Maybe Prelude.Text)
getCommentReactionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetCommentReactionsResponse -> f GetCommentReactionsResponse
getCommentReactionsResponse_nextToken = (GetCommentReactionsResponse -> Maybe Text)
-> (GetCommentReactionsResponse
    -> Maybe Text -> GetCommentReactionsResponse)
-> Lens
     GetCommentReactionsResponse
     GetCommentReactionsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentReactionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetCommentReactionsResponse' :: GetCommentReactionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetCommentReactionsResponse
s@GetCommentReactionsResponse' {} Maybe Text
a -> GetCommentReactionsResponse
s {$sel:nextToken:GetCommentReactionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetCommentReactionsResponse)

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

-- | An array of reactions to the specified comment.
getCommentReactionsResponse_reactionsForComment :: Lens.Lens' GetCommentReactionsResponse [ReactionForComment]
getCommentReactionsResponse_reactionsForComment :: ([ReactionForComment] -> f [ReactionForComment])
-> GetCommentReactionsResponse -> f GetCommentReactionsResponse
getCommentReactionsResponse_reactionsForComment = (GetCommentReactionsResponse -> [ReactionForComment])
-> (GetCommentReactionsResponse
    -> [ReactionForComment] -> GetCommentReactionsResponse)
-> Lens
     GetCommentReactionsResponse
     GetCommentReactionsResponse
     [ReactionForComment]
     [ReactionForComment]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetCommentReactionsResponse' {[ReactionForComment]
reactionsForComment :: [ReactionForComment]
$sel:reactionsForComment:GetCommentReactionsResponse' :: GetCommentReactionsResponse -> [ReactionForComment]
reactionsForComment} -> [ReactionForComment]
reactionsForComment) (\s :: GetCommentReactionsResponse
s@GetCommentReactionsResponse' {} [ReactionForComment]
a -> GetCommentReactionsResponse
s {$sel:reactionsForComment:GetCommentReactionsResponse' :: [ReactionForComment]
reactionsForComment = [ReactionForComment]
a} :: GetCommentReactionsResponse) (([ReactionForComment] -> f [ReactionForComment])
 -> GetCommentReactionsResponse -> f GetCommentReactionsResponse)
-> (([ReactionForComment] -> f [ReactionForComment])
    -> [ReactionForComment] -> f [ReactionForComment])
-> ([ReactionForComment] -> f [ReactionForComment])
-> GetCommentReactionsResponse
-> f GetCommentReactionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ReactionForComment] -> f [ReactionForComment])
-> [ReactionForComment] -> f [ReactionForComment]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData GetCommentReactionsResponse