{-# 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.DynamoDB.ListContributorInsights
-- 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 a list of ContributorInsightsSummary for a table and all its
-- global secondary indexes.
module Amazonka.DynamoDB.ListContributorInsights
  ( -- * Creating a Request
    ListContributorInsights (..),
    newListContributorInsights,

    -- * Request Lenses
    listContributorInsights_nextToken,
    listContributorInsights_maxResults,
    listContributorInsights_tableName,

    -- * Destructuring the Response
    ListContributorInsightsResponse (..),
    newListContributorInsightsResponse,

    -- * Response Lenses
    listContributorInsightsResponse_contributorInsightsSummaries,
    listContributorInsightsResponse_nextToken,
    listContributorInsightsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DynamoDB.Types
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:/ 'newListContributorInsights' smart constructor.
data ListContributorInsights = ListContributorInsights'
  { -- | A token to for the desired page, if there is one.
    ListContributorInsights -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Maximum number of results to return per page.
    ListContributorInsights -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | The name of the table.
    ListContributorInsights -> Maybe Text
tableName :: Prelude.Maybe Prelude.Text
  }
  deriving (ListContributorInsights -> ListContributorInsights -> Bool
(ListContributorInsights -> ListContributorInsights -> Bool)
-> (ListContributorInsights -> ListContributorInsights -> Bool)
-> Eq ListContributorInsights
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListContributorInsights -> ListContributorInsights -> Bool
$c/= :: ListContributorInsights -> ListContributorInsights -> Bool
== :: ListContributorInsights -> ListContributorInsights -> Bool
$c== :: ListContributorInsights -> ListContributorInsights -> Bool
Prelude.Eq, ReadPrec [ListContributorInsights]
ReadPrec ListContributorInsights
Int -> ReadS ListContributorInsights
ReadS [ListContributorInsights]
(Int -> ReadS ListContributorInsights)
-> ReadS [ListContributorInsights]
-> ReadPrec ListContributorInsights
-> ReadPrec [ListContributorInsights]
-> Read ListContributorInsights
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListContributorInsights]
$creadListPrec :: ReadPrec [ListContributorInsights]
readPrec :: ReadPrec ListContributorInsights
$creadPrec :: ReadPrec ListContributorInsights
readList :: ReadS [ListContributorInsights]
$creadList :: ReadS [ListContributorInsights]
readsPrec :: Int -> ReadS ListContributorInsights
$creadsPrec :: Int -> ReadS ListContributorInsights
Prelude.Read, Int -> ListContributorInsights -> ShowS
[ListContributorInsights] -> ShowS
ListContributorInsights -> String
(Int -> ListContributorInsights -> ShowS)
-> (ListContributorInsights -> String)
-> ([ListContributorInsights] -> ShowS)
-> Show ListContributorInsights
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListContributorInsights] -> ShowS
$cshowList :: [ListContributorInsights] -> ShowS
show :: ListContributorInsights -> String
$cshow :: ListContributorInsights -> String
showsPrec :: Int -> ListContributorInsights -> ShowS
$cshowsPrec :: Int -> ListContributorInsights -> ShowS
Prelude.Show, (forall x.
 ListContributorInsights -> Rep ListContributorInsights x)
-> (forall x.
    Rep ListContributorInsights x -> ListContributorInsights)
-> Generic ListContributorInsights
forall x. Rep ListContributorInsights x -> ListContributorInsights
forall x. ListContributorInsights -> Rep ListContributorInsights x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListContributorInsights x -> ListContributorInsights
$cfrom :: forall x. ListContributorInsights -> Rep ListContributorInsights x
Prelude.Generic)

-- |
-- Create a value of 'ListContributorInsights' 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', 'listContributorInsights_nextToken' - A token to for the desired page, if there is one.
--
-- 'maxResults', 'listContributorInsights_maxResults' - Maximum number of results to return per page.
--
-- 'tableName', 'listContributorInsights_tableName' - The name of the table.
newListContributorInsights ::
  ListContributorInsights
