{-# 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.CodePipeline.ListActionTypes
-- 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)
--
-- Gets a summary of all AWS CodePipeline action types associated with your
-- account.
--
-- This operation returns paginated results.
module Amazonka.CodePipeline.ListActionTypes
  ( -- * Creating a Request
    ListActionTypes (..),
    newListActionTypes,

    -- * Request Lenses
    listActionTypes_actionOwnerFilter,
    listActionTypes_regionFilter,
    listActionTypes_nextToken,

    -- * Destructuring the Response
    ListActionTypesResponse (..),
    newListActionTypesResponse,

    -- * Response Lenses
    listActionTypesResponse_nextToken,
    listActionTypesResponse_httpStatus,
    listActionTypesResponse_actionTypes,
  )
where

import Amazonka.CodePipeline.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

-- | Represents the input of a @ListActionTypes@ action.
--
-- /See:/ 'newListActionTypes' smart constructor.
data ListActionTypes = ListActionTypes'
  { -- | Filters the list of action types to those created by a specified entity.
    ListActionTypes -> Maybe ActionOwner
actionOwnerFilter :: Prelude.Maybe ActionOwner,
    -- | The Region to filter on for the list of action types.
    ListActionTypes -> Maybe Text
regionFilter :: Prelude.Maybe Prelude.Text,
    -- | An identifier that was returned from the previous list action types
    -- call, which can be used to return the next set of action types in the
    -- list.
    ListActionTypes -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListActionTypes -> ListActionTypes -> Bool
(ListActionTypes -> ListActionTypes -> Bool)
-> (ListActionTypes -> ListActionTypes -> Bool)
-> Eq ListActionTypes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListActionTypes -> ListActionTypes -> Bool
$c/= :: ListActionTypes -> ListActionTypes -> Bool
== :: ListActionTypes -> ListActionTypes -> Bool
$c== :: ListActionTypes -> ListActionTypes -> Bool
Prelude.Eq, ReadPrec [ListActionTypes]
ReadPrec ListActionTypes
Int -> ReadS ListActionTypes
ReadS [ListActionTypes]
(Int -> ReadS ListActionTypes)
-> ReadS [ListActionTypes]
-> ReadPrec ListActionTypes
-> ReadPrec [ListActionTypes]
-> Read ListActionTypes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListActionTypes]
$creadListPrec :: ReadPrec [ListActionTypes]
readPrec :: ReadPrec ListActionTypes
$creadPrec :: ReadPrec ListActionTypes
readList :: ReadS [ListActionTypes]
$creadList :: ReadS [ListActionTypes]
readsPrec :: Int -> ReadS ListActionTypes
$creadsPrec :: Int -> ReadS ListActionTypes
Prelude.Read, Int -> ListActionTypes -> ShowS
[ListActionTypes] -> ShowS
ListActionTypes -> String
(Int -> ListActionTypes -> ShowS)
-> (ListActionTypes -> String)
-> ([ListActionTypes] -> ShowS)
-> Show ListActionTypes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListActionTypes] -> ShowS
$cshowList :: [ListActionTypes] -> ShowS
show :: ListActionTypes -> String
$cshow :: ListActionTypes -> String
showsPrec :: Int -> ListActionTypes -> ShowS
$cshowsPrec :: Int -> ListActionTypes -> ShowS
Prelude.Show, (forall x. ListActionTypes -> Rep ListActionTypes x)
-> (forall x. Rep ListActionTypes x -> ListActionTypes)
-> Generic ListActionTypes
forall x. Rep ListActionTypes x -> ListActionTypes
forall x. ListActionTypes -> Rep ListActionTypes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListActionTypes x -> ListActionTypes
$cfrom :: forall x. ListActionTypes -> Rep ListActionTypes x
Prelude.Generic)

-- |
-- Create a value of 'ListActionTypes' 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:
--
-- 'actionOwnerFilter', 'listActionTypes_actionOwnerFilter' - Filters the list of action types to those created by a specified entity.
--
-- 'regionFilter', 'listActionTypes_regionFilter' - The Region to filter on for the list of action types.
--
-- 'nextToken', 'listActionTypes_nextToken' - An identifier that was returned from the previous list action types
-- call, which can be used to return the next set of action types in the
-- list.
newListActionTypes ::
  ListActionTypes
newListActionTypes :: ListActionTypes
newListActionTypes =
  ListActionTypes' :: Maybe ActionOwner -> Maybe Text -> Maybe Text -> ListActionTypes
ListActionTypes'
    { $sel:actionOwnerFilter:ListActionTypes' :: Maybe ActionOwner
actionOwnerFilter =
        Maybe ActionOwner
forall a. Maybe a
Prelude.Nothing,
      $sel:regionFilter:ListActionTypes' :: Maybe Text
regionFilter = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListActionTypes' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Filters the list of action types to those created by a specified entity.
listActionTypes_actionOwnerFilter :: Lens.Lens' ListActionTypes (Prelude.Maybe ActionOwner)
listActionTypes_actionOwnerFilter :: (Maybe ActionOwner -> f (Maybe ActionOwner))
-> ListActionTypes -> f ListActionTypes
listActionTypes_actionOwnerFilter = (ListActionTypes -> Maybe ActionOwner)
-> (ListActionTypes -> Maybe ActionOwner -> ListActionTypes)
-> Lens
     ListActionTypes
     ListActionTypes
     (Maybe ActionOwner)
     (Maybe ActionOwner)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionTypes' {Maybe ActionOwner
actionOwnerFilter :: Maybe ActionOwner
$sel:actionOwnerFilter:ListActionTypes' :: ListActionTypes -> Maybe ActionOwner
actionOwnerFilter} -> Maybe ActionOwner
actionOwnerFilter) (\s :: ListActionTypes
s@ListActionTypes' {} Maybe ActionOwner
a -> ListActionTypes
s {$sel:actionOwnerFilter:ListActionTypes' :: Maybe ActionOwner
actionOwnerFilter = Maybe ActionOwner
a} :: ListActionTypes)

-- | The Region to filter on for the list of action types.
listActionTypes_regionFilter :: Lens.Lens' ListActionTypes (Prelude.Maybe Prelude.Text)
listActionTypes_regionFilter :: (Maybe Text -> f (Maybe Text))
-> ListActionTypes -> f ListActionTypes
listActionTypes_regionFilter = (ListActionTypes -> Maybe Text)
-> (ListActionTypes -> Maybe Text -> ListActionTypes)
-> Lens ListActionTypes ListActionTypes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionTypes' {Maybe Text
regionFilter :: Maybe Text
$sel:regionFilter:ListActionTypes' :: ListActionTypes -> Maybe Text
regionFilter} -> Maybe Text
regionFilter) (\s :: ListActionTypes
s@ListActionTypes' {} Maybe Text
a -> ListActionTypes
s {$sel:regionFilter:ListActionTypes' :: Maybe Text
regionFilter = Maybe Text
a} :: ListActionTypes)

-- | An identifier that was returned from the previous list action types
-- call, which can be used to return the next set of action types in the
-- list.
listActionTypes_nextToken :: Lens.Lens' ListActionTypes (Prelude.Maybe Prelude.Text)
listActionTypes_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListActionTypes -> f ListActionTypes
listActionTypes_nextToken = (ListActionTypes -> Maybe Text)
-> (ListActionTypes -> Maybe Text -> ListActionTypes)
-> Lens ListActionTypes ListActionTypes (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionTypes' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListActionTypes' :: ListActionTypes -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListActionTypes
s@ListActionTypes' {} Maybe Text
a -> ListActionTypes
s {$sel:nextToken:ListActionTypes' :: Maybe Text
nextToken = Maybe Text
a} :: ListActionTypes)

instance Core.AWSPager ListActionTypes where
  page :: ListActionTypes
-> AWSResponse ListActionTypes -> Maybe ListActionTypes
page ListActionTypes
rq AWSResponse ListActionTypes
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListActionTypes
ListActionTypesResponse
rs
            ListActionTypesResponse
-> Getting (First Text) ListActionTypesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListActionTypesResponse
-> Const (First Text) ListActionTypesResponse
Lens' ListActionTypesResponse (Maybe Text)
listActionTypesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListActionTypesResponse
 -> Const (First Text) ListActionTypesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListActionTypesResponse 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 ListActionTypes
forall a. Maybe a
Prelude.Nothing
    | [ActionType] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        (AWSResponse ListActionTypes
ListActionTypesResponse
rs ListActionTypesResponse
-> Getting [ActionType] ListActionTypesResponse [ActionType]
-> [ActionType]
forall s a. s -> Getting a s a -> a
Lens.^. Getting [ActionType] ListActionTypesResponse [ActionType]
Lens' ListActionTypesResponse [ActionType]
listActionTypesResponse_actionTypes) =
      Maybe ListActionTypes
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListActionTypes -> Maybe ListActionTypes
forall a. a -> Maybe a
Prelude.Just (ListActionTypes -> Maybe ListActionTypes)
-> ListActionTypes -> Maybe ListActionTypes
forall a b. (a -> b) -> a -> b
Prelude.$
        ListActionTypes
rq
          ListActionTypes
-> (ListActionTypes -> ListActionTypes) -> ListActionTypes
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListActionTypes -> Identity ListActionTypes
Lens ListActionTypes ListActionTypes (Maybe Text) (Maybe Text)
listActionTypes_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListActionTypes -> Identity ListActionTypes)
-> Maybe Text -> ListActionTypes -> ListActionTypes
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListActionTypes
ListActionTypesResponse
rs
          ListActionTypesResponse
-> Getting (First Text) ListActionTypesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListActionTypesResponse
-> Const (First Text) ListActionTypesResponse
Lens' ListActionTypesResponse (Maybe Text)
listActionTypesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListActionTypesResponse
 -> Const (First Text) ListActionTypesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListActionTypesResponse 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 ListActionTypes where
  type
    AWSResponse ListActionTypes =
      ListActionTypesResponse
  request :: ListActionTypes -> Request ListActionTypes
request = Service -> ListActionTypes -> Request ListActionTypes
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListActionTypes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListActionTypes)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListActionTypes))
-> Logger
-> Service
-> Proxy ListActionTypes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListActionTypes)))
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 -> [ActionType] -> ListActionTypesResponse
ListActionTypesResponse'
            (Maybe Text -> Int -> [ActionType] -> ListActionTypesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> [ActionType] -> ListActionTypesResponse)
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 -> [ActionType] -> ListActionTypesResponse)
-> Either String Int
-> Either String ([ActionType] -> ListActionTypesResponse)
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 ([ActionType] -> ListActionTypesResponse)
-> Either String [ActionType]
-> Either String ListActionTypesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe [ActionType])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"actionTypes" Either String (Maybe [ActionType])
-> [ActionType] -> Either String [ActionType]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [ActionType]
forall a. Monoid a => a
Prelude.mempty)
      )

instance Prelude.Hashable ListActionTypes

instance Prelude.NFData ListActionTypes

instance Core.ToHeaders ListActionTypes where
  toHeaders :: ListActionTypes -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListActionTypes -> 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
"CodePipeline_20150709.ListActionTypes" ::
                          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 ListActionTypes where
  toJSON :: ListActionTypes -> Value
toJSON ListActionTypes' {Maybe Text
Maybe ActionOwner
nextToken :: Maybe Text
regionFilter :: Maybe Text
actionOwnerFilter :: Maybe ActionOwner
$sel:nextToken:ListActionTypes' :: ListActionTypes -> Maybe Text
$sel:regionFilter:ListActionTypes' :: ListActionTypes -> Maybe Text
$sel:actionOwnerFilter:ListActionTypes' :: ListActionTypes -> Maybe ActionOwner
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"actionOwnerFilter" Text -> ActionOwner -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ActionOwner -> Pair) -> Maybe ActionOwner -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ActionOwner
actionOwnerFilter,
            (Text
"regionFilter" 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
regionFilter,
            (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
          ]
      )

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

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

-- | Represents the output of a @ListActionTypes@ action.
--
-- /See:/ 'newListActionTypesResponse' smart constructor.
data ListActionTypesResponse = ListActionTypesResponse'
  { -- | If the amount of returned information is significantly large, an
    -- identifier is also returned. It can be used in a subsequent list action
    -- types call to return the next set of action types in the list.
    ListActionTypesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListActionTypesResponse -> Int
httpStatus :: Prelude.Int,
    -- | Provides details of the action types.
    ListActionTypesResponse -> [ActionType]
actionTypes :: [ActionType]
  }
  deriving (ListActionTypesResponse -> ListActionTypesResponse -> Bool
(ListActionTypesResponse -> ListActionTypesResponse -> Bool)
-> (ListActionTypesResponse -> ListActionTypesResponse -> Bool)
-> Eq ListActionTypesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListActionTypesResponse -> ListActionTypesResponse -> Bool
$c/= :: ListActionTypesResponse -> ListActionTypesResponse -> Bool
== :: ListActionTypesResponse -> ListActionTypesResponse -> Bool
$c== :: ListActionTypesResponse -> ListActionTypesResponse -> Bool
Prelude.Eq, ReadPrec [ListActionTypesResponse]
ReadPrec ListActionTypesResponse
Int -> ReadS ListActionTypesResponse
ReadS [ListActionTypesResponse]
(Int -> ReadS ListActionTypesResponse)
-> ReadS [ListActionTypesResponse]
-> ReadPrec ListActionTypesResponse
-> ReadPrec [ListActionTypesResponse]
-> Read ListActionTypesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListActionTypesResponse]
$creadListPrec :: ReadPrec [ListActionTypesResponse]
readPrec :: ReadPrec ListActionTypesResponse
$creadPrec :: ReadPrec ListActionTypesResponse
readList :: ReadS [ListActionTypesResponse]
$creadList :: ReadS [ListActionTypesResponse]
readsPrec :: Int -> ReadS ListActionTypesResponse
$creadsPrec :: Int -> ReadS ListActionTypesResponse
Prelude.Read, Int -> ListActionTypesResponse -> ShowS
[ListActionTypesResponse] -> ShowS
ListActionTypesResponse -> String
(Int -> ListActionTypesResponse -> ShowS)
-> (ListActionTypesResponse -> String)
-> ([ListActionTypesResponse] -> ShowS)
-> Show ListActionTypesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListActionTypesResponse] -> ShowS
$cshowList :: [ListActionTypesResponse] -> ShowS
show :: ListActionTypesResponse -> String
$cshow :: ListActionTypesResponse -> String
showsPrec :: Int -> ListActionTypesResponse -> ShowS
$cshowsPrec :: Int -> ListActionTypesResponse -> ShowS
Prelude.Show, (forall x.
 ListActionTypesResponse -> Rep ListActionTypesResponse x)
-> (forall x.
    Rep ListActionTypesResponse x -> ListActionTypesResponse)
-> Generic ListActionTypesResponse
forall x. Rep ListActionTypesResponse x -> ListActionTypesResponse
forall x. ListActionTypesResponse -> Rep ListActionTypesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListActionTypesResponse x -> ListActionTypesResponse
$cfrom :: forall x. ListActionTypesResponse -> Rep ListActionTypesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListActionTypesResponse' 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', 'listActionTypesResponse_nextToken' - If the amount of returned information is significantly large, an
-- identifier is also returned. It can be used in a subsequent list action
-- types call to return the next set of action types in the list.
--
-- 'httpStatus', 'listActionTypesResponse_httpStatus' - The response's http status code.
--
-- 'actionTypes', 'listActionTypesResponse_actionTypes' - Provides details of the action types.
newListActionTypesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListActionTypesResponse
newListActionTypesResponse :: Int -> ListActionTypesResponse
newListActionTypesResponse Int
pHttpStatus_ =
  ListActionTypesResponse' :: Maybe Text -> Int -> [ActionType] -> ListActionTypesResponse
ListActionTypesResponse'
    { $sel:nextToken:ListActionTypesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListActionTypesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:actionTypes:ListActionTypesResponse' :: [ActionType]
actionTypes = [ActionType]
forall a. Monoid a => a
Prelude.mempty
    }

-- | If the amount of returned information is significantly large, an
-- identifier is also returned. It can be used in a subsequent list action
-- types call to return the next set of action types in the list.
listActionTypesResponse_nextToken :: Lens.Lens' ListActionTypesResponse (Prelude.Maybe Prelude.Text)
listActionTypesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListActionTypesResponse -> f ListActionTypesResponse
listActionTypesResponse_nextToken = (ListActionTypesResponse -> Maybe Text)
-> (ListActionTypesResponse
    -> Maybe Text -> ListActionTypesResponse)
-> Lens' ListActionTypesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionTypesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListActionTypesResponse' :: ListActionTypesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListActionTypesResponse
s@ListActionTypesResponse' {} Maybe Text
a -> ListActionTypesResponse
s {$sel:nextToken:ListActionTypesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListActionTypesResponse)

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

-- | Provides details of the action types.
listActionTypesResponse_actionTypes :: Lens.Lens' ListActionTypesResponse [ActionType]
listActionTypesResponse_actionTypes :: ([ActionType] -> f [ActionType])
-> ListActionTypesResponse -> f ListActionTypesResponse
listActionTypesResponse_actionTypes = (ListActionTypesResponse -> [ActionType])
-> (ListActionTypesResponse
    -> [ActionType] -> ListActionTypesResponse)
-> Lens' ListActionTypesResponse [ActionType]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListActionTypesResponse' {[ActionType]
actionTypes :: [ActionType]
$sel:actionTypes:ListActionTypesResponse' :: ListActionTypesResponse -> [ActionType]
actionTypes} -> [ActionType]
actionTypes) (\s :: ListActionTypesResponse
s@ListActionTypesResponse' {} [ActionType]
a -> ListActionTypesResponse
s {$sel:actionTypes:ListActionTypesResponse' :: [ActionType]
actionTypes = [ActionType]
a} :: ListActionTypesResponse) (([ActionType] -> f [ActionType])
 -> ListActionTypesResponse -> f ListActionTypesResponse)
-> (([ActionType] -> f [ActionType])
    -> [ActionType] -> f [ActionType])
-> ([ActionType] -> f [ActionType])
-> ListActionTypesResponse
-> f ListActionTypesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ActionType] -> f [ActionType]) -> [ActionType] -> f [ActionType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListActionTypesResponse