{-# 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.DataExchange.ListEventActions
-- 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)
--
-- This operation lists your event actions.
--
-- This operation returns paginated results.
module Amazonka.DataExchange.ListEventActions
  ( -- * Creating a Request
    ListEventActions (..),
    newListEventActions,

    -- * Request Lenses
    listEventActions_eventSourceId,
    listEventActions_nextToken,
    listEventActions_maxResults,

    -- * Destructuring the Response
    ListEventActionsResponse (..),
    newListEventActionsResponse,

    -- * Response Lenses
    listEventActionsResponse_eventActions,
    listEventActionsResponse_nextToken,
    listEventActionsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DataExchange.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:/ 'newListEventActions' smart constructor.
data ListEventActions = ListEventActions'
  { -- | The unique identifier for the event source.
    ListEventActions -> Maybe Text
eventSourceId :: Prelude.Maybe Prelude.Text,
    -- | The token value retrieved from a previous call to access the next page
    -- of results.
    ListEventActions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results returned by a single call.
    ListEventActions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListEventActions -> ListEventActions -> Bool
(ListEventActions -> ListEventActions -> Bool)
-> (ListEventActions -> ListEventActions -> Bool)
-> Eq ListEventActions
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEventActions -> ListEventActions -> Bool
$c/= :: ListEventActions -> ListEventActions -> Bool
== :: ListEventActions -> ListEventActions -> Bool
$c== :: ListEventActions -> ListEventActions -> Bool
Prelude.Eq, ReadPrec [ListEventActions]
ReadPrec ListEventActions
Int -> ReadS ListEventActions
ReadS [ListEventActions]
(Int -> ReadS ListEventActions)
-> ReadS [ListEventActions]
-> ReadPrec ListEventActions
-> ReadPrec [ListEventActions]
-> Read ListEventActions
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEventActions]
$creadListPrec :: ReadPrec [ListEventActions]
readPrec :: ReadPrec ListEventActions
$creadPrec :: ReadPrec ListEventActions
readList :: ReadS [ListEventActions]
$creadList :: ReadS [ListEventActions]
readsPrec :: Int -> ReadS ListEventActions
$creadsPrec :: Int -> ReadS ListEventActions
Prelude.Read, Int -> ListEventActions -> ShowS
[ListEventActions] -> ShowS
ListEventActions -> String
(Int -> ListEventActions -> ShowS)
-> (ListEventActions -> String)
-> ([ListEventActions] -> ShowS)
-> Show ListEventActions
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEventActions] -> ShowS
$cshowList :: [ListEventActions] -> ShowS
show :: ListEventActions -> String
$cshow :: ListEventActions -> String
showsPrec :: Int -> ListEventActions -> ShowS
$cshowsPrec :: Int -> ListEventActions -> ShowS
Prelude.Show, (forall x. ListEventActions -> Rep ListEventActions x)
-> (forall x. Rep ListEventActions x -> ListEventActions)
-> Generic ListEventActions
forall x. Rep ListEventActions x -> ListEventActions
forall x. ListEventActions -> Rep ListEventActions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListEventActions x -> ListEventActions
$cfrom :: forall x. ListEventActions -> Rep ListEventActions x
Prelude.Generic)

-- |
-- Create a value of 'ListEventActions' 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:
--
-- 'eventSourceId', 'listEventActions_eventSourceId' - The unique identifier for the event source.
--
-- 'nextToken', 'listEventActions_nextToken' - The token value retrieved from a previous call to access the next page
-- of results.
--
-- 'maxResults', 'listEventActions_maxResults' - The maximum number of results returned by a single call.
newListEventActions ::
  ListEventActions
newListEventActions :: ListEventActions
newListEventActions =
  ListEventActions' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListEventActions
ListEventActions'
    { $sel:eventSourceId:ListEventActions' :: Maybe Text
eventSourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListEventActions' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListEventActions' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The unique identifier for the event source.
listEventActions_eventSourceId :: Lens.Lens' ListEventActions (Prelude.Maybe Prelude.Text)
listEventActions_eventSourceId :: (Maybe Text -> f (Maybe Text))
-> ListEventActions -> f ListEventActions
listEventActions_eventSourceId = (ListEventActions -> Maybe Text)
-> (ListEventActions -> Maybe Text -> ListEventActions)
-> Lens ListEventActions ListEventActions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventActions' {Maybe Text
eventSourceId :: Maybe Text
$sel:eventSourceId:ListEventActions' :: ListEventActions -> Maybe Text
eventSourceId} -> Maybe Text
eventSourceId) (\s :: ListEventActions
s@ListEventActions' {} Maybe Text
a -> ListEventActions
s {$sel:eventSourceId:ListEventActions' :: Maybe Text
eventSourceId = Maybe Text
a} :: ListEventActions)

-- | The token value retrieved from a previous call to access the next page
-- of results.
listEventActions_nextToken :: Lens.Lens' ListEventActions (Prelude.Maybe Prelude.Text)
listEventActions_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEventActions -> f ListEventActions
listEventActions_nextToken = (ListEventActions -> Maybe Text)
-> (ListEventActions -> Maybe Text -> ListEventActions)
-> Lens ListEventActions ListEventActions (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventActions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEventActions' :: ListEventActions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEventActions
s@ListEventActions' {} Maybe Text
a -> ListEventActions
s {$sel:nextToken:ListEventActions' :: Maybe Text
nextToken = Maybe Text
a} :: ListEventActions)

-- | The maximum number of results returned by a single call.
listEventActions_maxResults :: Lens.Lens' ListEventActions (Prelude.Maybe Prelude.Natural)
listEventActions_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListEventActions -> f ListEventActions
listEventActions_maxResults = (ListEventActions -> Maybe Natural)
-> (ListEventActions -> Maybe Natural -> ListEventActions)
-> Lens
     ListEventActions ListEventActions (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventActions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListEventActions' :: ListEventActions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListEventActions
s@ListEventActions' {} Maybe Natural
a -> ListEventActions
s {$sel:maxResults:ListEventActions' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListEventActions)

instance Core.AWSPager ListEventActions where
  page :: ListEventActions
-> AWSResponse ListEventActions -> Maybe ListEventActions
page ListEventActions
rq AWSResponse ListEventActions
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEventActions
ListEventActionsResponse
rs
            ListEventActionsResponse
-> Getting (First Text) ListEventActionsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEventActionsResponse
-> Const (First Text) ListEventActionsResponse
Lens' ListEventActionsResponse (Maybe Text)
listEventActionsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListEventActionsResponse
 -> Const (First Text) ListEventActionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEventActionsResponse 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 ListEventActions
forall a. Maybe a
Prelude.Nothing
    | Maybe [EventActionEntry] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListEventActions
ListEventActionsResponse
rs
            ListEventActionsResponse
-> Getting
     (First [EventActionEntry])
     ListEventActionsResponse
     [EventActionEntry]
-> Maybe [EventActionEntry]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [EventActionEntry]
 -> Const (First [EventActionEntry]) (Maybe [EventActionEntry]))
-> ListEventActionsResponse
-> Const (First [EventActionEntry]) ListEventActionsResponse
Lens' ListEventActionsResponse (Maybe [EventActionEntry])
listEventActionsResponse_eventActions
              ((Maybe [EventActionEntry]
  -> Const (First [EventActionEntry]) (Maybe [EventActionEntry]))
 -> ListEventActionsResponse
 -> Const (First [EventActionEntry]) ListEventActionsResponse)
-> (([EventActionEntry]
     -> Const (First [EventActionEntry]) [EventActionEntry])
    -> Maybe [EventActionEntry]
    -> Const (First [EventActionEntry]) (Maybe [EventActionEntry]))
-> Getting
     (First [EventActionEntry])
     ListEventActionsResponse
     [EventActionEntry]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([EventActionEntry]
 -> Const (First [EventActionEntry]) [EventActionEntry])
-> Maybe [EventActionEntry]
-> Const (First [EventActionEntry]) (Maybe [EventActionEntry])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListEventActions
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListEventActions -> Maybe ListEventActions
forall a. a -> Maybe a
Prelude.Just (ListEventActions -> Maybe ListEventActions)
-> ListEventActions -> Maybe ListEventActions
forall a b. (a -> b) -> a -> b
Prelude.$
        ListEventActions
rq
          ListEventActions
-> (ListEventActions -> ListEventActions) -> ListEventActions
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListEventActions -> Identity ListEventActions
Lens ListEventActions ListEventActions (Maybe Text) (Maybe Text)
listEventActions_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListEventActions -> Identity ListEventActions)
-> Maybe Text -> ListEventActions -> ListEventActions
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListEventActions
ListEventActionsResponse
rs
          ListEventActionsResponse
-> Getting (First Text) ListEventActionsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListEventActionsResponse
-> Const (First Text) ListEventActionsResponse
Lens' ListEventActionsResponse (Maybe Text)
listEventActionsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListEventActionsResponse
 -> Const (First Text) ListEventActionsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListEventActionsResponse 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 ListEventActions where
  type
    AWSResponse ListEventActions =
      ListEventActionsResponse
  request :: ListEventActions -> Request ListEventActions
request = Service -> ListEventActions -> Request ListEventActions
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListEventActions
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListEventActions)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListEventActions))
-> Logger
-> Service
-> Proxy ListEventActions
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListEventActions)))
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 [EventActionEntry]
-> Maybe Text -> Int -> ListEventActionsResponse
ListEventActionsResponse'
            (Maybe [EventActionEntry]
 -> Maybe Text -> Int -> ListEventActionsResponse)
-> Either String (Maybe [EventActionEntry])
-> Either String (Maybe Text -> Int -> ListEventActionsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [EventActionEntry]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EventActions" Either String (Maybe (Maybe [EventActionEntry]))
-> Maybe [EventActionEntry]
-> Either String (Maybe [EventActionEntry])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [EventActionEntry]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListEventActionsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListEventActionsResponse)
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 -> ListEventActionsResponse)
-> Either String Int -> Either String ListEventActionsResponse
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 ListEventActions

instance Prelude.NFData ListEventActions

instance Core.ToHeaders ListEventActions where
  toHeaders :: ListEventActions -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListEventActions -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToPath ListEventActions where
  toPath :: ListEventActions -> ByteString
toPath = ByteString -> ListEventActions -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/v1/event-actions"

instance Core.ToQuery ListEventActions where
  toQuery :: ListEventActions -> QueryString
toQuery ListEventActions' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
eventSourceId :: Maybe Text
$sel:maxResults:ListEventActions' :: ListEventActions -> Maybe Natural
$sel:nextToken:ListEventActions' :: ListEventActions -> Maybe Text
$sel:eventSourceId:ListEventActions' :: ListEventActions -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"eventSourceId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
eventSourceId,
        ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
        ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListEventActionsResponse' smart constructor.
data ListEventActionsResponse = ListEventActionsResponse'
  { -- | The event action objects listed by the request.
    ListEventActionsResponse -> Maybe [EventActionEntry]
eventActions :: Prelude.Maybe [EventActionEntry],
    -- | The token value retrieved from a previous call to access the next page
    -- of results.
    ListEventActionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListEventActionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListEventActionsResponse -> ListEventActionsResponse -> Bool
(ListEventActionsResponse -> ListEventActionsResponse -> Bool)
-> (ListEventActionsResponse -> ListEventActionsResponse -> Bool)
-> Eq ListEventActionsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListEventActionsResponse -> ListEventActionsResponse -> Bool
$c/= :: ListEventActionsResponse -> ListEventActionsResponse -> Bool
== :: ListEventActionsResponse -> ListEventActionsResponse -> Bool
$c== :: ListEventActionsResponse -> ListEventActionsResponse -> Bool
Prelude.Eq, ReadPrec [ListEventActionsResponse]
ReadPrec ListEventActionsResponse
Int -> ReadS ListEventActionsResponse
ReadS [ListEventActionsResponse]
(Int -> ReadS ListEventActionsResponse)
-> ReadS [ListEventActionsResponse]
-> ReadPrec ListEventActionsResponse
-> ReadPrec [ListEventActionsResponse]
-> Read ListEventActionsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListEventActionsResponse]
$creadListPrec :: ReadPrec [ListEventActionsResponse]
readPrec :: ReadPrec ListEventActionsResponse
$creadPrec :: ReadPrec ListEventActionsResponse
readList :: ReadS [ListEventActionsResponse]
$creadList :: ReadS [ListEventActionsResponse]
readsPrec :: Int -> ReadS ListEventActionsResponse
$creadsPrec :: Int -> ReadS ListEventActionsResponse
Prelude.Read, Int -> ListEventActionsResponse -> ShowS
[ListEventActionsResponse] -> ShowS
ListEventActionsResponse -> String
(Int -> ListEventActionsResponse -> ShowS)
-> (ListEventActionsResponse -> String)
-> ([ListEventActionsResponse] -> ShowS)
-> Show ListEventActionsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListEventActionsResponse] -> ShowS
$cshowList :: [ListEventActionsResponse] -> ShowS
show :: ListEventActionsResponse -> String
$cshow :: ListEventActionsResponse -> String
showsPrec :: Int -> ListEventActionsResponse -> ShowS
$cshowsPrec :: Int -> ListEventActionsResponse -> ShowS
Prelude.Show, (forall x.
 ListEventActionsResponse -> Rep ListEventActionsResponse x)
-> (forall x.
    Rep ListEventActionsResponse x -> ListEventActionsResponse)
-> Generic ListEventActionsResponse
forall x.
Rep ListEventActionsResponse x -> ListEventActionsResponse
forall x.
ListEventActionsResponse -> Rep ListEventActionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListEventActionsResponse x -> ListEventActionsResponse
$cfrom :: forall x.
ListEventActionsResponse -> Rep ListEventActionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListEventActionsResponse' 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:
--
-- 'eventActions', 'listEventActionsResponse_eventActions' - The event action objects listed by the request.
--
-- 'nextToken', 'listEventActionsResponse_nextToken' - The token value retrieved from a previous call to access the next page
-- of results.
--
-- 'httpStatus', 'listEventActionsResponse_httpStatus' - The response's http status code.
newListEventActionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListEventActionsResponse
newListEventActionsResponse :: Int -> ListEventActionsResponse
newListEventActionsResponse Int
pHttpStatus_ =
  ListEventActionsResponse' :: Maybe [EventActionEntry]
-> Maybe Text -> Int -> ListEventActionsResponse
ListEventActionsResponse'
    { $sel:eventActions:ListEventActionsResponse' :: Maybe [EventActionEntry]
eventActions =
        Maybe [EventActionEntry]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListEventActionsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListEventActionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The event action objects listed by the request.
listEventActionsResponse_eventActions :: Lens.Lens' ListEventActionsResponse (Prelude.Maybe [EventActionEntry])
listEventActionsResponse_eventActions :: (Maybe [EventActionEntry] -> f (Maybe [EventActionEntry]))
-> ListEventActionsResponse -> f ListEventActionsResponse
listEventActionsResponse_eventActions = (ListEventActionsResponse -> Maybe [EventActionEntry])
-> (ListEventActionsResponse
    -> Maybe [EventActionEntry] -> ListEventActionsResponse)
-> Lens' ListEventActionsResponse (Maybe [EventActionEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventActionsResponse' {Maybe [EventActionEntry]
eventActions :: Maybe [EventActionEntry]
$sel:eventActions:ListEventActionsResponse' :: ListEventActionsResponse -> Maybe [EventActionEntry]
eventActions} -> Maybe [EventActionEntry]
eventActions) (\s :: ListEventActionsResponse
s@ListEventActionsResponse' {} Maybe [EventActionEntry]
a -> ListEventActionsResponse
s {$sel:eventActions:ListEventActionsResponse' :: Maybe [EventActionEntry]
eventActions = Maybe [EventActionEntry]
a} :: ListEventActionsResponse) ((Maybe [EventActionEntry] -> f (Maybe [EventActionEntry]))
 -> ListEventActionsResponse -> f ListEventActionsResponse)
-> ((Maybe [EventActionEntry] -> f (Maybe [EventActionEntry]))
    -> Maybe [EventActionEntry] -> f (Maybe [EventActionEntry]))
-> (Maybe [EventActionEntry] -> f (Maybe [EventActionEntry]))
-> ListEventActionsResponse
-> f ListEventActionsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [EventActionEntry]
  [EventActionEntry]
  [EventActionEntry]
  [EventActionEntry]
-> Iso
     (Maybe [EventActionEntry])
     (Maybe [EventActionEntry])
     (Maybe [EventActionEntry])
     (Maybe [EventActionEntry])
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
  [EventActionEntry]
  [EventActionEntry]
  [EventActionEntry]
  [EventActionEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The token value retrieved from a previous call to access the next page
-- of results.
listEventActionsResponse_nextToken :: Lens.Lens' ListEventActionsResponse (Prelude.Maybe Prelude.Text)
listEventActionsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListEventActionsResponse -> f ListEventActionsResponse
listEventActionsResponse_nextToken = (ListEventActionsResponse -> Maybe Text)
-> (ListEventActionsResponse
    -> Maybe Text -> ListEventActionsResponse)
-> Lens' ListEventActionsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListEventActionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListEventActionsResponse' :: ListEventActionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListEventActionsResponse
s@ListEventActionsResponse' {} Maybe Text
a -> ListEventActionsResponse
s {$sel:nextToken:ListEventActionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListEventActionsResponse)

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

instance Prelude.NFData ListEventActionsResponse