newListContributorInsights :: ListContributorInsights
newListContributorInsights =
  ListContributorInsights' :: Maybe Text -> Maybe Int -> Maybe Text -> ListContributorInsights
ListContributorInsights'
    { $sel:nextToken:ListContributorInsights' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListContributorInsights' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:tableName:ListContributorInsights' :: Maybe Text
tableName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A token to for the desired page, if there is one.
listContributorInsights_nextToken :: Lens.Lens' ListContributorInsights (Prelude.Maybe Prelude.Text)
listContributorInsights_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListContributorInsights -> f ListContributorInsights
listContributorInsights_nextToken = (ListContributorInsights -> Maybe Text)
-> (ListContributorInsights
    -> Maybe Text -> ListContributorInsights)
-> Lens
     ListContributorInsights
     ListContributorInsights
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContributorInsights' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListContributorInsights' :: ListContributorInsights -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListContributorInsights
s@ListContributorInsights' {} Maybe Text
a -> ListContributorInsights
s {$sel:nextToken:ListContributorInsights' :: Maybe Text
nextToken = Maybe Text
a} :: ListContributorInsights)

-- | Maximum number of results to return per page.
listContributorInsights_maxResults :: Lens.Lens' ListContributorInsights (Prelude.Maybe Prelude.Int)
listContributorInsights_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListContributorInsights -> f ListContributorInsights
listContributorInsights_maxResults = (ListContributorInsights -> Maybe Int)
-> (ListContributorInsights
    -> Maybe Int -> ListContributorInsights)
-> Lens
     ListContributorInsights
     ListContributorInsights
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContributorInsights' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListContributorInsights' :: ListContributorInsights -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListContributorInsights
s@ListContributorInsights' {} Maybe Int
a -> ListContributorInsights
s {$sel:maxResults:ListContributorInsights' :: Maybe Int
maxResults = Maybe Int
a} :: ListContributorInsights)

-- | The name of the table.
listContributorInsights_tableName :: Lens.Lens' ListContributorInsights (Prelude.Maybe Prelude.Text)
listContributorInsights_tableName :: (Maybe Text -> f (Maybe Text))
-> ListContributorInsights -> f ListContributorInsights
listContributorInsights_tableName = (ListContributorInsights -> Maybe Text)
-> (ListContributorInsights
    -> Maybe Text -> ListContributorInsights)
-> Lens
     ListContributorInsights
     ListContributorInsights
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContributorInsights' {Maybe Text
tableName :: Maybe Text
$sel:tableName:ListContributorInsights' :: ListContributorInsights -> Maybe Text
tableName} -> Maybe Text
tableName) (\s :: ListContributorInsights
s@ListContributorInsights' {} Maybe Text
a -> ListContributorInsights
s {$sel:tableName:ListContributorInsights' :: Maybe Text
tableName = Maybe Text
a} :: ListContributorInsights)

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

instance Prelude.NFData ListContributorInsights

instance Core.ToHeaders ListContributorInsights where
  toHeaders :: ListContributorInsights -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListContributorInsights -> 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
"DynamoDB_20120810.ListContributorInsights" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON ListContributorInsights where
  toJSON :: ListContributorInsights -> Value
toJSON ListContributorInsights' {Maybe Int
Maybe Text
tableName :: Maybe Text
maxResults :: Maybe Int
nextToken :: Maybe Text
$sel:tableName:ListContributorInsights' :: ListContributorInsights -> Maybe Text
$sel:maxResults:ListContributorInsights' :: ListContributorInsights -> Maybe Int
$sel:nextToken:ListContributorInsights' :: ListContributorInsights -> 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
"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,
            (Text
"TableName" 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
tableName
          ]
      )

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

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

