{-# 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.Forecast.ListMonitorEvaluations
-- 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 the monitoring evaluation results and predictor events
-- collected by the monitor resource during different windows of time.
--
-- For information about monitoring see predictor-monitoring. For more
-- information about retrieving monitoring results see
-- <https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html Viewing Monitoring Results>.
--
-- This operation returns paginated results.
module Amazonka.Forecast.ListMonitorEvaluations
  ( -- * Creating a Request
    ListMonitorEvaluations (..),
    newListMonitorEvaluations,

    -- * Request Lenses
    listMonitorEvaluations_filters,
    listMonitorEvaluations_maxResults,
    listMonitorEvaluations_nextToken,
    listMonitorEvaluations_monitorArn,

    -- * Destructuring the Response
    ListMonitorEvaluationsResponse (..),
    newListMonitorEvaluationsResponse,

    -- * Response Lenses
    listMonitorEvaluationsResponse_nextToken,
    listMonitorEvaluationsResponse_predictorMonitorEvaluations,
    listMonitorEvaluationsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListMonitorEvaluations' smart constructor.
data ListMonitorEvaluations = ListMonitorEvaluations'
  { -- | An array of filters. For each filter, provide a condition and a match
    -- statement. The condition is either @IS@ or @IS_NOT@, which specifies
    -- whether to include or exclude the resources that match the statement
    -- from the list. The match statement consists of a key and a value.
    --
    -- __Filter properties__
    --
    -- -   @Condition@ - The condition to apply. Valid values are @IS@ and
    --     @IS_NOT@.
    --
    -- -   @Key@ - The name of the parameter to filter on. The only valid value
    --     is @EvaluationState@.
    --
    -- -   @Value@ - The value to match. Valid values are only @SUCCESS@ or
    --     @FAILURE@.
    --
    -- For example, to list only successful monitor evaluations, you would
    -- specify:
    --
    -- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"EvaluationState\", \"Value\": \"SUCCESS\" } ]@
    ListMonitorEvaluations -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The maximum number of monitoring results to return.
    ListMonitorEvaluations -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | If the result of the previous request was 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.
    ListMonitorEvaluations -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the monitor resource to get results
    -- from.
    ListMonitorEvaluations -> Text
monitorArn :: Prelude.Text
  }
  deriving (ListMonitorEvaluations -> ListMonitorEvaluations -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMonitorEvaluations -> ListMonitorEvaluations -> Bool
$c/= :: ListMonitorEvaluations -> ListMonitorEvaluations -> Bool
== :: ListMonitorEvaluations -> ListMonitorEvaluations -> Bool
$c== :: ListMonitorEvaluations -> ListMonitorEvaluations -> Bool
Prelude.Eq, ReadPrec [ListMonitorEvaluations]
ReadPrec ListMonitorEvaluations
Int -> ReadS ListMonitorEvaluations
ReadS [ListMonitorEvaluations]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMonitorEvaluations]
$creadListPrec :: ReadPrec [ListMonitorEvaluations]
readPrec :: ReadPrec ListMonitorEvaluations
$creadPrec :: ReadPrec ListMonitorEvaluations
readList :: ReadS [ListMonitorEvaluations]
$creadList :: ReadS [ListMonitorEvaluations]
readsPrec :: Int -> ReadS ListMonitorEvaluations
$creadsPrec :: Int -> ReadS ListMonitorEvaluations
Prelude.Read, Int -> ListMonitorEvaluations -> ShowS
[ListMonitorEvaluations] -> ShowS
ListMonitorEvaluations -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMonitorEvaluations] -> ShowS
$cshowList :: [ListMonitorEvaluations] -> ShowS
show :: ListMonitorEvaluations -> String
$cshow :: ListMonitorEvaluations -> String
showsPrec :: Int -> ListMonitorEvaluations -> ShowS
$cshowsPrec :: Int -> ListMonitorEvaluations -> ShowS
Prelude.Show, forall x. Rep ListMonitorEvaluations x -> ListMonitorEvaluations
forall x. ListMonitorEvaluations -> Rep ListMonitorEvaluations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListMonitorEvaluations x -> ListMonitorEvaluations
$cfrom :: forall x. ListMonitorEvaluations -> Rep ListMonitorEvaluations x
Prelude.Generic)

