{-# 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.Glue.ListTriggers
-- 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)
--
-- Retrieves the names of all trigger resources in this Amazon Web Services
-- account, or the resources with the specified tag. This operation allows
-- you to see which resources are available in your account, and their
-- names.
--
-- This operation takes the optional @Tags@ field, which you can use as a
-- filter on the response so that tagged resources can be retrieved as a
-- group. If you choose to use tags filtering, only resources with the tag
-- are retrieved.
module Amazonka.Glue.ListTriggers
  ( -- * Creating a Request
    ListTriggers (..),
    newListTriggers,

    -- * Request Lenses
    listTriggers_nextToken,
    listTriggers_maxResults,
    listTriggers_tags,
    listTriggers_dependentJobName,

    -- * Destructuring the Response
    ListTriggersResponse (..),
    newListTriggersResponse,

    -- * Response Lenses
    listTriggersResponse_triggerNames,
    listTriggersResponse_nextToken,
    listTriggersResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Glue.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:/ 'newListTriggers' smart constructor.
data ListTriggers = ListTriggers'
  { -- | A continuation token, if this is a continuation request.
    ListTriggers -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum size of a list to return.
    ListTriggers -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Specifies to return only these tagged resources.
    ListTriggers -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the job for which to retrieve triggers. The trigger that can
    -- start this job is returned. If there is no such trigger, all triggers
    -- are returned.
    ListTriggers -> Maybe Text
dependentJobName :: Prelude.Maybe Prelude.Text
  }
  deriving (ListTriggers -> ListTriggers -> Bool
(ListTriggers -> ListTriggers -> Bool)
-> (ListTriggers -> ListTriggers -> Bool) -> Eq ListTriggers
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTriggers -> ListTriggers -> Bool
$c/= :: ListTriggers -> ListTriggers -> Bool
== :: ListTriggers -> ListTriggers -> Bool
$c== :: ListTriggers -> ListTriggers -> Bool
Prelude.Eq, ReadPrec [ListTriggers]
ReadPrec ListTriggers
Int -> ReadS ListTriggers
ReadS [ListTriggers]
(Int -> ReadS ListTriggers)
-> ReadS [ListTriggers]
-> ReadPrec ListTriggers
-> ReadPrec [ListTriggers]
-> Read ListTriggers
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTriggers]
$creadListPrec :: ReadPrec [ListTriggers]
readPrec :: ReadPrec ListTriggers
$creadPrec :: ReadPrec ListTriggers
readList :: ReadS [ListTriggers]
$creadList :: ReadS [ListTriggers]
readsPrec :: Int -> ReadS ListTriggers
$creadsPrec :: Int -> ReadS ListTriggers
Prelude.Read, Int -> ListTriggers -> ShowS
[ListTriggers] -> ShowS
ListTriggers -> String
(Int -> ListTriggers -> ShowS)
-> (ListTriggers -> String)
-> ([ListTriggers] -> ShowS)
-> Show ListTriggers
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTriggers] -> ShowS
$cshowList :: [ListTriggers] -> ShowS
show :: ListTriggers -> String
$cshow :: ListTriggers -> String
showsPrec :: Int -> ListTriggers -> ShowS
$cshowsPrec :: Int -> ListTriggers -> ShowS
Prelude.Show, (forall x. ListTriggers -> Rep ListTriggers x)
-> (forall x. Rep ListTriggers x -> ListTriggers)
-> Generic ListTriggers
forall x. Rep ListTriggers x -> ListTriggers
forall x. ListTriggers -> Rep ListTriggers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTriggers x -> ListTriggers
$cfrom :: forall x. ListTriggers -> Rep ListTriggers x
Prelude.Generic)

-- |
-- Create a value of 'ListTriggers' 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', 'listTriggers_nextToken' - A continuation token, if this is a continuation request.
--
-- 'maxResults', 'listTriggers_maxResults' - The maximum size of a list to return.
--
-- 'tags', 'listTriggers_tags' - Specifies to return only these tagged resources.
--
-- 'dependentJobName', 'listTriggers_dependentJobName' - The name of the job for which to retrieve triggers. The trigger that can
-- start this job is returned. If there is no such trigger, all triggers
-- are returned.
newListTriggers ::
  ListTriggers
newListTriggers :: ListTriggers
newListTriggers =
  ListTriggers' :: Maybe Text
-> Maybe Natural
-> Maybe (HashMap Text Text)
-> Maybe Text
-> ListTriggers
ListTriggers'
    { $sel:nextToken:ListTriggers' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListTriggers' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:ListTriggers' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:dependentJobName:ListTriggers' :: Maybe Text
dependentJobName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A continuation token, if this is a continuation request.
listTriggers_nextToken :: Lens.Lens' ListTriggers (Prelude.Maybe Prelude.Text)
listTriggers_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListTriggers -> f ListTriggers
listTriggers_nextToken = (ListTriggers -> Maybe Text)
-> (ListTriggers -> Maybe Text -> ListTriggers)
-> Lens ListTriggers ListTriggers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTriggers' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTriggers' :: ListTriggers -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTriggers
s@ListTriggers' {} Maybe Text
a -> ListTriggers
s {$sel:nextToken:ListTriggers' :: Maybe Text
nextToken = Maybe Text
a} :: ListTriggers)

-- | The maximum size of a list to return.
listTriggers_maxResults :: Lens.Lens' ListTriggers (Prelude.Maybe Prelude.Natural)
listTriggers_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListTriggers -> f ListTriggers
listTriggers_maxResults = (ListTriggers -> Maybe Natural)
-> (ListTriggers -> Maybe Natural -> ListTriggers)
-> Lens ListTriggers ListTriggers (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTriggers' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListTriggers' :: ListTriggers -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListTriggers
s@ListTriggers' {} Maybe Natural
a -> ListTriggers
s {$sel:maxResults:ListTriggers' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListTriggers)

-- | Specifies to return only these tagged resources.
listTriggers_tags :: Lens.Lens' ListTriggers (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
listTriggers_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ListTriggers -> f ListTriggers
listTriggers_tags = (ListTriggers -> Maybe (HashMap Text Text))
-> (ListTriggers -> Maybe (HashMap Text Text) -> ListTriggers)
-> Lens
     ListTriggers
     ListTriggers
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTriggers' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ListTriggers' :: ListTriggers -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ListTriggers
s@ListTriggers' {} Maybe (HashMap Text Text)
a -> ListTriggers
s {$sel:tags:ListTriggers' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ListTriggers) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> ListTriggers -> f ListTriggers)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ListTriggers
-> f ListTriggers
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the job for which to retrieve triggers. The trigger that can
-- start this job is returned. If there is no such trigger, all triggers
-- are returned.
listTriggers_dependentJobName :: Lens.Lens' ListTriggers (Prelude.Maybe Prelude.Text)
listTriggers_dependentJobName :: (Maybe Text -> f (Maybe Text)) -> ListTriggers -> f ListTriggers
listTriggers_dependentJobName = (ListTriggers -> Maybe Text)
-> (ListTriggers -> Maybe Text -> ListTriggers)
-> Lens ListTriggers ListTriggers (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTriggers' {Maybe Text
dependentJobName :: Maybe Text
$sel:dependentJobName:ListTriggers' :: ListTriggers -> Maybe Text
dependentJobName} -> Maybe Text
dependentJobName) (\s :: ListTriggers
s@ListTriggers' {} Maybe Text
a -> ListTriggers
s {$sel:dependentJobName:ListTriggers' :: Maybe Text
dependentJobName = Maybe Text
a} :: ListTriggers)

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

instance Prelude.NFData ListTriggers

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

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

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

-- | /See:/ 'newListTriggersResponse' smart constructor.
data ListTriggersResponse = ListTriggersResponse'
  { -- | The names of all triggers in the account, or the triggers with the
    -- specified tags.
    ListTriggersResponse -> Maybe [Text]
triggerNames :: Prelude.Maybe [Prelude.Text],
    -- | A continuation token, if the returned list does not contain the last
    -- metric available.
    ListTriggersResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListTriggersResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListTriggersResponse -> ListTriggersResponse -> Bool
(ListTriggersResponse -> ListTriggersResponse -> Bool)
-> (ListTriggersResponse -> ListTriggersResponse -> Bool)
-> Eq ListTriggersResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTriggersResponse -> ListTriggersResponse -> Bool
$c/= :: ListTriggersResponse -> ListTriggersResponse -> Bool
== :: ListTriggersResponse -> ListTriggersResponse -> Bool
$c== :: ListTriggersResponse -> ListTriggersResponse -> Bool
Prelude.Eq, ReadPrec [ListTriggersResponse]
ReadPrec ListTriggersResponse
Int -> ReadS ListTriggersResponse
ReadS [ListTriggersResponse]
(Int -> ReadS ListTriggersResponse)
-> ReadS [ListTriggersResponse]
-> ReadPrec ListTriggersResponse
-> ReadPrec [ListTriggersResponse]
-> Read ListTriggersResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTriggersResponse]
$creadListPrec :: ReadPrec [ListTriggersResponse]
readPrec :: ReadPrec ListTriggersResponse
$creadPrec :: ReadPrec ListTriggersResponse
readList :: ReadS [ListTriggersResponse]
$creadList :: ReadS [ListTriggersResponse]
readsPrec :: Int -> ReadS ListTriggersResponse
$creadsPrec :: Int -> ReadS ListTriggersResponse
Prelude.Read, Int -> ListTriggersResponse -> ShowS
[ListTriggersResponse] -> ShowS
ListTriggersResponse -> String
(Int -> ListTriggersResponse -> ShowS)
-> (ListTriggersResponse -> String)
-> ([ListTriggersResponse] -> ShowS)
-> Show ListTriggersResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTriggersResponse] -> ShowS
$cshowList :: [ListTriggersResponse] -> ShowS
show :: ListTriggersResponse -> String
$cshow :: ListTriggersResponse -> String
showsPrec :: Int -> ListTriggersResponse -> ShowS
$cshowsPrec :: Int -> ListTriggersResponse -> ShowS
Prelude.Show, (forall x. ListTriggersResponse -> Rep ListTriggersResponse x)
-> (forall x. Rep ListTriggersResponse x -> ListTriggersResponse)
-> Generic ListTriggersResponse
forall x. Rep ListTriggersResponse x -> ListTriggersResponse
forall x. ListTriggersResponse -> Rep ListTriggersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTriggersResponse x -> ListTriggersResponse
$cfrom :: forall x. ListTriggersResponse -> Rep ListTriggersResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTriggersResponse' 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:
--
-- 'triggerNames', 'listTriggersResponse_triggerNames' - The names of all triggers in the account, or the triggers with the
-- specified tags.
--
-- 'nextToken', 'listTriggersResponse_nextToken' - A continuation token, if the returned list does not contain the last
-- metric available.
--
-- 'httpStatus', 'listTriggersResponse_httpStatus' - The response's http status code.
newListTriggersResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListTriggersResponse
newListTriggersResponse :: Int -> ListTriggersResponse
newListTriggersResponse Int
pHttpStatus_ =
  ListTriggersResponse' :: Maybe [Text] -> Maybe Text -> Int -> ListTriggersResponse
ListTriggersResponse'
    { $sel:triggerNames:ListTriggersResponse' :: Maybe [Text]
triggerNames =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListTriggersResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListTriggersResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The names of all triggers in the account, or the triggers with the
-- specified tags.
listTriggersResponse_triggerNames :: Lens.Lens' ListTriggersResponse (Prelude.Maybe [Prelude.Text])
listTriggersResponse_triggerNames :: (Maybe [Text] -> f (Maybe [Text]))
-> ListTriggersResponse -> f ListTriggersResponse
listTriggersResponse_triggerNames = (ListTriggersResponse -> Maybe [Text])
-> (ListTriggersResponse -> Maybe [Text] -> ListTriggersResponse)
-> Lens
     ListTriggersResponse
     ListTriggersResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTriggersResponse' {Maybe [Text]
triggerNames :: Maybe [Text]
$sel:triggerNames:ListTriggersResponse' :: ListTriggersResponse -> Maybe [Text]
triggerNames} -> Maybe [Text]
triggerNames) (\s :: ListTriggersResponse
s@ListTriggersResponse' {} Maybe [Text]
a -> ListTriggersResponse
s {$sel:triggerNames:ListTriggersResponse' :: Maybe [Text]
triggerNames = Maybe [Text]
a} :: ListTriggersResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ListTriggersResponse -> f ListTriggersResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ListTriggersResponse
-> f ListTriggersResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A continuation token, if the returned list does not contain the last
-- metric available.
listTriggersResponse_nextToken :: Lens.Lens' ListTriggersResponse (Prelude.Maybe Prelude.Text)
listTriggersResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListTriggersResponse -> f ListTriggersResponse
listTriggersResponse_nextToken = (ListTriggersResponse -> Maybe Text)
-> (ListTriggersResponse -> Maybe Text -> ListTriggersResponse)
-> Lens
     ListTriggersResponse ListTriggersResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTriggersResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListTriggersResponse' :: ListTriggersResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListTriggersResponse
s@ListTriggersResponse' {} Maybe Text
a -> ListTriggersResponse
s {$sel:nextToken:ListTriggersResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListTriggersResponse)

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

instance Prelude.NFData ListTriggersResponse