{-# 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.CostExplorer.GetAnomalyMonitors
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves the cost anomaly monitor definitions for your account. You can
-- filter using a list of cost anomaly monitor Amazon Resource Names
-- (ARNs).
module Amazonka.CostExplorer.GetAnomalyMonitors
  ( -- * Creating a Request
    GetAnomalyMonitors (..),
    newGetAnomalyMonitors,

    -- * Request Lenses
    getAnomalyMonitors_maxResults,
    getAnomalyMonitors_monitorArnList,
    getAnomalyMonitors_nextPageToken,

    -- * Destructuring the Response
    GetAnomalyMonitorsResponse (..),
    newGetAnomalyMonitorsResponse,

    -- * Response Lenses
    getAnomalyMonitorsResponse_nextPageToken,
    getAnomalyMonitorsResponse_httpStatus,
    getAnomalyMonitorsResponse_anomalyMonitors,
  )
where

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

-- | /See:/ 'newGetAnomalyMonitors' smart constructor.
data GetAnomalyMonitors = GetAnomalyMonitors'
  { -- | The number of entries that a paginated response contains.
    GetAnomalyMonitors -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int,
    -- | A list of cost anomaly monitor ARNs.
    GetAnomalyMonitors -> Maybe [Text]
monitorArnList :: Prelude.Maybe [Prelude.Text],
    -- | The token to retrieve the next set of results. Amazon Web Services
    -- provides the token when the response from a previous call has more
    -- results than the maximum page size.
    GetAnomalyMonitors -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text
  }
  deriving (GetAnomalyMonitors -> GetAnomalyMonitors -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAnomalyMonitors -> GetAnomalyMonitors -> Bool
$c/= :: GetAnomalyMonitors -> GetAnomalyMonitors -> Bool
== :: GetAnomalyMonitors -> GetAnomalyMonitors -> Bool
$c== :: GetAnomalyMonitors -> GetAnomalyMonitors -> Bool
Prelude.Eq, ReadPrec [GetAnomalyMonitors]
ReadPrec GetAnomalyMonitors
Int -> ReadS GetAnomalyMonitors
ReadS [GetAnomalyMonitors]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAnomalyMonitors]
$creadListPrec :: ReadPrec [GetAnomalyMonitors]
readPrec :: ReadPrec GetAnomalyMonitors
$creadPrec :: ReadPrec GetAnomalyMonitors
readList :: ReadS [GetAnomalyMonitors]
$creadList :: ReadS [GetAnomalyMonitors]
readsPrec :: Int -> ReadS GetAnomalyMonitors
$creadsPrec :: Int -> ReadS GetAnomalyMonitors
Prelude.Read, Int -> GetAnomalyMonitors -> ShowS
[GetAnomalyMonitors] -> ShowS
GetAnomalyMonitors -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAnomalyMonitors] -> ShowS
$cshowList :: [GetAnomalyMonitors] -> ShowS
show :: GetAnomalyMonitors -> String
$cshow :: GetAnomalyMonitors -> String
showsPrec :: Int -> GetAnomalyMonitors -> ShowS
$cshowsPrec :: Int -> GetAnomalyMonitors -> ShowS
Prelude.Show, forall x. Rep GetAnomalyMonitors x -> GetAnomalyMonitors
forall x. GetAnomalyMonitors -> Rep GetAnomalyMonitors x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetAnomalyMonitors x -> GetAnomalyMonitors
$cfrom :: forall x. GetAnomalyMonitors -> Rep GetAnomalyMonitors x
Prelude.Generic)

-- |
-- Create a value of 'GetAnomalyMonitors' 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', 'getAnomalyMonitors_maxResults' - The number of entries that a paginated response contains.
--
-- 'monitorArnList', 'getAnomalyMonitors_monitorArnList' - A list of cost anomaly monitor ARNs.
--
-- 'nextPageToken', 'getAnomalyMonitors_nextPageToken' - The token to retrieve the next set of results. Amazon Web Services
-- provides the token when the response from a previous call has more
-- results than the maximum page size.
newGetAnomalyMonitors ::
  GetAnomalyMonitors
newGetAnomalyMonitors :: GetAnomalyMonitors
newGetAnomalyMonitors =
  GetAnomalyMonitors'
    { $sel:maxResults:GetAnomalyMonitors' :: Maybe Int
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:monitorArnList:GetAnomalyMonitors' :: Maybe [Text]
monitorArnList = forall a. Maybe a
Prelude.Nothing,
      $sel:nextPageToken:GetAnomalyMonitors' :: Maybe Text
nextPageToken = forall a. Maybe a
Prelude.Nothing
    }

-- | The number of entries that a paginated response contains.
getAnomalyMonitors_maxResults :: Lens.Lens' GetAnomalyMonitors (Prelude.Maybe Prelude.Int)
getAnomalyMonitors_maxResults :: Lens' GetAnomalyMonitors (Maybe Int)
getAnomalyMonitors_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAnomalyMonitors' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: GetAnomalyMonitors
s@GetAnomalyMonitors' {} Maybe Int
a -> GetAnomalyMonitors
s {$sel:maxResults:GetAnomalyMonitors' :: Maybe Int
maxResults = Maybe Int
a} :: GetAnomalyMonitors)

-- | A list of cost anomaly monitor ARNs.
getAnomalyMonitors_monitorArnList :: Lens.Lens' GetAnomalyMonitors (Prelude.Maybe [Prelude.Text])
getAnomalyMonitors_monitorArnList :: Lens' GetAnomalyMonitors (Maybe [Text])
getAnomalyMonitors_monitorArnList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAnomalyMonitors' {Maybe [Text]
monitorArnList :: Maybe [Text]
$sel:monitorArnList:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe [Text]
monitorArnList} -> Maybe [Text]
monitorArnList) (\s :: GetAnomalyMonitors
s@GetAnomalyMonitors' {} Maybe [Text]
a -> GetAnomalyMonitors
s {$sel:monitorArnList:GetAnomalyMonitors' :: Maybe [Text]
monitorArnList = Maybe [Text]
a} :: GetAnomalyMonitors) 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 token to retrieve the next set of results. Amazon Web Services
-- provides the token when the response from a previous call has more
-- results than the maximum page size.
getAnomalyMonitors_nextPageToken :: Lens.Lens' GetAnomalyMonitors (Prelude.Maybe Prelude.Text)
getAnomalyMonitors_nextPageToken :: Lens' GetAnomalyMonitors (Maybe Text)
getAnomalyMonitors_nextPageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAnomalyMonitors' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetAnomalyMonitors
s@GetAnomalyMonitors' {} Maybe Text
a -> GetAnomalyMonitors
s {$sel:nextPageToken:GetAnomalyMonitors' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetAnomalyMonitors)

instance Core.AWSRequest GetAnomalyMonitors where
  type
    AWSResponse GetAnomalyMonitors =
      GetAnomalyMonitorsResponse
  request :: (Service -> Service)
-> GetAnomalyMonitors -> Request GetAnomalyMonitors
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 GetAnomalyMonitors
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetAnomalyMonitors)))
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 Text -> Int -> [AnomalyMonitor] -> GetAnomalyMonitorsResponse
GetAnomalyMonitorsResponse'
            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
"NextPageToken")
            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))
            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
"AnomalyMonitors"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable GetAnomalyMonitors where
  hashWithSalt :: Int -> GetAnomalyMonitors -> Int
hashWithSalt Int
_salt GetAnomalyMonitors' {Maybe Int
Maybe [Text]
Maybe Text
nextPageToken :: Maybe Text
monitorArnList :: Maybe [Text]
maxResults :: Maybe Int
$sel:nextPageToken:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe Text
$sel:monitorArnList:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe [Text]
$sel:maxResults:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe Int
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
monitorArnList
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextPageToken

instance Prelude.NFData GetAnomalyMonitors where
  rnf :: GetAnomalyMonitors -> ()
rnf GetAnomalyMonitors' {Maybe Int
Maybe [Text]
Maybe Text
nextPageToken :: Maybe Text
monitorArnList :: Maybe [Text]
maxResults :: Maybe Int
$sel:nextPageToken:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe Text
$sel:monitorArnList:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe [Text]
$sel:maxResults:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
monitorArnList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextPageToken

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

instance Data.ToJSON GetAnomalyMonitors where
  toJSON :: GetAnomalyMonitors -> Value
toJSON GetAnomalyMonitors' {Maybe Int
Maybe [Text]
Maybe Text
nextPageToken :: Maybe Text
monitorArnList :: Maybe [Text]
maxResults :: Maybe Int
$sel:nextPageToken:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe Text
$sel:monitorArnList:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe [Text]
$sel:maxResults:GetAnomalyMonitors' :: GetAnomalyMonitors -> Maybe Int
..} =
    [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 Int
maxResults,
            (Key
"MonitorArnList" 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]
monitorArnList,
            (Key
"NextPageToken" 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
nextPageToken
          ]
      )

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

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

-- | /See:/ 'newGetAnomalyMonitorsResponse' smart constructor.
data GetAnomalyMonitorsResponse = GetAnomalyMonitorsResponse'
  { -- | The token to retrieve the next set of results. Amazon Web Services
    -- provides the token when the response from a previous call has more
    -- results than the maximum page size.
    GetAnomalyMonitorsResponse -> Maybe Text
nextPageToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetAnomalyMonitorsResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list of cost anomaly monitors that includes the detailed metadata for
    -- each monitor.
    GetAnomalyMonitorsResponse -> [AnomalyMonitor]
anomalyMonitors :: [AnomalyMonitor]
  }
  deriving (GetAnomalyMonitorsResponse -> GetAnomalyMonitorsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAnomalyMonitorsResponse -> GetAnomalyMonitorsResponse -> Bool
$c/= :: GetAnomalyMonitorsResponse -> GetAnomalyMonitorsResponse -> Bool
== :: GetAnomalyMonitorsResponse -> GetAnomalyMonitorsResponse -> Bool
$c== :: GetAnomalyMonitorsResponse -> GetAnomalyMonitorsResponse -> Bool
Prelude.Eq, ReadPrec [GetAnomalyMonitorsResponse]
ReadPrec GetAnomalyMonitorsResponse
Int -> ReadS GetAnomalyMonitorsResponse
ReadS [GetAnomalyMonitorsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAnomalyMonitorsResponse]
$creadListPrec :: ReadPrec [GetAnomalyMonitorsResponse]
readPrec :: ReadPrec GetAnomalyMonitorsResponse
$creadPrec :: ReadPrec GetAnomalyMonitorsResponse
readList :: ReadS [GetAnomalyMonitorsResponse]
$creadList :: ReadS [GetAnomalyMonitorsResponse]
readsPrec :: Int -> ReadS GetAnomalyMonitorsResponse
$creadsPrec :: Int -> ReadS GetAnomalyMonitorsResponse
Prelude.Read, Int -> GetAnomalyMonitorsResponse -> ShowS
[GetAnomalyMonitorsResponse] -> ShowS
GetAnomalyMonitorsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAnomalyMonitorsResponse] -> ShowS
$cshowList :: [GetAnomalyMonitorsResponse] -> ShowS
show :: GetAnomalyMonitorsResponse -> String
$cshow :: GetAnomalyMonitorsResponse -> String
showsPrec :: Int -> GetAnomalyMonitorsResponse -> ShowS
$cshowsPrec :: Int -> GetAnomalyMonitorsResponse -> ShowS
Prelude.Show, forall x.
Rep GetAnomalyMonitorsResponse x -> GetAnomalyMonitorsResponse
forall x.
GetAnomalyMonitorsResponse -> Rep GetAnomalyMonitorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAnomalyMonitorsResponse x -> GetAnomalyMonitorsResponse
$cfrom :: forall x.
GetAnomalyMonitorsResponse -> Rep GetAnomalyMonitorsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetAnomalyMonitorsResponse' 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:
--
-- 'nextPageToken', 'getAnomalyMonitorsResponse_nextPageToken' - The token to retrieve the next set of results. Amazon Web Services
-- provides the token when the response from a previous call has more
-- results than the maximum page size.
--
-- 'httpStatus', 'getAnomalyMonitorsResponse_httpStatus' - The response's http status code.
--
-- 'anomalyMonitors', 'getAnomalyMonitorsResponse_anomalyMonitors' - A list of cost anomaly monitors that includes the detailed metadata for
-- each monitor.
newGetAnomalyMonitorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAnomalyMonitorsResponse
newGetAnomalyMonitorsResponse :: Int -> GetAnomalyMonitorsResponse
newGetAnomalyMonitorsResponse Int
pHttpStatus_ =
  GetAnomalyMonitorsResponse'
    { $sel:nextPageToken:GetAnomalyMonitorsResponse' :: Maybe Text
nextPageToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAnomalyMonitorsResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:anomalyMonitors:GetAnomalyMonitorsResponse' :: [AnomalyMonitor]
anomalyMonitors = forall a. Monoid a => a
Prelude.mempty
    }

-- | The token to retrieve the next set of results. Amazon Web Services
-- provides the token when the response from a previous call has more
-- results than the maximum page size.
getAnomalyMonitorsResponse_nextPageToken :: Lens.Lens' GetAnomalyMonitorsResponse (Prelude.Maybe Prelude.Text)
getAnomalyMonitorsResponse_nextPageToken :: Lens' GetAnomalyMonitorsResponse (Maybe Text)
getAnomalyMonitorsResponse_nextPageToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAnomalyMonitorsResponse' {Maybe Text
nextPageToken :: Maybe Text
$sel:nextPageToken:GetAnomalyMonitorsResponse' :: GetAnomalyMonitorsResponse -> Maybe Text
nextPageToken} -> Maybe Text
nextPageToken) (\s :: GetAnomalyMonitorsResponse
s@GetAnomalyMonitorsResponse' {} Maybe Text
a -> GetAnomalyMonitorsResponse
s {$sel:nextPageToken:GetAnomalyMonitorsResponse' :: Maybe Text
nextPageToken = Maybe Text
a} :: GetAnomalyMonitorsResponse)

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

-- | A list of cost anomaly monitors that includes the detailed metadata for
-- each monitor.
getAnomalyMonitorsResponse_anomalyMonitors :: Lens.Lens' GetAnomalyMonitorsResponse [AnomalyMonitor]
getAnomalyMonitorsResponse_anomalyMonitors :: Lens' GetAnomalyMonitorsResponse [AnomalyMonitor]
getAnomalyMonitorsResponse_anomalyMonitors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAnomalyMonitorsResponse' {[AnomalyMonitor]
anomalyMonitors :: [AnomalyMonitor]
$sel:anomalyMonitors:GetAnomalyMonitorsResponse' :: GetAnomalyMonitorsResponse -> [AnomalyMonitor]
anomalyMonitors} -> [AnomalyMonitor]
anomalyMonitors) (\s :: GetAnomalyMonitorsResponse
s@GetAnomalyMonitorsResponse' {} [AnomalyMonitor]
a -> GetAnomalyMonitorsResponse
s {$sel:anomalyMonitors:GetAnomalyMonitorsResponse' :: [AnomalyMonitor]
anomalyMonitors = [AnomalyMonitor]
a} :: GetAnomalyMonitorsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData GetAnomalyMonitorsResponse where
  rnf :: GetAnomalyMonitorsResponse -> ()
rnf GetAnomalyMonitorsResponse' {Int
[AnomalyMonitor]
Maybe Text
anomalyMonitors :: [AnomalyMonitor]
httpStatus :: Int
nextPageToken :: Maybe Text
$sel:anomalyMonitors:GetAnomalyMonitorsResponse' :: GetAnomalyMonitorsResponse -> [AnomalyMonitor]
$sel:httpStatus:GetAnomalyMonitorsResponse' :: GetAnomalyMonitorsResponse -> Int
$sel:nextPageToken:GetAnomalyMonitorsResponse' :: GetAnomalyMonitorsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextPageToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [AnomalyMonitor]
anomalyMonitors