-- |
-- Create a value of 'ListMonitorEvaluations' 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:
--
-- 'filters', 'listMonitorEvaluations_filters' - An array of filters. For each filter, provide a condition and a match
-- statement. The condition is either @IS@ or @IS_NOT@, which specifies
-- whether to include or exclude the resources that match the statement
-- from the list. The match statement consists of a key and a value.
--
-- __Filter properties__
--
-- -   @Condition@ - The condition to apply. Valid values are @IS@ and
--     @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. The only valid value
--     is @EvaluationState@.
--
-- -   @Value@ - The value to match. Valid values are only @SUCCESS@ or
--     @FAILURE@.
--
-- For example, to list only successful monitor evaluations, you would
-- specify:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"EvaluationState\", \"Value\": \"SUCCESS\" } ]@
--
-- 'maxResults', 'listMonitorEvaluations_maxResults' - The maximum number of monitoring results to return.
--
-- 'nextToken', 'listMonitorEvaluations_nextToken' - If the result of the previous request was 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.
--
-- 'monitorArn', 'listMonitorEvaluations_monitorArn' - The Amazon Resource Name (ARN) of the monitor resource to get results
-- from.
newListMonitorEvaluations ::
  -- | 'monitorArn'
  Prelude.Text ->
  ListMonitorEvaluations
newListMonitorEvaluations :: Text -> ListMonitorEvaluations
newListMonitorEvaluations Text
pMonitorArn_ =
  ListMonitorEvaluations'
    { $sel:filters:ListMonitorEvaluations' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMonitorEvaluations' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMonitorEvaluations' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:monitorArn:ListMonitorEvaluations' :: Text
monitorArn = Text
pMonitorArn_
    }

-- | An array of filters. For each filter, provide a condition and a match
-- statement. The condition is either @IS@ or @IS_NOT@, which specifies
-- whether to include or exclude the resources that match the statement
-- from the list. The match statement consists of a key and a value.
--
-- __Filter properties__
--
-- -   @Condition@ - The condition to apply. Valid values are @IS@ and
--     @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. The only valid value
--     is @EvaluationState@.
--
-- -   @Value@ - The value to match. Valid values are only @SUCCESS@ or
--     @FAILURE@.
--
-- For example, to list only successful monitor evaluations, you would
-- specify:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"EvaluationState\", \"Value\": \"SUCCESS\" } ]@
listMonitorEvaluations_filters :: Lens.Lens' ListMonitorEvaluations (Prelude.Maybe [Filter])
listMonitorEvaluations_filters :: Lens' ListMonitorEvaluations (Maybe [Filter])
listMonitorEvaluations_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitorEvaluations' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListMonitorEvaluations
s@ListMonitorEvaluations' {} Maybe [Filter]
a -> ListMonitorEvaluations
s {$sel:filters:ListMonitorEvaluations' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListMonitorEvaluations) 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 maximum number of monitoring results to return.
listMonitorEvaluations_maxResults :: Lens.Lens' ListMonitorEvaluations (Prelude.Maybe Prelude.Natural)
listMonitorEvaluations_maxResults :: Lens' ListMonitorEvaluations (Maybe Natural)
listMonitorEvaluations_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitorEvaluations' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMonitorEvaluations
s@ListMonitorEvaluations' {} Maybe Natural
a -> ListMonitorEvaluations
s {$sel:maxResults:ListMonitorEvaluations' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMonitorEvaluations)

-- | If the result of the previous request was 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.
listMonitorEvaluations_nextToken :: Lens.Lens' ListMonitorEvaluations (Prelude.Maybe Prelude.Text)
listMonitorEvaluations_nextToken :: Lens' ListMonitorEvaluations (Maybe Text)
listMonitorEvaluations_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitorEvaluations' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMonitorEvaluations
s@ListMonitorEvaluations' {} Maybe Text
a -> ListMonitorEvaluations
s {$sel:nextToken:ListMonitorEvaluations' :: Maybe Text
nextToken = Maybe Text
a} :: ListMonitorEvaluations)

-- | The Amazon Resource Name (ARN) of the monitor resource to get results
-- from.
listMonitorEvaluations_monitorArn :: Lens.Lens' ListMonitorEvaluations Prelude.Text
listMonitorEvaluations_monitorArn :: Lens' ListMonitorEvaluations Text
listMonitorEvaluations_monitorArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitorEvaluations' {Text
monitorArn :: Text
$sel:monitorArn:ListMonitorEvaluations' :: ListMonitorEvaluations -> Text
monitorArn} -> Text
monitorArn) (\s :: ListMonitorEvaluations
s@ListMonitorEvaluations' {} Text
a -> ListMonitorEvaluations
s {$sel:monitorArn:ListMonitorEvaluations' :: Text
monitorArn = Text
a} :: ListMonitorEvaluations)

instance Core.AWSPager ListMonitorEvaluations where
  page :: ListMonitorEvaluations
-> AWSResponse ListMonitorEvaluations
-> Maybe ListMonitorEvaluations
page ListMonitorEvaluations
rq AWSResponse ListMonitorEvaluations
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMonitorEvaluations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListMonitorEvaluationsResponse (Maybe Text)
listMonitorEvaluationsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListMonitorEvaluations
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListMonitorEvaluationsResponse (Maybe [PredictorMonitorEvaluation])
listMonitorEvaluationsResponse_predictorMonitorEvaluations
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ ListMonitorEvaluations
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListMonitorEvaluations (Maybe Text)
listMonitorEvaluations_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListMonitorEvaluations
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListMonitorEvaluationsResponse (Maybe Text)
listMonitorEvaluationsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest ListMonitorEvaluations where
  type
    AWSResponse ListMonitorEvaluations =
      ListMonitorEvaluationsResponse
  request :: (Service -> Service)
-> ListMonitorEvaluations -> Request ListMonitorEvaluations
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 ListMonitorEvaluations
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListMonitorEvaluations)))
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
-> Maybe [PredictorMonitorEvaluation]
-> Int
-> ListMonitorEvaluationsResponse
ListMonitorEvaluationsResponse'
            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
"NextToken")
            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
"PredictorMonitorEvaluations"
                            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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListMonitorEvaluations where
  hashWithSalt :: Int -> ListMonitorEvaluations -> Int
hashWithSalt Int
_salt ListMonitorEvaluations' {Maybe Natural
Maybe [Filter]
Maybe Text
Text
monitorArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:monitorArn:ListMonitorEvaluations' :: ListMonitorEvaluations -> Text
$sel:nextToken:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe Text
$sel:maxResults:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe Natural
$sel:filters:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe [Filter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      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
monitorArn

instance Prelude.NFData ListMonitorEvaluations where
  rnf :: ListMonitorEvaluations -> ()
rnf ListMonitorEvaluations' {Maybe Natural
Maybe [Filter]
Maybe Text
Text
monitorArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:monitorArn:ListMonitorEvaluations' :: ListMonitorEvaluations -> Text
$sel:nextToken:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe Text
$sel:maxResults:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe Natural
$sel:filters:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe [Filter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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
monitorArn

instance Data.ToHeaders ListMonitorEvaluations where
  toHeaders :: ListMonitorEvaluations -> 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
"AmazonForecast.ListMonitorEvaluations" ::
                          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 ListMonitorEvaluations where
  toJSON :: ListMonitorEvaluations -> Value
toJSON ListMonitorEvaluations' {Maybe Natural
Maybe [Filter]
Maybe Text
Text
monitorArn :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:monitorArn:ListMonitorEvaluations' :: ListMonitorEvaluations -> Text
$sel:nextToken:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe Text
$sel:maxResults:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe Natural
$sel:filters:ListMonitorEvaluations' :: ListMonitorEvaluations -> Maybe [Filter]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"Filters" 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 [Filter]
filters,
            (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
"MonitorArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
monitorArn)
          ]
      )

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

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

-- | /See:/ 'newListMonitorEvaluationsResponse' smart constructor.
data ListMonitorEvaluationsResponse = ListMonitorEvaluationsResponse'
  { -- | If the response is truncated, Amazon Forecast returns this token. To
    -- retrieve the next set of results, use the token in the next request.
    -- Tokens expire after 24 hours.
    ListMonitorEvaluationsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The monitoring results and predictor events collected by the monitor
    -- resource during different windows of time.
    --
    -- For information about monitoring see
    -- <https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html Viewing Monitoring Results>.
    -- For more information about retrieving monitoring results see
    -- <https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html Viewing Monitoring Results>.
    ListMonitorEvaluationsResponse
-> Maybe [PredictorMonitorEvaluation]
predictorMonitorEvaluations :: Prelude.Maybe [PredictorMonitorEvaluation],
    -- | The response's http status code.
    ListMonitorEvaluationsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMonitorEvaluationsResponse
-> ListMonitorEvaluationsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMonitorEvaluationsResponse
-> ListMonitorEvaluationsResponse -> Bool
$c/= :: ListMonitorEvaluationsResponse
-> ListMonitorEvaluationsResponse -> Bool
== :: ListMonitorEvaluationsResponse
-> ListMonitorEvaluationsResponse -> Bool
$c== :: ListMonitorEvaluationsResponse
-> ListMonitorEvaluationsResponse -> Bool
Prelude.Eq, ReadPrec [ListMonitorEvaluationsResponse]
ReadPrec ListMonitorEvaluationsResponse
Int -> ReadS ListMonitorEvaluationsResponse
ReadS [ListMonitorEvaluationsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMonitorEvaluationsResponse]
$creadListPrec :: ReadPrec [ListMonitorEvaluationsResponse]
readPrec :: ReadPrec ListMonitorEvaluationsResponse
$creadPrec :: ReadPrec ListMonitorEvaluationsResponse
readList :: ReadS [ListMonitorEvaluationsResponse]
$creadList :: ReadS [ListMonitorEvaluationsResponse]
readsPrec :: Int -> ReadS ListMonitorEvaluationsResponse
$creadsPrec :: Int -> ReadS ListMonitorEvaluationsResponse
Prelude.Read, Int -> ListMonitorEvaluationsResponse -> ShowS
[ListMonitorEvaluationsResponse] -> ShowS
ListMonitorEvaluationsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMonitorEvaluationsResponse] -> ShowS
$cshowList :: [ListMonitorEvaluationsResponse] -> ShowS
show :: ListMonitorEvaluationsResponse -> String
$cshow :: ListMonitorEvaluationsResponse -> String
showsPrec :: Int -> ListMonitorEvaluationsResponse -> ShowS
$cshowsPrec :: Int -> ListMonitorEvaluationsResponse -> ShowS
Prelude.Show, forall x.
Rep ListMonitorEvaluationsResponse x
-> ListMonitorEvaluationsResponse
forall x.
ListMonitorEvaluationsResponse
-> Rep ListMonitorEvaluationsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMonitorEvaluationsResponse x
-> ListMonitorEvaluationsResponse
$cfrom :: forall x.
ListMonitorEvaluationsResponse
-> Rep ListMonitorEvaluationsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMonitorEvaluationsResponse' 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', 'listMonitorEvaluationsResponse_nextToken' - If the response is truncated, Amazon Forecast returns this token. To
-- retrieve the next set of results, use the token in the next request.
-- Tokens expire after 24 hours.
--
-- 'predictorMonitorEvaluations', 'listMonitorEvaluationsResponse_predictorMonitorEvaluations' - The monitoring results and predictor events collected by the monitor
-- resource during different windows of time.
--
-- For information about monitoring see
-- <https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html Viewing Monitoring Results>.
-- For more information about retrieving monitoring results see
-- <https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html Viewing Monitoring Results>.
--
-- 'httpStatus', 'listMonitorEvaluationsResponse_httpStatus' - The response's http status code.
newListMonitorEvaluationsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMonitorEvaluationsResponse
newListMonitorEvaluationsResponse :: Int -> ListMonitorEvaluationsResponse
newListMonitorEvaluationsResponse Int
pHttpStatus_ =
  ListMonitorEvaluationsResponse'
    { $sel:nextToken:ListMonitorEvaluationsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:predictorMonitorEvaluations:ListMonitorEvaluationsResponse' :: Maybe [PredictorMonitorEvaluation]
predictorMonitorEvaluations =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListMonitorEvaluationsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the response is truncated, Amazon Forecast returns this token. To
-- retrieve the next set of results, use the token in the next request.
-- Tokens expire after 24 hours.
listMonitorEvaluationsResponse_nextToken :: Lens.Lens' ListMonitorEvaluationsResponse (Prelude.Maybe Prelude.Text)
listMonitorEvaluationsResponse_nextToken :: Lens' ListMonitorEvaluationsResponse (Maybe Text)
listMonitorEvaluationsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitorEvaluationsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMonitorEvaluationsResponse' :: ListMonitorEvaluationsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMonitorEvaluationsResponse
s@ListMonitorEvaluationsResponse' {} Maybe Text
a -> ListMonitorEvaluationsResponse
s {$sel:nextToken:ListMonitorEvaluationsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMonitorEvaluationsResponse)

-- | The monitoring results and predictor events collected by the monitor
-- resource during different windows of time.
--
-- For information about monitoring see
-- <https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html Viewing Monitoring Results>.
-- For more information about retrieving monitoring results see
-- <https://docs.aws.amazon.com/forecast/latest/dg/predictor-monitoring-results.html Viewing Monitoring Results>.
listMonitorEvaluationsResponse_predictorMonitorEvaluations :: Lens.Lens' ListMonitorEvaluationsResponse (Prelude.Maybe [PredictorMonitorEvaluation])
listMonitorEvaluationsResponse_predictorMonitorEvaluations :: Lens'
  ListMonitorEvaluationsResponse (Maybe [PredictorMonitorEvaluation])
listMonitorEvaluationsResponse_predictorMonitorEvaluations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitorEvaluationsResponse' {Maybe [PredictorMonitorEvaluation]
predictorMonitorEvaluations :: Maybe [PredictorMonitorEvaluation]
$sel:predictorMonitorEvaluations:ListMonitorEvaluationsResponse' :: ListMonitorEvaluationsResponse
-> Maybe [PredictorMonitorEvaluation]
predictorMonitorEvaluations} -> Maybe [PredictorMonitorEvaluation]
predictorMonitorEvaluations) (\s :: ListMonitorEvaluationsResponse
s@ListMonitorEvaluationsResponse' {} Maybe [PredictorMonitorEvaluation]
a -> ListMonitorEvaluationsResponse
s {$sel:predictorMonitorEvaluations:ListMonitorEvaluationsResponse' :: Maybe [PredictorMonitorEvaluation]
predictorMonitorEvaluations = Maybe [PredictorMonitorEvaluation]
a} :: ListMonitorEvaluationsResponse) 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 response's http status code.
listMonitorEvaluationsResponse_httpStatus :: Lens.Lens' ListMonitorEvaluationsResponse Prelude.Int
listMonitorEvaluationsResponse_httpStatus :: Lens' ListMonitorEvaluationsResponse Int
listMonitorEvaluationsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMonitorEvaluationsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListMonitorEvaluationsResponse' :: ListMonitorEvaluationsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListMonitorEvaluationsResponse
s@ListMonitorEvaluationsResponse' {} Int
a -> ListMonitorEvaluationsResponse
s {$sel:httpStatus:ListMonitorEvaluationsResponse' :: Int
httpStatus = Int
a} :: ListMonitorEvaluationsResponse)

instance
  Prelude.NFData
    ListMonitorEvaluationsResponse
  where
  rnf :: ListMonitorEvaluationsResponse -> ()
rnf ListMonitorEvaluationsResponse' {Int
Maybe [PredictorMonitorEvaluation]
Maybe Text
httpStatus :: Int
predictorMonitorEvaluations :: Maybe [PredictorMonitorEvaluation]
nextToken :: Maybe Text
$sel:httpStatus:ListMonitorEvaluationsResponse' :: ListMonitorEvaluationsResponse -> Int
$sel:predictorMonitorEvaluations:ListMonitorEvaluationsResponse' :: ListMonitorEvaluationsResponse
-> Maybe [PredictorMonitorEvaluation]
$sel:nextToken:ListMonitorEvaluationsResponse' :: ListMonitorEvaluationsResponse -> Maybe Text
..} =
    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 Maybe [PredictorMonitorEvaluation]
predictorMonitorEvaluations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus