{-# 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.StepFunctions.ListActivities
-- 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)
--
-- Lists the existing activities.
--
-- 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. Each pagination token expires after 24 hours. Using
-- an expired pagination token will return an /HTTP 400 InvalidToken/
-- error.
--
-- This operation is eventually consistent. The results are best effort and
-- may not reflect very recent updates and changes.
--
-- This operation returns paginated results.
module Amazonka.StepFunctions.ListActivities
  ( -- * Creating a Request
    ListActivities (..),
    newListActivities,

    -- * Request Lenses
    listActivities_nextToken,
    listActivities_maxResults,

    -- * Destructuring the Response
    ListActivitiesResponse (..),
    newListActivitiesResponse,

    -- * Response Lenses
    listActivitiesResponse_nextToken,
    listActivitiesResponse_httpStatus,
    listActivitiesResponse_activities,
  )
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.StepFunctions.Types

-- | /See:/ 'newListActivities' smart constructor.
data ListActivities = ListActivities'
  { -- | 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. Each pagination token expires after 24 hours. Using
    -- an expired pagination token will return an /HTTP 400 InvalidToken/
    -- error.
    ListActivities -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results that are returned per call. You can use
    -- @nextToken@ to obtain further pages of results. The default is 100 and
    -- the maximum allowed page size is 1000. A value of 0 uses the default.
    --
    -- This is only an upper limit. The actual number of results returned per
    -- call might be fewer than the specified maximum.
    ListActivities -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListActivities -> ListActivities -> Bool
(ListActivities -> ListActivities -> Bool)
-> (ListActivities -> ListActivities -> Bool) -> Eq ListActivities
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListActivities -> ListActivities -> Bool
$c/= :: ListActivities -> ListActivities -> Bool
== :: ListActivities -> ListActivities -> Bool
$c== :: ListActivities -> ListActivities -> Bool
Prelude.Eq, ReadPrec [ListActivities]
ReadPrec ListActivities
Int -> ReadS ListActivities
ReadS [ListActivities]
(Int -> ReadS ListActivities)
-> ReadS [ListActivities]
-> ReadPrec ListActivities
-> ReadPrec [ListActivities]
-> Read ListActivities
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListActivities]
$creadListPrec :: ReadPrec [ListActivities]
readPrec :: ReadPrec ListActivities
$creadPrec :: ReadPrec ListActivities
readList :: ReadS [ListActivities]
$creadList :: ReadS [ListActivities]
readsPrec :: Int -> ReadS ListActivities
$creadsPrec :: Int -> ReadS ListActivities
Prelude.Read, Int -> ListActivities -> ShowS
[ListActivities] -> ShowS
ListActivities -> String
(Int -> ListActivities -> ShowS)
-> (ListActivities -> String)
-> ([ListActivities] -> ShowS)
-> Show ListActivities
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListActivities] -> ShowS
$cshowList :: [ListActivities] -> ShowS
show :: ListActivities -> String
$cshow :: ListActivities -> String
showsPrec :: Int -> ListActivities -> ShowS
$cshowsPrec :: Int -> ListActivities -> ShowS
Prelude.Show, (forall x. ListActivities -> Rep ListActivities x)
-> (forall x. Rep ListActivities x -> ListActivities)
-> Generic ListActivities
forall x. Rep ListActivities x -> ListActivities
forall x. ListActivities -> Rep ListActivities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListActivities x -> ListActivities
$cfrom :: forall x. ListActivities -> Rep ListActivities x
Prelude.Generic)

-- |
-- Create a value of 'ListActivities' 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', 'listActivities_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. Each pagination token expires after 24 hours. Using
-- an expired pagination token will return an /HTTP 400 InvalidToken/
-- error.
--
-- 'maxResults', 'listActivities_maxResults' - The maximum number of results that are returned per call. You can use
-- @nextToken@ to obtain further pages of results. The default is 100 and
-- the maximum allowed page size is 1000. A value of 0 uses the default.
--
-- This is only an upper limit. The actual number of results returned per
-- call might be fewer than the specified maximum.
newListActivities ::
  ListActivities
newListActivities :: ListActivities
newListActivities =
  ListActivities' :: Maybe Text -> Maybe Natural -> ListActivities
ListActivities'
    { $sel:nextToken:ListActivities' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListActivities' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | 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. Each pagination token expires after 24 hours. Using
-- an expired pagination token will return an /HTTP 400 InvalidToken/
-- error.
listActivities_nextToken :: Lens.Lens' ListActivities (Prelude.Maybe Prelude.Text)
listActivities_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListActivities -> f ListActivities
listActivities_nextToken = (ListActivities -> Maybe Text)
-> (ListActivities -> Maybe Text -> ListActivities)
-> Lens ListActivities ListActivities (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActivities' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListActivities' :: ListActivities -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListActivities
s@ListActivities' {} Maybe Text
a -> ListActivities
s {$sel:nextToken:ListActivities' :: Maybe Text
nextToken = Maybe Text
a} :: ListActivities)

-- | The maximum number of results that are returned per call. You can use
-- @nextToken@ to obtain further pages of results. The default is 100 and
-- the maximum allowed page size is 1000. A value of 0 uses the default.
--
-- This is only an upper limit. The actual number of results returned per
-- call might be fewer than the specified maximum.
listActivities_maxResults :: Lens.Lens' ListActivities (Prelude.Maybe Prelude.Natural)
listActivities_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListActivities -> f ListActivities
listActivities_maxResults = (ListActivities -> Maybe Natural)
-> (ListActivities -> Maybe Natural -> ListActivities)
-> Lens
     ListActivities ListActivities (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActivities' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListActivities' :: ListActivities -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListActivities
s@ListActivities' {} Maybe Natural
a -> ListActivities
s {$sel:maxResults:ListActivities' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListActivities)

instance Core.AWSPager ListActivities where
  page :: ListActivities
-> AWSResponse ListActivities -> Maybe ListActivities
page ListActivities
rq AWSResponse ListActivities
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListActivities
ListActivitiesResponse
rs
            ListActivitiesResponse
-> Getting (First Text) ListActivitiesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListActivitiesResponse
-> Const (First Text) ListActivitiesResponse
Lens' ListActivitiesResponse (Maybe Text)
listActivitiesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListActivitiesResponse
 -> Const (First Text) ListActivitiesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListActivitiesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListActivities
forall a. Maybe a
Prelude.Nothing
    | [ActivityListItem] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListActivities
ListActivitiesResponse
rs ListActivitiesResponse
-> Getting
     [ActivityListItem] ListActivitiesResponse [ActivityListItem]
-> [ActivityListItem]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
  [ActivityListItem] ListActivitiesResponse [ActivityListItem]
Lens' ListActivitiesResponse [ActivityListItem]
listActivitiesResponse_activities) =
      Maybe ListActivities
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListActivities -> Maybe ListActivities
forall a. a -> Maybe a
Prelude.Just (ListActivities -> Maybe ListActivities)
-> ListActivities -> Maybe ListActivities
forall a b. (a -> b) -> a -> b
Prelude.$
        ListActivities
rq
          ListActivities
-> (ListActivities -> ListActivities) -> ListActivities
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListActivities -> Identity ListActivities
Lens ListActivities ListActivities (Maybe Text) (Maybe Text)
listActivities_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListActivities -> Identity ListActivities)
-> Maybe Text -> ListActivities -> ListActivities
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListActivities
ListActivitiesResponse
rs
          ListActivitiesResponse
-> Getting (First Text) ListActivitiesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListActivitiesResponse
-> Const (First Text) ListActivitiesResponse
Lens' ListActivitiesResponse (Maybe Text)
listActivitiesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListActivitiesResponse
 -> Const (First Text) ListActivitiesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListActivitiesResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.Hashable ListActivities

instance Prelude.NFData ListActivities

instance Core.ToHeaders ListActivities where
  toHeaders :: ListActivities -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListActivities -> 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
"AWSStepFunctions.ListActivities" ::
                          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 ListActivities where
  toJSON :: ListActivities -> Value
toJSON ListActivities' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:maxResults:ListActivities' :: ListActivities -> Maybe Natural
$sel:nextToken:ListActivities' :: ListActivities -> 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 -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults
          ]
      )

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

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

-- | /See:/ 'newListActivitiesResponse' smart constructor.
data ListActivitiesResponse = ListActivitiesResponse'
  { -- | 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. Each pagination token expires after 24 hours. Using
    -- an expired pagination token will return an /HTTP 400 InvalidToken/
    -- error.
    ListActivitiesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListActivitiesResponse -> Int
httpStatus :: Prelude.Int,
    -- | The list of activities.
    ListActivitiesResponse -> [ActivityListItem]
activities :: [ActivityListItem]
  }
  deriving (ListActivitiesResponse -> ListActivitiesResponse -> Bool
(ListActivitiesResponse -> ListActivitiesResponse -> Bool)
-> (ListActivitiesResponse -> ListActivitiesResponse -> Bool)
-> Eq ListActivitiesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListActivitiesResponse -> ListActivitiesResponse -> Bool
$c/= :: ListActivitiesResponse -> ListActivitiesResponse -> Bool
== :: ListActivitiesResponse -> ListActivitiesResponse -> Bool
$c== :: ListActivitiesResponse -> ListActivitiesResponse -> Bool
Prelude.Eq, ReadPrec [ListActivitiesResponse]
ReadPrec ListActivitiesResponse
Int -> ReadS ListActivitiesResponse
ReadS [ListActivitiesResponse]
(Int -> ReadS ListActivitiesResponse)
-> ReadS [ListActivitiesResponse]
-> ReadPrec ListActivitiesResponse
-> ReadPrec [ListActivitiesResponse]
-> Read ListActivitiesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListActivitiesResponse]
$creadListPrec :: ReadPrec [ListActivitiesResponse]
readPrec :: ReadPrec ListActivitiesResponse
$creadPrec :: ReadPrec ListActivitiesResponse
readList :: ReadS [ListActivitiesResponse]
$creadList :: ReadS [ListActivitiesResponse]
readsPrec :: Int -> ReadS ListActivitiesResponse
$creadsPrec :: Int -> ReadS ListActivitiesResponse
Prelude.Read, Int -> ListActivitiesResponse -> ShowS
[ListActivitiesResponse] -> ShowS
ListActivitiesResponse -> String
(Int -> ListActivitiesResponse -> ShowS)
-> (ListActivitiesResponse -> String)
-> ([ListActivitiesResponse] -> ShowS)
-> Show ListActivitiesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListActivitiesResponse] -> ShowS
$cshowList :: [ListActivitiesResponse] -> ShowS
show :: ListActivitiesResponse -> String
$cshow :: ListActivitiesResponse -> String
showsPrec :: Int -> ListActivitiesResponse -> ShowS
$cshowsPrec :: Int -> ListActivitiesResponse -> ShowS
Prelude.Show, (forall x. ListActivitiesResponse -> Rep ListActivitiesResponse x)
-> (forall x.
    Rep ListActivitiesResponse x -> ListActivitiesResponse)
-> Generic ListActivitiesResponse
forall x. Rep ListActivitiesResponse x -> ListActivitiesResponse
forall x. ListActivitiesResponse -> Rep ListActivitiesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListActivitiesResponse x -> ListActivitiesResponse
$cfrom :: forall x. ListActivitiesResponse -> Rep ListActivitiesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListActivitiesResponse' 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', 'listActivitiesResponse_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. Each pagination token expires after 24 hours. Using
-- an expired pagination token will return an /HTTP 400 InvalidToken/
-- error.
--
-- 'httpStatus', 'listActivitiesResponse_httpStatus' - The response's http status code.
--
-- 'activities', 'listActivitiesResponse_activities' - The list of activities.
newListActivitiesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListActivitiesResponse
newListActivitiesResponse :: Int -> ListActivitiesResponse
newListActivitiesResponse Int
pHttpStatus_ =
  ListActivitiesResponse' :: Maybe Text -> Int -> [ActivityListItem] -> ListActivitiesResponse
ListActivitiesResponse'
    { $sel:nextToken:ListActivitiesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListActivitiesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:activities:ListActivitiesResponse' :: [ActivityListItem]
activities = [ActivityListItem]
forall a. Monoid a => a
Prelude.mempty
    }

-- | 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. Each pagination token expires after 24 hours. Using
-- an expired pagination token will return an /HTTP 400 InvalidToken/
-- error.
listActivitiesResponse_nextToken :: Lens.Lens' ListActivitiesResponse (Prelude.Maybe Prelude.Text)
listActivitiesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListActivitiesResponse -> f ListActivitiesResponse
listActivitiesResponse_nextToken = (ListActivitiesResponse -> Maybe Text)
-> (ListActivitiesResponse -> Maybe Text -> ListActivitiesResponse)
-> Lens' ListActivitiesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActivitiesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListActivitiesResponse' :: ListActivitiesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListActivitiesResponse
s@ListActivitiesResponse' {} Maybe Text
a -> ListActivitiesResponse
s {$sel:nextToken:ListActivitiesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListActivitiesResponse)

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

-- | The list of activities.
listActivitiesResponse_activities :: Lens.Lens' ListActivitiesResponse [ActivityListItem]
listActivitiesResponse_activities :: ([ActivityListItem] -> f [ActivityListItem])
-> ListActivitiesResponse -> f ListActivitiesResponse
listActivitiesResponse_activities = (ListActivitiesResponse -> [ActivityListItem])
-> (ListActivitiesResponse
    -> [ActivityListItem] -> ListActivitiesResponse)
-> Lens' ListActivitiesResponse [ActivityListItem]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActivitiesResponse' {[ActivityListItem]
activities :: [ActivityListItem]
$sel:activities:ListActivitiesResponse' :: ListActivitiesResponse -> [ActivityListItem]
activities} -> [ActivityListItem]
activities) (\s :: ListActivitiesResponse
s@ListActivitiesResponse' {} [ActivityListItem]
a -> ListActivitiesResponse
s {$sel:activities:ListActivitiesResponse' :: [ActivityListItem]
activities = [ActivityListItem]
a} :: ListActivitiesResponse) (([ActivityListItem] -> f [ActivityListItem])
 -> ListActivitiesResponse -> f ListActivitiesResponse)
-> (([ActivityListItem] -> f [ActivityListItem])
    -> [ActivityListItem] -> f [ActivityListItem])
-> ([ActivityListItem] -> f [ActivityListItem])
-> ListActivitiesResponse
-> f ListActivitiesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ActivityListItem] -> f [ActivityListItem])
-> [ActivityListItem] -> f [ActivityListItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListActivitiesResponse