{-# 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.LookoutMetrics.ListAlerts
-- 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 alerts attached to a detector.
--
-- Amazon Lookout for Metrics API actions are eventually consistent. If you
-- do a read operation on a resource immediately after creating or
-- modifying it, use retries to allow time for the write operation to
-- complete.
module Amazonka.LookoutMetrics.ListAlerts
  ( -- * Creating a Request
    ListAlerts (..),
    newListAlerts,

    -- * Request Lenses
    listAlerts_anomalyDetectorArn,
    listAlerts_nextToken,
    listAlerts_maxResults,

    -- * Destructuring the Response
    ListAlertsResponse (..),
    newListAlertsResponse,

    -- * Response Lenses
    listAlertsResponse_nextToken,
    listAlertsResponse_alertSummaryList,
    listAlertsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LookoutMetrics.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newListAlerts' smart constructor.
data ListAlerts = ListAlerts'
  { -- | The ARN of the alert\'s detector.
    ListAlerts -> Maybe Text
anomalyDetectorArn :: Prelude.Maybe Prelude.Text,
    -- | If the result of the previous request is truncated, the response
    -- includes a @NextToken@. To retrieve the next set of results, use the
    -- token in the next request. Tokens expire after 24 hours.
    ListAlerts -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results that will be displayed by the request.
    ListAlerts -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
  }
  deriving (ListAlerts -> ListAlerts -> Bool
(ListAlerts -> ListAlerts -> Bool)
-> (ListAlerts -> ListAlerts -> Bool) -> Eq ListAlerts
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAlerts -> ListAlerts -> Bool
$c/= :: ListAlerts -> ListAlerts -> Bool
== :: ListAlerts -> ListAlerts -> Bool
$c== :: ListAlerts -> ListAlerts -> Bool
Prelude.Eq, ReadPrec [ListAlerts]
ReadPrec ListAlerts
Int -> ReadS ListAlerts
ReadS [ListAlerts]
(Int -> ReadS ListAlerts)
-> ReadS [ListAlerts]
-> ReadPrec ListAlerts
-> ReadPrec [ListAlerts]
-> Read ListAlerts
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAlerts]
$creadListPrec :: ReadPrec [ListAlerts]
readPrec :: ReadPrec ListAlerts
$creadPrec :: ReadPrec ListAlerts
readList :: ReadS [ListAlerts]
$creadList :: ReadS [ListAlerts]
readsPrec :: Int -> ReadS ListAlerts
$creadsPrec :: Int -> ReadS ListAlerts
Prelude.Read, Int -> ListAlerts -> ShowS
[ListAlerts] -> ShowS
ListAlerts -> String
(Int -> ListAlerts -> ShowS)
-> (ListAlerts -> String)
-> ([ListAlerts] -> ShowS)
-> Show ListAlerts
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAlerts] -> ShowS
$cshowList :: [ListAlerts] -> ShowS
show :: ListAlerts -> String
$cshow :: ListAlerts -> String
showsPrec :: Int -> ListAlerts -> ShowS
$cshowsPrec :: Int -> ListAlerts -> ShowS
Prelude.Show, (forall x. ListAlerts -> Rep ListAlerts x)
-> (forall x. Rep ListAlerts x -> ListAlerts) -> Generic ListAlerts
forall x. Rep ListAlerts x -> ListAlerts
forall x. ListAlerts -> Rep ListAlerts x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAlerts x -> ListAlerts
$cfrom :: forall x. ListAlerts -> Rep ListAlerts x
Prelude.Generic)

-- |
-- Create a value of 'ListAlerts' 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:
--
-- 'anomalyDetectorArn', 'listAlerts_anomalyDetectorArn' - The ARN of the alert\'s detector.
--
-- 'nextToken', 'listAlerts_nextToken' - If the result of the previous request is truncated, the response
-- includes a @NextToken@. To retrieve the next set of results, use the
-- token in the next request. Tokens expire after 24 hours.
--
-- 'maxResults', 'listAlerts_maxResults' - The maximum number of results that will be displayed by the request.
newListAlerts ::
  ListAlerts
newListAlerts :: ListAlerts
newListAlerts =
  ListAlerts' :: Maybe Text -> Maybe Text -> Maybe Natural -> ListAlerts
ListAlerts'
    { $sel:anomalyDetectorArn:ListAlerts' :: Maybe Text
anomalyDetectorArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAlerts' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListAlerts' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the alert\'s detector.
listAlerts_anomalyDetectorArn :: Lens.Lens' ListAlerts (Prelude.Maybe Prelude.Text)
listAlerts_anomalyDetectorArn :: (Maybe Text -> f (Maybe Text)) -> ListAlerts -> f ListAlerts
listAlerts_anomalyDetectorArn = (ListAlerts -> Maybe Text)
-> (ListAlerts -> Maybe Text -> ListAlerts)
-> Lens ListAlerts ListAlerts (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAlerts' {Maybe Text
anomalyDetectorArn :: Maybe Text
$sel:anomalyDetectorArn:ListAlerts' :: ListAlerts -> Maybe Text
anomalyDetectorArn} -> Maybe Text
anomalyDetectorArn) (\s :: ListAlerts
s@ListAlerts' {} Maybe Text
a -> ListAlerts
s {$sel:anomalyDetectorArn:ListAlerts' :: Maybe Text
anomalyDetectorArn = Maybe Text
a} :: ListAlerts)

-- | If the result of the previous request is truncated, the response
-- includes a @NextToken@. To retrieve the next set of results, use the
-- token in the next request. Tokens expire after 24 hours.
listAlerts_nextToken :: Lens.Lens' ListAlerts (Prelude.Maybe Prelude.Text)
listAlerts_nextToken :: (Maybe Text -> f (Maybe Text)) -> ListAlerts -> f ListAlerts
listAlerts_nextToken = (ListAlerts -> Maybe Text)
-> (ListAlerts -> Maybe Text -> ListAlerts)
-> Lens ListAlerts ListAlerts (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAlerts' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAlerts' :: ListAlerts -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAlerts
s@ListAlerts' {} Maybe Text
a -> ListAlerts
s {$sel:nextToken:ListAlerts' :: Maybe Text
nextToken = Maybe Text
a} :: ListAlerts)

-- | The maximum number of results that will be displayed by the request.
listAlerts_maxResults :: Lens.Lens' ListAlerts (Prelude.Maybe Prelude.Natural)
listAlerts_maxResults :: (Maybe Natural -> f (Maybe Natural)) -> ListAlerts -> f ListAlerts
listAlerts_maxResults = (ListAlerts -> Maybe Natural)
-> (ListAlerts -> Maybe Natural -> ListAlerts)
-> Lens ListAlerts ListAlerts (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAlerts' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAlerts' :: ListAlerts -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAlerts
s@ListAlerts' {} Maybe Natural
a -> ListAlerts
s {$sel:maxResults:ListAlerts' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAlerts)

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

instance Prelude.NFData ListAlerts

instance Core.ToHeaders ListAlerts where
  toHeaders :: ListAlerts -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListAlerts -> 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.ToJSON ListAlerts where
  toJSON :: ListAlerts -> Value
toJSON ListAlerts' {Maybe Natural
Maybe Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
anomalyDetectorArn :: Maybe Text
$sel:maxResults:ListAlerts' :: ListAlerts -> Maybe Natural
$sel:nextToken:ListAlerts' :: ListAlerts -> Maybe Text
$sel:anomalyDetectorArn:ListAlerts' :: ListAlerts -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AnomalyDetectorArn" 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
anomalyDetectorArn,
            (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 ListAlerts where
  toPath :: ListAlerts -> ByteString
toPath = ByteString -> ListAlerts -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/ListAlerts"

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

-- | /See:/ 'newListAlertsResponse' smart constructor.
data ListAlertsResponse = ListAlertsResponse'
  { -- | If the response is truncated, the service returns this token. To
    -- retrieve the next set of results, use this token in the next request.
    ListAlertsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Contains information about an alert.
    ListAlertsResponse -> Maybe [AlertSummary]
alertSummaryList :: Prelude.Maybe [AlertSummary],
    -- | The response's http status code.
    ListAlertsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListAlertsResponse -> ListAlertsResponse -> Bool
(ListAlertsResponse -> ListAlertsResponse -> Bool)
-> (ListAlertsResponse -> ListAlertsResponse -> Bool)
-> Eq ListAlertsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAlertsResponse -> ListAlertsResponse -> Bool
$c/= :: ListAlertsResponse -> ListAlertsResponse -> Bool
== :: ListAlertsResponse -> ListAlertsResponse -> Bool
$c== :: ListAlertsResponse -> ListAlertsResponse -> Bool
Prelude.Eq, ReadPrec [ListAlertsResponse]
ReadPrec ListAlertsResponse
Int -> ReadS ListAlertsResponse
ReadS [ListAlertsResponse]
(Int -> ReadS ListAlertsResponse)
-> ReadS [ListAlertsResponse]
-> ReadPrec ListAlertsResponse
-> ReadPrec [ListAlertsResponse]
-> Read ListAlertsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAlertsResponse]
$creadListPrec :: ReadPrec [ListAlertsResponse]
readPrec :: ReadPrec ListAlertsResponse
$creadPrec :: ReadPrec ListAlertsResponse
readList :: ReadS [ListAlertsResponse]
$creadList :: ReadS [ListAlertsResponse]
readsPrec :: Int -> ReadS ListAlertsResponse
$creadsPrec :: Int -> ReadS ListAlertsResponse
Prelude.Read, Int -> ListAlertsResponse -> ShowS
[ListAlertsResponse] -> ShowS
ListAlertsResponse -> String
(Int -> ListAlertsResponse -> ShowS)
-> (ListAlertsResponse -> String)
-> ([ListAlertsResponse] -> ShowS)
-> Show ListAlertsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAlertsResponse] -> ShowS
$cshowList :: [ListAlertsResponse] -> ShowS
show :: ListAlertsResponse -> String
$cshow :: ListAlertsResponse -> String
showsPrec :: Int -> ListAlertsResponse -> ShowS
$cshowsPrec :: Int -> ListAlertsResponse -> ShowS
Prelude.Show, (forall x. ListAlertsResponse -> Rep ListAlertsResponse x)
-> (forall x. Rep ListAlertsResponse x -> ListAlertsResponse)
-> Generic ListAlertsResponse
forall x. Rep ListAlertsResponse x -> ListAlertsResponse
forall x. ListAlertsResponse -> Rep ListAlertsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAlertsResponse x -> ListAlertsResponse
$cfrom :: forall x. ListAlertsResponse -> Rep ListAlertsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAlertsResponse' 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', 'listAlertsResponse_nextToken' - If the response is truncated, the service returns this token. To
-- retrieve the next set of results, use this token in the next request.
--
-- 'alertSummaryList', 'listAlertsResponse_alertSummaryList' - Contains information about an alert.
--
-- 'httpStatus', 'listAlertsResponse_httpStatus' - The response's http status code.
newListAlertsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAlertsResponse
newListAlertsResponse :: Int -> ListAlertsResponse
newListAlertsResponse Int
pHttpStatus_ =
  ListAlertsResponse' :: Maybe Text -> Maybe [AlertSummary] -> Int -> ListAlertsResponse
ListAlertsResponse'
    { $sel:nextToken:ListAlertsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:alertSummaryList:ListAlertsResponse' :: Maybe [AlertSummary]
alertSummaryList = Maybe [AlertSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAlertsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the response is truncated, the service returns this token. To
-- retrieve the next set of results, use this token in the next request.
listAlertsResponse_nextToken :: Lens.Lens' ListAlertsResponse (Prelude.Maybe Prelude.Text)
listAlertsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListAlertsResponse -> f ListAlertsResponse
listAlertsResponse_nextToken = (ListAlertsResponse -> Maybe Text)
-> (ListAlertsResponse -> Maybe Text -> ListAlertsResponse)
-> Lens
     ListAlertsResponse ListAlertsResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAlertsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAlertsResponse' :: ListAlertsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAlertsResponse
s@ListAlertsResponse' {} Maybe Text
a -> ListAlertsResponse
s {$sel:nextToken:ListAlertsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAlertsResponse)

-- | Contains information about an alert.
listAlertsResponse_alertSummaryList :: Lens.Lens' ListAlertsResponse (Prelude.Maybe [AlertSummary])
listAlertsResponse_alertSummaryList :: (Maybe [AlertSummary] -> f (Maybe [AlertSummary]))
-> ListAlertsResponse -> f ListAlertsResponse
listAlertsResponse_alertSummaryList = (ListAlertsResponse -> Maybe [AlertSummary])
-> (ListAlertsResponse
    -> Maybe [AlertSummary] -> ListAlertsResponse)
-> Lens
     ListAlertsResponse
     ListAlertsResponse
     (Maybe [AlertSummary])
     (Maybe [AlertSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAlertsResponse' {Maybe [AlertSummary]
alertSummaryList :: Maybe [AlertSummary]
$sel:alertSummaryList:ListAlertsResponse' :: ListAlertsResponse -> Maybe [AlertSummary]
alertSummaryList} -> Maybe [AlertSummary]
alertSummaryList) (\s :: ListAlertsResponse
s@ListAlertsResponse' {} Maybe [AlertSummary]
a -> ListAlertsResponse
s {$sel:alertSummaryList:ListAlertsResponse' :: Maybe [AlertSummary]
alertSummaryList = Maybe [AlertSummary]
a} :: ListAlertsResponse) ((Maybe [AlertSummary] -> f (Maybe [AlertSummary]))
 -> ListAlertsResponse -> f ListAlertsResponse)
-> ((Maybe [AlertSummary] -> f (Maybe [AlertSummary]))
    -> Maybe [AlertSummary] -> f (Maybe [AlertSummary]))
-> (Maybe [AlertSummary] -> f (Maybe [AlertSummary]))
-> ListAlertsResponse
-> f ListAlertsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [AlertSummary] [AlertSummary] [AlertSummary] [AlertSummary]
-> Iso
     (Maybe [AlertSummary])
     (Maybe [AlertSummary])
     (Maybe [AlertSummary])
     (Maybe [AlertSummary])
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 [AlertSummary] [AlertSummary] [AlertSummary] [AlertSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ListAlertsResponse