{-# 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.ListPredictors
-- 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 predictors created using the CreateAutoPredictor or
-- CreatePredictor operations. For each predictor, this operation returns a
-- summary of its properties, including its Amazon Resource Name (ARN).
--
-- You can retrieve the complete set of properties by using the ARN with
-- the DescribeAutoPredictor and DescribePredictor operations. You can
-- filter the list using an array of Filter objects.
--
-- This operation returns paginated results.
module Amazonka.Forecast.ListPredictors
  ( -- * Creating a Request
    ListPredictors (..),
    newListPredictors,

    -- * Request Lenses
    listPredictors_filters,
    listPredictors_maxResults,
    listPredictors_nextToken,

    -- * Destructuring the Response
    ListPredictorsResponse (..),
    newListPredictorsResponse,

    -- * Response Lenses
    listPredictorsResponse_nextToken,
    listPredictorsResponse_predictors,
    listPredictorsResponse_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:/ 'newListPredictors' smart constructor.
data ListPredictors = ListPredictors'
  { -- | An array of filters. For each filter, you provide a condition and a
    -- match statement. The condition is either @IS@ or @IS_NOT@, which
    -- specifies whether to include or exclude the predictors that match the
    -- statement from the list, respectively. The match statement consists of a
    -- key and a value.
    --
    -- __Filter properties__
    --
    -- -   @Condition@ - The condition to apply. Valid values are @IS@ and
    --     @IS_NOT@. To include the predictors that match the statement,
    --     specify @IS@. To exclude matching predictors, specify @IS_NOT@.
    --
    -- -   @Key@ - The name of the parameter to filter on. Valid values are
    --     @DatasetGroupArn@ and @Status@.
    --
    -- -   @Value@ - The value to match.
    --
    -- For example, to list all predictors whose status is ACTIVE, you would
    -- specify:
    --
    -- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]@
    ListPredictors -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The number of items to return in the response.
    ListPredictors -> 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.
    ListPredictors -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text
  }
  deriving (ListPredictors -> ListPredictors -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPredictors -> ListPredictors -> Bool
$c/= :: ListPredictors -> ListPredictors -> Bool
== :: ListPredictors -> ListPredictors -> Bool
$c== :: ListPredictors -> ListPredictors -> Bool
Prelude.Eq, ReadPrec [ListPredictors]
ReadPrec ListPredictors
Int -> ReadS ListPredictors
ReadS [ListPredictors]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPredictors]
$creadListPrec :: ReadPrec [ListPredictors]
readPrec :: ReadPrec ListPredictors
$creadPrec :: ReadPrec ListPredictors
readList :: ReadS [ListPredictors]
$creadList :: ReadS [ListPredictors]
readsPrec :: Int -> ReadS ListPredictors
$creadsPrec :: Int -> ReadS ListPredictors
Prelude.Read, Int -> ListPredictors -> ShowS
[ListPredictors] -> ShowS
ListPredictors -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPredictors] -> ShowS
$cshowList :: [ListPredictors] -> ShowS
show :: ListPredictors -> String
$cshow :: ListPredictors -> String
showsPrec :: Int -> ListPredictors -> ShowS
$cshowsPrec :: Int -> ListPredictors -> ShowS
Prelude.Show, forall x. Rep ListPredictors x -> ListPredictors
forall x. ListPredictors -> Rep ListPredictors x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPredictors x -> ListPredictors
$cfrom :: forall x. ListPredictors -> Rep ListPredictors x
Prelude.Generic)

-- |
-- Create a value of 'ListPredictors' 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', 'listPredictors_filters' - An array of filters. For each filter, you provide a condition and a
-- match statement. The condition is either @IS@ or @IS_NOT@, which
-- specifies whether to include or exclude the predictors that match the
-- statement from the list, respectively. The match statement consists of a
-- key and a value.
--
-- __Filter properties__
--
-- -   @Condition@ - The condition to apply. Valid values are @IS@ and
--     @IS_NOT@. To include the predictors that match the statement,
--     specify @IS@. To exclude matching predictors, specify @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. Valid values are
--     @DatasetGroupArn@ and @Status@.
--
-- -   @Value@ - The value to match.
--
-- For example, to list all predictors whose status is ACTIVE, you would
-- specify:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]@
--
-- 'maxResults', 'listPredictors_maxResults' - The number of items to return in the response.
--
-- 'nextToken', 'listPredictors_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.
newListPredictors ::
  ListPredictors
newListPredictors :: ListPredictors
newListPredictors =
  ListPredictors'
    { $sel:filters:ListPredictors' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListPredictors' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListPredictors' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing
    }

-- | An array of filters. For each filter, you provide a condition and a
-- match statement. The condition is either @IS@ or @IS_NOT@, which
-- specifies whether to include or exclude the predictors that match the
-- statement from the list, respectively. The match statement consists of a
-- key and a value.
--
-- __Filter properties__
--
-- -   @Condition@ - The condition to apply. Valid values are @IS@ and
--     @IS_NOT@. To include the predictors that match the statement,
--     specify @IS@. To exclude matching predictors, specify @IS_NOT@.
--
-- -   @Key@ - The name of the parameter to filter on. Valid values are
--     @DatasetGroupArn@ and @Status@.
--
-- -   @Value@ - The value to match.
--
-- For example, to list all predictors whose status is ACTIVE, you would
-- specify:
--
-- @\"Filters\": [ { \"Condition\": \"IS\", \"Key\": \"Status\", \"Value\": \"ACTIVE\" } ]@
listPredictors_filters :: Lens.Lens' ListPredictors (Prelude.Maybe [Filter])
listPredictors_filters :: Lens' ListPredictors (Maybe [Filter])
listPredictors_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPredictors' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:ListPredictors' :: ListPredictors -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: ListPredictors
s@ListPredictors' {} Maybe [Filter]
a -> ListPredictors
s {$sel:filters:ListPredictors' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: ListPredictors) 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 number of items to return in the response.
listPredictors_maxResults :: Lens.Lens' ListPredictors (Prelude.Maybe Prelude.Natural)
listPredictors_maxResults :: Lens' ListPredictors (Maybe Natural)
listPredictors_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPredictors' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListPredictors' :: ListPredictors -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListPredictors
s@ListPredictors' {} Maybe Natural
a -> ListPredictors
s {$sel:maxResults:ListPredictors' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListPredictors)

-- | 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.
listPredictors_nextToken :: Lens.Lens' ListPredictors (Prelude.Maybe Prelude.Text)
listPredictors_nextToken :: Lens' ListPredictors (Maybe Text)
listPredictors_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPredictors' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPredictors' :: ListPredictors -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPredictors
s@ListPredictors' {} Maybe Text
a -> ListPredictors
s {$sel:nextToken:ListPredictors' :: Maybe Text
nextToken = Maybe Text
a} :: ListPredictors)

instance Core.AWSPager ListPredictors where
  page :: ListPredictors
-> AWSResponse ListPredictors -> Maybe ListPredictors
page ListPredictors
rq AWSResponse ListPredictors
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListPredictors
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListPredictorsResponse (Maybe Text)
listPredictorsResponse_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 ListPredictors
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListPredictorsResponse (Maybe [PredictorSummary])
listPredictorsResponse_predictors
            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.$ ListPredictors
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListPredictors (Maybe Text)
listPredictors_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListPredictors
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListPredictorsResponse (Maybe Text)
listPredictorsResponse_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 ListPredictors where
  type
    AWSResponse ListPredictors =
      ListPredictorsResponse
  request :: (Service -> Service) -> ListPredictors -> Request ListPredictors
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 ListPredictors
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListPredictors)))
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 [PredictorSummary] -> Int -> ListPredictorsResponse
ListPredictorsResponse'
            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
"Predictors" 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 ListPredictors where
  hashWithSalt :: Int -> ListPredictors -> Int
hashWithSalt Int
_salt ListPredictors' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListPredictors' :: ListPredictors -> Maybe Text
$sel:maxResults:ListPredictors' :: ListPredictors -> Maybe Natural
$sel:filters:ListPredictors' :: ListPredictors -> 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

instance Prelude.NFData ListPredictors where
  rnf :: ListPredictors -> ()
rnf ListPredictors' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListPredictors' :: ListPredictors -> Maybe Text
$sel:maxResults:ListPredictors' :: ListPredictors -> Maybe Natural
$sel:filters:ListPredictors' :: ListPredictors -> 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

instance Data.ToHeaders ListPredictors where
  toHeaders :: ListPredictors -> 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.ListPredictors" ::
                          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 ListPredictors where
  toJSON :: ListPredictors -> Value
toJSON ListPredictors' {Maybe Natural
Maybe [Filter]
Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:nextToken:ListPredictors' :: ListPredictors -> Maybe Text
$sel:maxResults:ListPredictors' :: ListPredictors -> Maybe Natural
$sel:filters:ListPredictors' :: ListPredictors -> 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
          ]
      )

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

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

-- | /See:/ 'newListPredictorsResponse' smart constructor.
data ListPredictorsResponse = ListPredictorsResponse'
  { -- | If the response is truncated, Amazon Forecast returns this token. To
    -- retrieve the next set of results, use the token in the next request.
    ListPredictorsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An array of objects that summarize each predictor\'s properties.
    ListPredictorsResponse -> Maybe [PredictorSummary]
predictors :: Prelude.Maybe [PredictorSummary],
    -- | The response's http status code.
    ListPredictorsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListPredictorsResponse -> ListPredictorsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListPredictorsResponse -> ListPredictorsResponse -> Bool
$c/= :: ListPredictorsResponse -> ListPredictorsResponse -> Bool
== :: ListPredictorsResponse -> ListPredictorsResponse -> Bool
$c== :: ListPredictorsResponse -> ListPredictorsResponse -> Bool
Prelude.Eq, ReadPrec [ListPredictorsResponse]
ReadPrec ListPredictorsResponse
Int -> ReadS ListPredictorsResponse
ReadS [ListPredictorsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListPredictorsResponse]
$creadListPrec :: ReadPrec [ListPredictorsResponse]
readPrec :: ReadPrec ListPredictorsResponse
$creadPrec :: ReadPrec ListPredictorsResponse
readList :: ReadS [ListPredictorsResponse]
$creadList :: ReadS [ListPredictorsResponse]
readsPrec :: Int -> ReadS ListPredictorsResponse
$creadsPrec :: Int -> ReadS ListPredictorsResponse
Prelude.Read, Int -> ListPredictorsResponse -> ShowS
[ListPredictorsResponse] -> ShowS
ListPredictorsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListPredictorsResponse] -> ShowS
$cshowList :: [ListPredictorsResponse] -> ShowS
show :: ListPredictorsResponse -> String
$cshow :: ListPredictorsResponse -> String
showsPrec :: Int -> ListPredictorsResponse -> ShowS
$cshowsPrec :: Int -> ListPredictorsResponse -> ShowS
Prelude.Show, forall x. Rep ListPredictorsResponse x -> ListPredictorsResponse
forall x. ListPredictorsResponse -> Rep ListPredictorsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListPredictorsResponse x -> ListPredictorsResponse
$cfrom :: forall x. ListPredictorsResponse -> Rep ListPredictorsResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListPredictorsResponse' 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', 'listPredictorsResponse_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.
--
-- 'predictors', 'listPredictorsResponse_predictors' - An array of objects that summarize each predictor\'s properties.
--
-- 'httpStatus', 'listPredictorsResponse_httpStatus' - The response's http status code.
newListPredictorsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListPredictorsResponse
newListPredictorsResponse :: Int -> ListPredictorsResponse
newListPredictorsResponse Int
pHttpStatus_ =
  ListPredictorsResponse'
    { $sel:nextToken:ListPredictorsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:predictors:ListPredictorsResponse' :: Maybe [PredictorSummary]
predictors = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListPredictorsResponse' :: 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.
listPredictorsResponse_nextToken :: Lens.Lens' ListPredictorsResponse (Prelude.Maybe Prelude.Text)
listPredictorsResponse_nextToken :: Lens' ListPredictorsResponse (Maybe Text)
listPredictorsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPredictorsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListPredictorsResponse' :: ListPredictorsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListPredictorsResponse
s@ListPredictorsResponse' {} Maybe Text
a -> ListPredictorsResponse
s {$sel:nextToken:ListPredictorsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListPredictorsResponse)

-- | An array of objects that summarize each predictor\'s properties.
listPredictorsResponse_predictors :: Lens.Lens' ListPredictorsResponse (Prelude.Maybe [PredictorSummary])
listPredictorsResponse_predictors :: Lens' ListPredictorsResponse (Maybe [PredictorSummary])
listPredictorsResponse_predictors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPredictorsResponse' {Maybe [PredictorSummary]
predictors :: Maybe [PredictorSummary]
$sel:predictors:ListPredictorsResponse' :: ListPredictorsResponse -> Maybe [PredictorSummary]
predictors} -> Maybe [PredictorSummary]
predictors) (\s :: ListPredictorsResponse
s@ListPredictorsResponse' {} Maybe [PredictorSummary]
a -> ListPredictorsResponse
s {$sel:predictors:ListPredictorsResponse' :: Maybe [PredictorSummary]
predictors = Maybe [PredictorSummary]
a} :: ListPredictorsResponse) 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.
listPredictorsResponse_httpStatus :: Lens.Lens' ListPredictorsResponse Prelude.Int
listPredictorsResponse_httpStatus :: Lens' ListPredictorsResponse Int
listPredictorsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListPredictorsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListPredictorsResponse' :: ListPredictorsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListPredictorsResponse
s@ListPredictorsResponse' {} Int
a -> ListPredictorsResponse
s {$sel:httpStatus:ListPredictorsResponse' :: Int
httpStatus = Int
a} :: ListPredictorsResponse)

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