-- | /See:/ 'newListContributorInsightsResponse' smart constructor.
data ListContributorInsightsResponse = ListContributorInsightsResponse'
  { -- | A list of ContributorInsightsSummary.
    ListContributorInsightsResponse
-> Maybe [ContributorInsightsSummary]
contributorInsightsSummaries :: Prelude.Maybe [ContributorInsightsSummary],
    -- | A token to go to the next page if there is one.
    ListContributorInsightsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListContributorInsightsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListContributorInsightsResponse
-> ListContributorInsightsResponse -> Bool
(ListContributorInsightsResponse
 -> ListContributorInsightsResponse -> Bool)
-> (ListContributorInsightsResponse
    -> ListContributorInsightsResponse -> Bool)
-> Eq ListContributorInsightsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListContributorInsightsResponse
-> ListContributorInsightsResponse -> Bool
$c/= :: ListContributorInsightsResponse
-> ListContributorInsightsResponse -> Bool
== :: ListContributorInsightsResponse
-> ListContributorInsightsResponse -> Bool
$c== :: ListContributorInsightsResponse
-> ListContributorInsightsResponse -> Bool
Prelude.Eq, ReadPrec [ListContributorInsightsResponse]
ReadPrec ListContributorInsightsResponse
Int -> ReadS ListContributorInsightsResponse
ReadS [ListContributorInsightsResponse]
(Int -> ReadS ListContributorInsightsResponse)
-> ReadS [ListContributorInsightsResponse]
-> ReadPrec ListContributorInsightsResponse
-> ReadPrec [ListContributorInsightsResponse]
-> Read ListContributorInsightsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListContributorInsightsResponse]
$creadListPrec :: ReadPrec [ListContributorInsightsResponse]
readPrec :: ReadPrec ListContributorInsightsResponse
$creadPrec :: ReadPrec ListContributorInsightsResponse
readList :: ReadS [ListContributorInsightsResponse]
$creadList :: ReadS [ListContributorInsightsResponse]
readsPrec :: Int -> ReadS ListContributorInsightsResponse
$creadsPrec :: Int -> ReadS ListContributorInsightsResponse
Prelude.Read, Int -> ListContributorInsightsResponse -> ShowS
[ListContributorInsightsResponse] -> ShowS
ListContributorInsightsResponse -> String
(Int -> ListContributorInsightsResponse -> ShowS)
-> (ListContributorInsightsResponse -> String)
-> ([ListContributorInsightsResponse] -> ShowS)
-> Show ListContributorInsightsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListContributorInsightsResponse] -> ShowS
$cshowList :: [ListContributorInsightsResponse] -> ShowS
show :: ListContributorInsightsResponse -> String
$cshow :: ListContributorInsightsResponse -> String
showsPrec :: Int -> ListContributorInsightsResponse -> ShowS
$cshowsPrec :: Int -> ListContributorInsightsResponse -> ShowS
Prelude.Show, (forall x.
 ListContributorInsightsResponse
 -> Rep ListContributorInsightsResponse x)
-> (forall x.
    Rep ListContributorInsightsResponse x
    -> ListContributorInsightsResponse)
-> Generic ListContributorInsightsResponse
forall x.
Rep ListContributorInsightsResponse x
-> ListContributorInsightsResponse
forall x.
ListContributorInsightsResponse
-> Rep ListContributorInsightsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListContributorInsightsResponse x
-> ListContributorInsightsResponse
$cfrom :: forall x.
ListContributorInsightsResponse
-> Rep ListContributorInsightsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListContributorInsightsResponse' 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:
--
-- 'contributorInsightsSummaries', 'listContributorInsightsResponse_contributorInsightsSummaries' - A list of ContributorInsightsSummary.
--
-- 'nextToken', 'listContributorInsightsResponse_nextToken' - A token to go to the next page if there is one.
--
-- 'httpStatus', 'listContributorInsightsResponse_httpStatus' - The response's http status code.
newListContributorInsightsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListContributorInsightsResponse
newListContributorInsightsResponse :: Int -> ListContributorInsightsResponse
newListContributorInsightsResponse Int
pHttpStatus_ =
  ListContributorInsightsResponse' :: Maybe [ContributorInsightsSummary]
-> Maybe Text -> Int -> ListContributorInsightsResponse
ListContributorInsightsResponse'
    { $sel:contributorInsightsSummaries:ListContributorInsightsResponse' :: Maybe [ContributorInsightsSummary]
contributorInsightsSummaries =
        Maybe [ContributorInsightsSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListContributorInsightsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListContributorInsightsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of ContributorInsightsSummary.
listContributorInsightsResponse_contributorInsightsSummaries :: Lens.Lens' ListContributorInsightsResponse (Prelude.Maybe [ContributorInsightsSummary])
listContributorInsightsResponse_contributorInsightsSummaries :: (Maybe [ContributorInsightsSummary]
 -> f (Maybe [ContributorInsightsSummary]))
-> ListContributorInsightsResponse
-> f ListContributorInsightsResponse
listContributorInsightsResponse_contributorInsightsSummaries = (ListContributorInsightsResponse
 -> Maybe [ContributorInsightsSummary])
-> (ListContributorInsightsResponse
    -> Maybe [ContributorInsightsSummary]
    -> ListContributorInsightsResponse)
-> Lens
     ListContributorInsightsResponse
     ListContributorInsightsResponse
     (Maybe [ContributorInsightsSummary])
     (Maybe [ContributorInsightsSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContributorInsightsResponse' {Maybe [ContributorInsightsSummary]
contributorInsightsSummaries :: Maybe [ContributorInsightsSummary]
$sel:contributorInsightsSummaries:ListContributorInsightsResponse' :: ListContributorInsightsResponse
-> Maybe [ContributorInsightsSummary]
contributorInsightsSummaries} -> Maybe [ContributorInsightsSummary]
contributorInsightsSummaries) (\s :: ListContributorInsightsResponse
s@ListContributorInsightsResponse' {} Maybe [ContributorInsightsSummary]
a -> ListContributorInsightsResponse
s {$sel:contributorInsightsSummaries:ListContributorInsightsResponse' :: Maybe [ContributorInsightsSummary]
contributorInsightsSummaries = Maybe [ContributorInsightsSummary]
a} :: ListContributorInsightsResponse) ((Maybe [ContributorInsightsSummary]
  -> f (Maybe [ContributorInsightsSummary]))
 -> ListContributorInsightsResponse
 -> f ListContributorInsightsResponse)
-> ((Maybe [ContributorInsightsSummary]
     -> f (Maybe [ContributorInsightsSummary]))
    -> Maybe [ContributorInsightsSummary]
    -> f (Maybe [ContributorInsightsSummary]))
-> (Maybe [ContributorInsightsSummary]
    -> f (Maybe [ContributorInsightsSummary]))
-> ListContributorInsightsResponse
-> f ListContributorInsightsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ContributorInsightsSummary]
  [ContributorInsightsSummary]
  [ContributorInsightsSummary]
  [ContributorInsightsSummary]
-> Iso
     (Maybe [ContributorInsightsSummary])
     (Maybe [ContributorInsightsSummary])
     (Maybe [ContributorInsightsSummary])
     (Maybe [ContributorInsightsSummary])
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
  [ContributorInsightsSummary]
  [ContributorInsightsSummary]
  [ContributorInsightsSummary]
  [ContributorInsightsSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A token to go to the next page if there is one.
listContributorInsightsResponse_nextToken :: Lens.Lens' ListContributorInsightsResponse (Prelude.Maybe Prelude.Text)
listContributorInsightsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListContributorInsightsResponse
-> f ListContributorInsightsResponse
listContributorInsightsResponse_nextToken = (ListContributorInsightsResponse -> Maybe Text)
-> (ListContributorInsightsResponse
    -> Maybe Text -> ListContributorInsightsResponse)
-> Lens
     ListContributorInsightsResponse
     ListContributorInsightsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListContributorInsightsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListContributorInsightsResponse' :: ListContributorInsightsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListContributorInsightsResponse
s@ListContributorInsightsResponse' {} Maybe Text
a -> ListContributorInsightsResponse
s {$sel:nextToken:ListContributorInsightsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListContributorInsightsResponse)

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

instance
  Prelude.NFData
    ListContributorInsightsResponse