{-# 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.ListAnomalyGroupSummaries
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of anomaly groups.
module Amazonka.LookoutMetrics.ListAnomalyGroupSummaries
  ( -- * Creating a Request
    ListAnomalyGroupSummaries (..),
    newListAnomalyGroupSummaries,

    -- * Request Lenses
    listAnomalyGroupSummaries_maxResults,
    listAnomalyGroupSummaries_nextToken,
    listAnomalyGroupSummaries_anomalyDetectorArn,
    listAnomalyGroupSummaries_sensitivityThreshold,

    -- * Destructuring the Response
    ListAnomalyGroupSummariesResponse (..),
    newListAnomalyGroupSummariesResponse,

    -- * Response Lenses
    listAnomalyGroupSummariesResponse_anomalyGroupStatistics,
    listAnomalyGroupSummariesResponse_anomalyGroupSummaryList,
    listAnomalyGroupSummariesResponse_nextToken,
    listAnomalyGroupSummariesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListAnomalyGroupSummaries' smart constructor.
data ListAnomalyGroupSummaries = ListAnomalyGroupSummaries'
  { -- | The maximum number of results to return.
    ListAnomalyGroupSummaries -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | Specify the pagination token that\'s returned by a previous request to
    -- retrieve the next page of results.
    ListAnomalyGroupSummaries -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the anomaly detector.
    ListAnomalyGroupSummaries -> Text
anomalyDetectorArn :: Prelude.Text,
    -- | The minimum severity score for inclusion in the output.
    ListAnomalyGroupSummaries -> Natural
sensitivityThreshold :: Prelude.Natural
  }
  deriving (ListAnomalyGroupSummaries -> ListAnomalyGroupSummaries -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAnomalyGroupSummaries -> ListAnomalyGroupSummaries -> Bool
$c/= :: ListAnomalyGroupSummaries -> ListAnomalyGroupSummaries -> Bool
== :: ListAnomalyGroupSummaries -> ListAnomalyGroupSummaries -> Bool
$c== :: ListAnomalyGroupSummaries -> ListAnomalyGroupSummaries -> Bool
Prelude.Eq, ReadPrec [ListAnomalyGroupSummaries]
ReadPrec ListAnomalyGroupSummaries
Int -> ReadS ListAnomalyGroupSummaries
ReadS [ListAnomalyGroupSummaries]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAnomalyGroupSummaries]
$creadListPrec :: ReadPrec [ListAnomalyGroupSummaries]
readPrec :: ReadPrec ListAnomalyGroupSummaries
$creadPrec :: ReadPrec ListAnomalyGroupSummaries
readList :: ReadS [ListAnomalyGroupSummaries]
$creadList :: ReadS [ListAnomalyGroupSummaries]
readsPrec :: Int -> ReadS ListAnomalyGroupSummaries
$creadsPrec :: Int -> ReadS ListAnomalyGroupSummaries
Prelude.Read, Int -> ListAnomalyGroupSummaries -> ShowS
[ListAnomalyGroupSummaries] -> ShowS
ListAnomalyGroupSummaries -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAnomalyGroupSummaries] -> ShowS
$cshowList :: [ListAnomalyGroupSummaries] -> ShowS
show :: ListAnomalyGroupSummaries -> String
$cshow :: ListAnomalyGroupSummaries -> String
showsPrec :: Int -> ListAnomalyGroupSummaries -> ShowS
$cshowsPrec :: Int -> ListAnomalyGroupSummaries -> ShowS
Prelude.Show, forall x.
Rep ListAnomalyGroupSummaries x -> ListAnomalyGroupSummaries
forall x.
ListAnomalyGroupSummaries -> Rep ListAnomalyGroupSummaries x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAnomalyGroupSummaries x -> ListAnomalyGroupSummaries
$cfrom :: forall x.
ListAnomalyGroupSummaries -> Rep ListAnomalyGroupSummaries x
Prelude.Generic)

-- |
-- Create a value of 'ListAnomalyGroupSummaries' 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:
--
-- 'maxResults', 'listAnomalyGroupSummaries_maxResults' - The maximum number of results to return.
--
-- 'nextToken', 'listAnomalyGroupSummaries_nextToken' - Specify the pagination token that\'s returned by a previous request to
-- retrieve the next page of results.
--
-- 'anomalyDetectorArn', 'listAnomalyGroupSummaries_anomalyDetectorArn' - The Amazon Resource Name (ARN) of the anomaly detector.
--
-- 'sensitivityThreshold', 'listAnomalyGroupSummaries_sensitivityThreshold' - The minimum severity score for inclusion in the output.
newListAnomalyGroupSummaries ::
  -- | 'anomalyDetectorArn'
  Prelude.Text ->
  -- | 'sensitivityThreshold'
  Prelude.Natural ->
  ListAnomalyGroupSummaries
newListAnomalyGroupSummaries :: Text -> Natural -> ListAnomalyGroupSummaries
newListAnomalyGroupSummaries
  Text
pAnomalyDetectorArn_
  Natural
pSensitivityThreshold_ =
    ListAnomalyGroupSummaries'
      { $sel:maxResults:ListAnomalyGroupSummaries' :: Maybe Natural
maxResults =
          forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:ListAnomalyGroupSummaries' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:anomalyDetectorArn:ListAnomalyGroupSummaries' :: Text
anomalyDetectorArn = Text
pAnomalyDetectorArn_,
        $sel:sensitivityThreshold:ListAnomalyGroupSummaries' :: Natural
sensitivityThreshold = Natural
pSensitivityThreshold_
      }

-- | The maximum number of results to return.
listAnomalyGroupSummaries_maxResults :: Lens.Lens' ListAnomalyGroupSummaries (Prelude.Maybe Prelude.Natural)
listAnomalyGroupSummaries_maxResults :: Lens' ListAnomalyGroupSummaries (Maybe Natural)
listAnomalyGroupSummaries_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnomalyGroupSummaries' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListAnomalyGroupSummaries
s@ListAnomalyGroupSummaries' {} Maybe Natural
a -> ListAnomalyGroupSummaries
s {$sel:maxResults:ListAnomalyGroupSummaries' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListAnomalyGroupSummaries)

-- | Specify the pagination token that\'s returned by a previous request to
-- retrieve the next page of results.
listAnomalyGroupSummaries_nextToken :: Lens.Lens' ListAnomalyGroupSummaries (Prelude.Maybe Prelude.Text)
listAnomalyGroupSummaries_nextToken :: Lens' ListAnomalyGroupSummaries (Maybe Text)
listAnomalyGroupSummaries_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnomalyGroupSummaries' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAnomalyGroupSummaries
s@ListAnomalyGroupSummaries' {} Maybe Text
a -> ListAnomalyGroupSummaries
s {$sel:nextToken:ListAnomalyGroupSummaries' :: Maybe Text
nextToken = Maybe Text
a} :: ListAnomalyGroupSummaries)

-- | The Amazon Resource Name (ARN) of the anomaly detector.
listAnomalyGroupSummaries_anomalyDetectorArn :: Lens.Lens' ListAnomalyGroupSummaries Prelude.Text
listAnomalyGroupSummaries_anomalyDetectorArn :: Lens' ListAnomalyGroupSummaries Text
listAnomalyGroupSummaries_anomalyDetectorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnomalyGroupSummaries' {Text
anomalyDetectorArn :: Text
$sel:anomalyDetectorArn:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Text
anomalyDetectorArn} -> Text
anomalyDetectorArn) (\s :: ListAnomalyGroupSummaries
s@ListAnomalyGroupSummaries' {} Text
a -> ListAnomalyGroupSummaries
s {$sel:anomalyDetectorArn:ListAnomalyGroupSummaries' :: Text
anomalyDetectorArn = Text
a} :: ListAnomalyGroupSummaries)

-- | The minimum severity score for inclusion in the output.
listAnomalyGroupSummaries_sensitivityThreshold :: Lens.Lens' ListAnomalyGroupSummaries Prelude.Natural
listAnomalyGroupSummaries_sensitivityThreshold :: Lens' ListAnomalyGroupSummaries Natural
listAnomalyGroupSummaries_sensitivityThreshold = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnomalyGroupSummaries' {Natural
sensitivityThreshold :: Natural
$sel:sensitivityThreshold:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Natural
sensitivityThreshold} -> Natural
sensitivityThreshold) (\s :: ListAnomalyGroupSummaries
s@ListAnomalyGroupSummaries' {} Natural
a -> ListAnomalyGroupSummaries
s {$sel:sensitivityThreshold:ListAnomalyGroupSummaries' :: Natural
sensitivityThreshold = Natural
a} :: ListAnomalyGroupSummaries)

instance Core.AWSRequest ListAnomalyGroupSummaries where
  type
    AWSResponse ListAnomalyGroupSummaries =
      ListAnomalyGroupSummariesResponse
  request :: (Service -> Service)
-> ListAnomalyGroupSummaries -> Request ListAnomalyGroupSummaries
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListAnomalyGroupSummaries
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListAnomalyGroupSummaries)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe AnomalyGroupStatistics
-> Maybe [AnomalyGroupSummary]
-> Maybe Text
-> Int
-> ListAnomalyGroupSummariesResponse
ListAnomalyGroupSummariesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"AnomalyGroupStatistics")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"AnomalyGroupSummaryList"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListAnomalyGroupSummaries where
  hashWithSalt :: Int -> ListAnomalyGroupSummaries -> Int
hashWithSalt Int
_salt ListAnomalyGroupSummaries' {Natural
Maybe Natural
Maybe Text
Text
sensitivityThreshold :: Natural
anomalyDetectorArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:sensitivityThreshold:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Natural
$sel:anomalyDetectorArn:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Text
$sel:nextToken:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Maybe Text
$sel:maxResults:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
anomalyDetectorArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
sensitivityThreshold

instance Prelude.NFData ListAnomalyGroupSummaries where
  rnf :: ListAnomalyGroupSummaries -> ()
rnf ListAnomalyGroupSummaries' {Natural
Maybe Natural
Maybe Text
Text
sensitivityThreshold :: Natural
anomalyDetectorArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:sensitivityThreshold:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Natural
$sel:anomalyDetectorArn:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Text
$sel:nextToken:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Maybe Text
$sel:maxResults:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
anomalyDetectorArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
sensitivityThreshold

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

instance Data.ToJSON ListAnomalyGroupSummaries where
  toJSON :: ListAnomalyGroupSummaries -> Value
toJSON ListAnomalyGroupSummaries' {Natural
Maybe Natural
Maybe Text
Text
sensitivityThreshold :: Natural
anomalyDetectorArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:sensitivityThreshold:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Natural
$sel:anomalyDetectorArn:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Text
$sel:nextToken:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Maybe Text
$sel:maxResults:ListAnomalyGroupSummaries' :: ListAnomalyGroupSummaries -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"AnomalyDetectorArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
anomalyDetectorArn),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"SensitivityThreshold"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
sensitivityThreshold
              )
          ]
      )

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

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

-- | /See:/ 'newListAnomalyGroupSummariesResponse' smart constructor.
data ListAnomalyGroupSummariesResponse = ListAnomalyGroupSummariesResponse'
  { -- | Aggregated details about the anomaly groups.
    ListAnomalyGroupSummariesResponse -> Maybe AnomalyGroupStatistics
anomalyGroupStatistics :: Prelude.Maybe AnomalyGroupStatistics,
    -- | A list of anomaly group summaries.
    ListAnomalyGroupSummariesResponse -> Maybe [AnomalyGroupSummary]
anomalyGroupSummaryList :: Prelude.Maybe [AnomalyGroupSummary],
    -- | The pagination token that\'s included if more results are available.
    ListAnomalyGroupSummariesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListAnomalyGroupSummariesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListAnomalyGroupSummariesResponse
-> ListAnomalyGroupSummariesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAnomalyGroupSummariesResponse
-> ListAnomalyGroupSummariesResponse -> Bool
$c/= :: ListAnomalyGroupSummariesResponse
-> ListAnomalyGroupSummariesResponse -> Bool
== :: ListAnomalyGroupSummariesResponse
-> ListAnomalyGroupSummariesResponse -> Bool
$c== :: ListAnomalyGroupSummariesResponse
-> ListAnomalyGroupSummariesResponse -> Bool
Prelude.Eq, ReadPrec [ListAnomalyGroupSummariesResponse]
ReadPrec ListAnomalyGroupSummariesResponse
Int -> ReadS ListAnomalyGroupSummariesResponse
ReadS [ListAnomalyGroupSummariesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAnomalyGroupSummariesResponse]
$creadListPrec :: ReadPrec [ListAnomalyGroupSummariesResponse]
readPrec :: ReadPrec ListAnomalyGroupSummariesResponse
$creadPrec :: ReadPrec ListAnomalyGroupSummariesResponse
readList :: ReadS [ListAnomalyGroupSummariesResponse]
$creadList :: ReadS [ListAnomalyGroupSummariesResponse]
readsPrec :: Int -> ReadS ListAnomalyGroupSummariesResponse
$creadsPrec :: Int -> ReadS ListAnomalyGroupSummariesResponse
Prelude.Read, Int -> ListAnomalyGroupSummariesResponse -> ShowS
[ListAnomalyGroupSummariesResponse] -> ShowS
ListAnomalyGroupSummariesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAnomalyGroupSummariesResponse] -> ShowS
$cshowList :: [ListAnomalyGroupSummariesResponse] -> ShowS
show :: ListAnomalyGroupSummariesResponse -> String
$cshow :: ListAnomalyGroupSummariesResponse -> String
showsPrec :: Int -> ListAnomalyGroupSummariesResponse -> ShowS
$cshowsPrec :: Int -> ListAnomalyGroupSummariesResponse -> ShowS
Prelude.Show, forall x.
Rep ListAnomalyGroupSummariesResponse x
-> ListAnomalyGroupSummariesResponse
forall x.
ListAnomalyGroupSummariesResponse
-> Rep ListAnomalyGroupSummariesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAnomalyGroupSummariesResponse x
-> ListAnomalyGroupSummariesResponse
$cfrom :: forall x.
ListAnomalyGroupSummariesResponse
-> Rep ListAnomalyGroupSummariesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListAnomalyGroupSummariesResponse' 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:
--
-- 'anomalyGroupStatistics', 'listAnomalyGroupSummariesResponse_anomalyGroupStatistics' - Aggregated details about the anomaly groups.
--
-- 'anomalyGroupSummaryList', 'listAnomalyGroupSummariesResponse_anomalyGroupSummaryList' - A list of anomaly group summaries.
--
-- 'nextToken', 'listAnomalyGroupSummariesResponse_nextToken' - The pagination token that\'s included if more results are available.
--
-- 'httpStatus', 'listAnomalyGroupSummariesResponse_httpStatus' - The response's http status code.
newListAnomalyGroupSummariesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListAnomalyGroupSummariesResponse
newListAnomalyGroupSummariesResponse :: Int -> ListAnomalyGroupSummariesResponse
newListAnomalyGroupSummariesResponse Int
pHttpStatus_ =
  ListAnomalyGroupSummariesResponse'
    { $sel:anomalyGroupStatistics:ListAnomalyGroupSummariesResponse' :: Maybe AnomalyGroupStatistics
anomalyGroupStatistics =
        forall a. Maybe a
Prelude.Nothing,
      $sel:anomalyGroupSummaryList:ListAnomalyGroupSummariesResponse' :: Maybe [AnomalyGroupSummary]
anomalyGroupSummaryList =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListAnomalyGroupSummariesResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListAnomalyGroupSummariesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Aggregated details about the anomaly groups.
listAnomalyGroupSummariesResponse_anomalyGroupStatistics :: Lens.Lens' ListAnomalyGroupSummariesResponse (Prelude.Maybe AnomalyGroupStatistics)
listAnomalyGroupSummariesResponse_anomalyGroupStatistics :: Lens'
  ListAnomalyGroupSummariesResponse (Maybe AnomalyGroupStatistics)
listAnomalyGroupSummariesResponse_anomalyGroupStatistics = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnomalyGroupSummariesResponse' {Maybe AnomalyGroupStatistics
anomalyGroupStatistics :: Maybe AnomalyGroupStatistics
$sel:anomalyGroupStatistics:ListAnomalyGroupSummariesResponse' :: ListAnomalyGroupSummariesResponse -> Maybe AnomalyGroupStatistics
anomalyGroupStatistics} -> Maybe AnomalyGroupStatistics
anomalyGroupStatistics) (\s :: ListAnomalyGroupSummariesResponse
s@ListAnomalyGroupSummariesResponse' {} Maybe AnomalyGroupStatistics
a -> ListAnomalyGroupSummariesResponse
s {$sel:anomalyGroupStatistics:ListAnomalyGroupSummariesResponse' :: Maybe AnomalyGroupStatistics
anomalyGroupStatistics = Maybe AnomalyGroupStatistics
a} :: ListAnomalyGroupSummariesResponse)

-- | A list of anomaly group summaries.
listAnomalyGroupSummariesResponse_anomalyGroupSummaryList :: Lens.Lens' ListAnomalyGroupSummariesResponse (Prelude.Maybe [AnomalyGroupSummary])
listAnomalyGroupSummariesResponse_anomalyGroupSummaryList :: Lens'
  ListAnomalyGroupSummariesResponse (Maybe [AnomalyGroupSummary])
listAnomalyGroupSummariesResponse_anomalyGroupSummaryList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnomalyGroupSummariesResponse' {Maybe [AnomalyGroupSummary]
anomalyGroupSummaryList :: Maybe [AnomalyGroupSummary]
$sel:anomalyGroupSummaryList:ListAnomalyGroupSummariesResponse' :: ListAnomalyGroupSummariesResponse -> Maybe [AnomalyGroupSummary]
anomalyGroupSummaryList} -> Maybe [AnomalyGroupSummary]
anomalyGroupSummaryList) (\s :: ListAnomalyGroupSummariesResponse
s@ListAnomalyGroupSummariesResponse' {} Maybe [AnomalyGroupSummary]
a -> ListAnomalyGroupSummariesResponse
s {$sel:anomalyGroupSummaryList:ListAnomalyGroupSummariesResponse' :: Maybe [AnomalyGroupSummary]
anomalyGroupSummaryList = Maybe [AnomalyGroupSummary]
a} :: ListAnomalyGroupSummariesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The pagination token that\'s included if more results are available.
listAnomalyGroupSummariesResponse_nextToken :: Lens.Lens' ListAnomalyGroupSummariesResponse (Prelude.Maybe Prelude.Text)
listAnomalyGroupSummariesResponse_nextToken :: Lens' ListAnomalyGroupSummariesResponse (Maybe Text)
listAnomalyGroupSummariesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAnomalyGroupSummariesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAnomalyGroupSummariesResponse' :: ListAnomalyGroupSummariesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAnomalyGroupSummariesResponse
s@ListAnomalyGroupSummariesResponse' {} Maybe Text
a -> ListAnomalyGroupSummariesResponse
s {$sel:nextToken:ListAnomalyGroupSummariesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAnomalyGroupSummariesResponse)

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

instance
  Prelude.NFData
    ListAnomalyGroupSummariesResponse
  where
  rnf :: ListAnomalyGroupSummariesResponse -> ()
rnf ListAnomalyGroupSummariesResponse' {Int
Maybe [AnomalyGroupSummary]
Maybe Text
Maybe AnomalyGroupStatistics
httpStatus :: Int
nextToken :: Maybe Text
anomalyGroupSummaryList :: Maybe [AnomalyGroupSummary]
anomalyGroupStatistics :: Maybe AnomalyGroupStatistics
$sel:httpStatus:ListAnomalyGroupSummariesResponse' :: ListAnomalyGroupSummariesResponse -> Int
$sel:nextToken:ListAnomalyGroupSummariesResponse' :: ListAnomalyGroupSummariesResponse -> Maybe Text
$sel:anomalyGroupSummaryList:ListAnomalyGroupSummariesResponse' :: ListAnomalyGroupSummariesResponse -> Maybe [AnomalyGroupSummary]
$sel:anomalyGroupStatistics:ListAnomalyGroupSummariesResponse' :: ListAnomalyGroupSummariesResponse -> Maybe AnomalyGroupStatistics
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe AnomalyGroupStatistics
anomalyGroupStatistics
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [AnomalyGroupSummary]
anomalyGroupSummaryList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus