{-# 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.MachineLearning.DescribeMLModels
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of @MLModel@ that match the search criteria in the
-- request.
--
-- This operation returns paginated results.
module Amazonka.MachineLearning.DescribeMLModels
  ( -- * Creating a Request
    DescribeMLModels (..),
    newDescribeMLModels,

    -- * Request Lenses
    describeMLModels_eq,
    describeMLModels_ge,
    describeMLModels_prefix,
    describeMLModels_gt,
    describeMLModels_ne,
    describeMLModels_nextToken,
    describeMLModels_sortOrder,
    describeMLModels_limit,
    describeMLModels_lt,
    describeMLModels_filterVariable,
    describeMLModels_le,

    -- * Destructuring the Response
    DescribeMLModelsResponse (..),
    newDescribeMLModelsResponse,

    -- * Response Lenses
    describeMLModelsResponse_results,
    describeMLModelsResponse_nextToken,
    describeMLModelsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeMLModels' smart constructor.
data DescribeMLModels = DescribeMLModels'
  { -- | The equal to operator. The @MLModel@ results will have @FilterVariable@
    -- values that exactly match the value specified with @EQ@.
    DescribeMLModels -> Maybe Text
eq :: Prelude.Maybe Prelude.Text,
    -- | The greater than or equal to operator. The @MLModel@ results will have
    -- @FilterVariable@ values that are greater than or equal to the value
    -- specified with @GE@.
    DescribeMLModels -> Maybe Text
ge :: Prelude.Maybe Prelude.Text,
    -- | A string that is found at the beginning of a variable, such as @Name@ or
    -- @Id@.
    --
    -- For example, an @MLModel@ could have the @Name@
    -- @2014-09-09-HolidayGiftMailer@. To search for this @MLModel@, select
    -- @Name@ for the @FilterVariable@ and any of the following strings for the
    -- @Prefix@:
    --
    -- -   2014-09
    --
    -- -   2014-09-09
    --
    -- -   2014-09-09-Holiday
    DescribeMLModels -> Maybe Text
prefix :: Prelude.Maybe Prelude.Text,
    -- | The greater than operator. The @MLModel@ results will have
    -- @FilterVariable@ values that are greater than the value specified with
    -- @GT@.
    DescribeMLModels -> Maybe Text
gt :: Prelude.Maybe Prelude.Text,
    -- | The not equal to operator. The @MLModel@ results will have
    -- @FilterVariable@ values not equal to the value specified with @NE@.
    DescribeMLModels -> Maybe Text
ne :: Prelude.Maybe Prelude.Text,
    -- | The ID of the page in the paginated results.
    DescribeMLModels -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A two-value parameter that determines the sequence of the resulting list
    -- of @MLModel@.
    --
    -- -   @asc@ - Arranges the list in ascending order (A-Z, 0-9).
    --
    -- -   @dsc@ - Arranges the list in descending order (Z-A, 9-0).
    --
    -- Results are sorted by @FilterVariable@.
    DescribeMLModels -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
    -- | The number of pages of information to include in the result. The range
    -- of acceptable values is @1@ through @100@. The default value is @100@.
    DescribeMLModels -> Maybe Natural
limit :: Prelude.Maybe Prelude.Natural,
    -- | The less than operator. The @MLModel@ results will have @FilterVariable@
    -- values that are less than the value specified with @LT@.
    DescribeMLModels -> Maybe Text
lt :: Prelude.Maybe Prelude.Text,
    -- | Use one of the following variables to filter a list of @MLModel@:
    --
    -- -   @CreatedAt@ - Sets the search criteria to @MLModel@ creation date.
    --
    -- -   @Status@ - Sets the search criteria to @MLModel@ status.
    --
    -- -   @Name@ - Sets the search criteria to the contents of @MLModel@ ____
    --     @Name@.
    --
    -- -   @IAMUser@ - Sets the search criteria to the user account that
    --     invoked the @MLModel@ creation.
    --
    -- -   @TrainingDataSourceId@ - Sets the search criteria to the
    --     @DataSource@ used to train one or more @MLModel@.
    --
    -- -   @RealtimeEndpointStatus@ - Sets the search criteria to the @MLModel@
    --     real-time endpoint status.
    --
    -- -   @MLModelType@ - Sets the search criteria to @MLModel@ type: binary,
    --     regression, or multi-class.
    --
    -- -   @Algorithm@ - Sets the search criteria to the algorithm that the
    --     @MLModel@ uses.
    --
    -- -   @TrainingDataURI@ - Sets the search criteria to the data file(s)
    --     used in training a @MLModel@. The URL can identify either a file or
    --     an Amazon Simple Storage Service (Amazon S3) bucket or directory.
    DescribeMLModels -> Maybe MLModelFilterVariable
filterVariable :: Prelude.Maybe MLModelFilterVariable,
    -- | The less than or equal to operator. The @MLModel@ results will have
    -- @FilterVariable@ values that are less than or equal to the value
    -- specified with @LE@.
    DescribeMLModels -> Maybe Text
le :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeMLModels -> DescribeMLModels -> Bool
(DescribeMLModels -> DescribeMLModels -> Bool)
-> (DescribeMLModels -> DescribeMLModels -> Bool)
-> Eq DescribeMLModels
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMLModels -> DescribeMLModels -> Bool
$c/= :: DescribeMLModels -> DescribeMLModels -> Bool
== :: DescribeMLModels -> DescribeMLModels -> Bool
$c== :: DescribeMLModels -> DescribeMLModels -> Bool
Prelude.Eq, ReadPrec [DescribeMLModels]
ReadPrec DescribeMLModels
Int -> ReadS DescribeMLModels
ReadS [DescribeMLModels]
(Int -> ReadS DescribeMLModels)
-> ReadS [DescribeMLModels]
-> ReadPrec DescribeMLModels
-> ReadPrec [DescribeMLModels]
-> Read DescribeMLModels
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMLModels]
$creadListPrec :: ReadPrec [DescribeMLModels]
readPrec :: ReadPrec DescribeMLModels
$creadPrec :: ReadPrec DescribeMLModels
readList :: ReadS [DescribeMLModels]
$creadList :: ReadS [DescribeMLModels]
readsPrec :: Int -> ReadS DescribeMLModels
$creadsPrec :: Int -> ReadS DescribeMLModels
Prelude.Read, Int -> DescribeMLModels -> ShowS
[DescribeMLModels] -> ShowS
DescribeMLModels -> String
(Int -> DescribeMLModels -> ShowS)
-> (DescribeMLModels -> String)
-> ([DescribeMLModels] -> ShowS)
-> Show DescribeMLModels
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMLModels] -> ShowS
$cshowList :: [DescribeMLModels] -> ShowS
show :: DescribeMLModels -> String
$cshow :: DescribeMLModels -> String
showsPrec :: Int -> DescribeMLModels -> ShowS
$cshowsPrec :: Int -> DescribeMLModels -> ShowS
Prelude.Show, (forall x. DescribeMLModels -> Rep DescribeMLModels x)
-> (forall x. Rep DescribeMLModels x -> DescribeMLModels)
-> Generic DescribeMLModels
forall x. Rep DescribeMLModels x -> DescribeMLModels
forall x. DescribeMLModels -> Rep DescribeMLModels x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeMLModels x -> DescribeMLModels
$cfrom :: forall x. DescribeMLModels -> Rep DescribeMLModels x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMLModels' 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:
--
-- 'eq', 'describeMLModels_eq' - The equal to operator. The @MLModel@ results will have @FilterVariable@
-- values that exactly match the value specified with @EQ@.
--
-- 'ge', 'describeMLModels_ge' - The greater than or equal to operator. The @MLModel@ results will have
-- @FilterVariable@ values that are greater than or equal to the value
-- specified with @GE@.
--
-- 'prefix', 'describeMLModels_prefix' - A string that is found at the beginning of a variable, such as @Name@ or
-- @Id@.
--
-- For example, an @MLModel@ could have the @Name@
-- @2014-09-09-HolidayGiftMailer@. To search for this @MLModel@, select
-- @Name@ for the @FilterVariable@ and any of the following strings for the
-- @Prefix@:
--
-- -   2014-09
--
-- -   2014-09-09
--
-- -   2014-09-09-Holiday
--
-- 'gt', 'describeMLModels_gt' - The greater than operator. The @MLModel@ results will have
-- @FilterVariable@ values that are greater than the value specified with
-- @GT@.
--
-- 'ne', 'describeMLModels_ne' - The not equal to operator. The @MLModel@ results will have
-- @FilterVariable@ values not equal to the value specified with @NE@.
--
-- 'nextToken', 'describeMLModels_nextToken' - The ID of the page in the paginated results.
--
-- 'sortOrder', 'describeMLModels_sortOrder' - A two-value parameter that determines the sequence of the resulting list
-- of @MLModel@.
--
-- -   @asc@ - Arranges the list in ascending order (A-Z, 0-9).
--
-- -   @dsc@ - Arranges the list in descending order (Z-A, 9-0).
--
-- Results are sorted by @FilterVariable@.
--
-- 'limit', 'describeMLModels_limit' - The number of pages of information to include in the result. The range
-- of acceptable values is @1@ through @100@. The default value is @100@.
--
-- 'lt', 'describeMLModels_lt' - The less than operator. The @MLModel@ results will have @FilterVariable@
-- values that are less than the value specified with @LT@.
--
-- 'filterVariable', 'describeMLModels_filterVariable' - Use one of the following variables to filter a list of @MLModel@:
--
-- -   @CreatedAt@ - Sets the search criteria to @MLModel@ creation date.
--
-- -   @Status@ - Sets the search criteria to @MLModel@ status.
--
-- -   @Name@ - Sets the search criteria to the contents of @MLModel@ ____
--     @Name@.
--
-- -   @IAMUser@ - Sets the search criteria to the user account that
--     invoked the @MLModel@ creation.
--
-- -   @TrainingDataSourceId@ - Sets the search criteria to the
--     @DataSource@ used to train one or more @MLModel@.
--
-- -   @RealtimeEndpointStatus@ - Sets the search criteria to the @MLModel@
--     real-time endpoint status.
--
-- -   @MLModelType@ - Sets the search criteria to @MLModel@ type: binary,
--     regression, or multi-class.
--
-- -   @Algorithm@ - Sets the search criteria to the algorithm that the
--     @MLModel@ uses.
--
-- -   @TrainingDataURI@ - Sets the search criteria to the data file(s)
--     used in training a @MLModel@. The URL can identify either a file or
--     an Amazon Simple Storage Service (Amazon S3) bucket or directory.
--
-- 'le', 'describeMLModels_le' - The less than or equal to operator. The @MLModel@ results will have
-- @FilterVariable@ values that are less than or equal to the value
-- specified with @LE@.
newDescribeMLModels ::
  DescribeMLModels
newDescribeMLModels :: DescribeMLModels
newDescribeMLModels =
  DescribeMLModels' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe SortOrder
-> Maybe Natural
-> Maybe Text
-> Maybe MLModelFilterVariable
-> Maybe Text
-> DescribeMLModels
DescribeMLModels'
    { $sel:eq:DescribeMLModels' :: Maybe Text
eq = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ge:DescribeMLModels' :: Maybe Text
ge = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:prefix:DescribeMLModels' :: Maybe Text
prefix = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:gt:DescribeMLModels' :: Maybe Text
gt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ne:DescribeMLModels' :: Maybe Text
ne = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeMLModels' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:DescribeMLModels' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:limit:DescribeMLModels' :: Maybe Natural
limit = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:lt:DescribeMLModels' :: Maybe Text
lt = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:filterVariable:DescribeMLModels' :: Maybe MLModelFilterVariable
filterVariable = Maybe MLModelFilterVariable
forall a. Maybe a
Prelude.Nothing,
      $sel:le:DescribeMLModels' :: Maybe Text
le = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The equal to operator. The @MLModel@ results will have @FilterVariable@
-- values that exactly match the value specified with @EQ@.
describeMLModels_eq :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_eq :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_eq = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
eq :: Maybe Text
$sel:eq:DescribeMLModels' :: DescribeMLModels -> Maybe Text
eq} -> Maybe Text
eq) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:eq:DescribeMLModels' :: Maybe Text
eq = Maybe Text
a} :: DescribeMLModels)

-- | The greater than or equal to operator. The @MLModel@ results will have
-- @FilterVariable@ values that are greater than or equal to the value
-- specified with @GE@.
describeMLModels_ge :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_ge :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_ge = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
ge :: Maybe Text
$sel:ge:DescribeMLModels' :: DescribeMLModels -> Maybe Text
ge} -> Maybe Text
ge) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:ge:DescribeMLModels' :: Maybe Text
ge = Maybe Text
a} :: DescribeMLModels)

-- | A string that is found at the beginning of a variable, such as @Name@ or
-- @Id@.
--
-- For example, an @MLModel@ could have the @Name@
-- @2014-09-09-HolidayGiftMailer@. To search for this @MLModel@, select
-- @Name@ for the @FilterVariable@ and any of the following strings for the
-- @Prefix@:
--
-- -   2014-09
--
-- -   2014-09-09
--
-- -   2014-09-09-Holiday
describeMLModels_prefix :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_prefix :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_prefix = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
prefix :: Maybe Text
$sel:prefix:DescribeMLModels' :: DescribeMLModels -> Maybe Text
prefix} -> Maybe Text
prefix) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:prefix:DescribeMLModels' :: Maybe Text
prefix = Maybe Text
a} :: DescribeMLModels)

-- | The greater than operator. The @MLModel@ results will have
-- @FilterVariable@ values that are greater than the value specified with
-- @GT@.
describeMLModels_gt :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_gt :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_gt = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
gt :: Maybe Text
$sel:gt:DescribeMLModels' :: DescribeMLModels -> Maybe Text
gt} -> Maybe Text
gt) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:gt:DescribeMLModels' :: Maybe Text
gt = Maybe Text
a} :: DescribeMLModels)

-- | The not equal to operator. The @MLModel@ results will have
-- @FilterVariable@ values not equal to the value specified with @NE@.
describeMLModels_ne :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_ne :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_ne = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
ne :: Maybe Text
$sel:ne:DescribeMLModels' :: DescribeMLModels -> Maybe Text
ne} -> Maybe Text
ne) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:ne:DescribeMLModels' :: Maybe Text
ne = Maybe Text
a} :: DescribeMLModels)

-- | The ID of the page in the paginated results.
describeMLModels_nextToken :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_nextToken = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMLModels' :: DescribeMLModels -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:nextToken:DescribeMLModels' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMLModels)

-- | A two-value parameter that determines the sequence of the resulting list
-- of @MLModel@.
--
-- -   @asc@ - Arranges the list in ascending order (A-Z, 0-9).
--
-- -   @dsc@ - Arranges the list in descending order (Z-A, 9-0).
--
-- Results are sorted by @FilterVariable@.
describeMLModels_sortOrder :: Lens.Lens' DescribeMLModels (Prelude.Maybe SortOrder)
describeMLModels_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_sortOrder = (DescribeMLModels -> Maybe SortOrder)
-> (DescribeMLModels -> Maybe SortOrder -> DescribeMLModels)
-> Lens
     DescribeMLModels
     DescribeMLModels
     (Maybe SortOrder)
     (Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:DescribeMLModels' :: DescribeMLModels -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe SortOrder
a -> DescribeMLModels
s {$sel:sortOrder:DescribeMLModels' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: DescribeMLModels)

-- | The number of pages of information to include in the result. The range
-- of acceptable values is @1@ through @100@. The default value is @100@.
describeMLModels_limit :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Natural)
describeMLModels_limit :: (Maybe Natural -> f (Maybe Natural))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_limit = (DescribeMLModels -> Maybe Natural)
-> (DescribeMLModels -> Maybe Natural -> DescribeMLModels)
-> Lens
     DescribeMLModels DescribeMLModels (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Natural
limit :: Maybe Natural
$sel:limit:DescribeMLModels' :: DescribeMLModels -> Maybe Natural
limit} -> Maybe Natural
limit) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Natural
a -> DescribeMLModels
s {$sel:limit:DescribeMLModels' :: Maybe Natural
limit = Maybe Natural
a} :: DescribeMLModels)

-- | The less than operator. The @MLModel@ results will have @FilterVariable@
-- values that are less than the value specified with @LT@.
describeMLModels_lt :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_lt :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_lt = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
lt :: Maybe Text
$sel:lt:DescribeMLModels' :: DescribeMLModels -> Maybe Text
lt} -> Maybe Text
lt) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:lt:DescribeMLModels' :: Maybe Text
lt = Maybe Text
a} :: DescribeMLModels)

-- | Use one of the following variables to filter a list of @MLModel@:
--
-- -   @CreatedAt@ - Sets the search criteria to @MLModel@ creation date.
--
-- -   @Status@ - Sets the search criteria to @MLModel@ status.
--
-- -   @Name@ - Sets the search criteria to the contents of @MLModel@ ____
--     @Name@.
--
-- -   @IAMUser@ - Sets the search criteria to the user account that
--     invoked the @MLModel@ creation.
--
-- -   @TrainingDataSourceId@ - Sets the search criteria to the
--     @DataSource@ used to train one or more @MLModel@.
--
-- -   @RealtimeEndpointStatus@ - Sets the search criteria to the @MLModel@
--     real-time endpoint status.
--
-- -   @MLModelType@ - Sets the search criteria to @MLModel@ type: binary,
--     regression, or multi-class.
--
-- -   @Algorithm@ - Sets the search criteria to the algorithm that the
--     @MLModel@ uses.
--
-- -   @TrainingDataURI@ - Sets the search criteria to the data file(s)
--     used in training a @MLModel@. The URL can identify either a file or
--     an Amazon Simple Storage Service (Amazon S3) bucket or directory.
describeMLModels_filterVariable :: Lens.Lens' DescribeMLModels (Prelude.Maybe MLModelFilterVariable)
describeMLModels_filterVariable :: (Maybe MLModelFilterVariable -> f (Maybe MLModelFilterVariable))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_filterVariable = (DescribeMLModels -> Maybe MLModelFilterVariable)
-> (DescribeMLModels
    -> Maybe MLModelFilterVariable -> DescribeMLModels)
-> Lens
     DescribeMLModels
     DescribeMLModels
     (Maybe MLModelFilterVariable)
     (Maybe MLModelFilterVariable)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe MLModelFilterVariable
filterVariable :: Maybe MLModelFilterVariable
$sel:filterVariable:DescribeMLModels' :: DescribeMLModels -> Maybe MLModelFilterVariable
filterVariable} -> Maybe MLModelFilterVariable
filterVariable) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe MLModelFilterVariable
a -> DescribeMLModels
s {$sel:filterVariable:DescribeMLModels' :: Maybe MLModelFilterVariable
filterVariable = Maybe MLModelFilterVariable
a} :: DescribeMLModels)

-- | The less than or equal to operator. The @MLModel@ results will have
-- @FilterVariable@ values that are less than or equal to the value
-- specified with @LE@.
describeMLModels_le :: Lens.Lens' DescribeMLModels (Prelude.Maybe Prelude.Text)
describeMLModels_le :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModels -> f DescribeMLModels
describeMLModels_le = (DescribeMLModels -> Maybe Text)
-> (DescribeMLModels -> Maybe Text -> DescribeMLModels)
-> Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModels' {Maybe Text
le :: Maybe Text
$sel:le:DescribeMLModels' :: DescribeMLModels -> Maybe Text
le} -> Maybe Text
le) (\s :: DescribeMLModels
s@DescribeMLModels' {} Maybe Text
a -> DescribeMLModels
s {$sel:le:DescribeMLModels' :: Maybe Text
le = Maybe Text
a} :: DescribeMLModels)

instance Core.AWSPager DescribeMLModels where
  page :: DescribeMLModels
-> AWSResponse DescribeMLModels -> Maybe DescribeMLModels
page DescribeMLModels
rq AWSResponse DescribeMLModels
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeMLModels
DescribeMLModelsResponse
rs
            DescribeMLModelsResponse
-> Getting (First Text) DescribeMLModelsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMLModelsResponse
-> Const (First Text) DescribeMLModelsResponse
Lens' DescribeMLModelsResponse (Maybe Text)
describeMLModelsResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeMLModelsResponse
 -> Const (First Text) DescribeMLModelsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeMLModelsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeMLModels
forall a. Maybe a
Prelude.Nothing
    | Maybe [MLModel] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribeMLModels
DescribeMLModelsResponse
rs
            DescribeMLModelsResponse
-> Getting (First [MLModel]) DescribeMLModelsResponse [MLModel]
-> Maybe [MLModel]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [MLModel] -> Const (First [MLModel]) (Maybe [MLModel]))
-> DescribeMLModelsResponse
-> Const (First [MLModel]) DescribeMLModelsResponse
Lens' DescribeMLModelsResponse (Maybe [MLModel])
describeMLModelsResponse_results
              ((Maybe [MLModel] -> Const (First [MLModel]) (Maybe [MLModel]))
 -> DescribeMLModelsResponse
 -> Const (First [MLModel]) DescribeMLModelsResponse)
-> (([MLModel] -> Const (First [MLModel]) [MLModel])
    -> Maybe [MLModel] -> Const (First [MLModel]) (Maybe [MLModel]))
-> Getting (First [MLModel]) DescribeMLModelsResponse [MLModel]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([MLModel] -> Const (First [MLModel]) [MLModel])
-> Maybe [MLModel] -> Const (First [MLModel]) (Maybe [MLModel])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe DescribeMLModels
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      DescribeMLModels -> Maybe DescribeMLModels
forall a. a -> Maybe a
Prelude.Just (DescribeMLModels -> Maybe DescribeMLModels)
-> DescribeMLModels -> Maybe DescribeMLModels
forall a b. (a -> b) -> a -> b
Prelude.$
        DescribeMLModels
rq
          DescribeMLModels
-> (DescribeMLModels -> DescribeMLModels) -> DescribeMLModels
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> DescribeMLModels -> Identity DescribeMLModels
Lens DescribeMLModels DescribeMLModels (Maybe Text) (Maybe Text)
describeMLModels_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> DescribeMLModels -> Identity DescribeMLModels)
-> Maybe Text -> DescribeMLModels -> DescribeMLModels
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribeMLModels
DescribeMLModelsResponse
rs
          DescribeMLModelsResponse
-> Getting (First Text) DescribeMLModelsResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> DescribeMLModelsResponse
-> Const (First Text) DescribeMLModelsResponse
Lens' DescribeMLModelsResponse (Maybe Text)
describeMLModelsResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> DescribeMLModelsResponse
 -> Const (First Text) DescribeMLModelsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) DescribeMLModelsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.Hashable DescribeMLModels

instance Prelude.NFData DescribeMLModels

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

instance Core.ToJSON DescribeMLModels where
  toJSON :: DescribeMLModels -> Value
toJSON DescribeMLModels' {Maybe Natural
Maybe Text
Maybe MLModelFilterVariable
Maybe SortOrder
le :: Maybe Text
filterVariable :: Maybe MLModelFilterVariable
lt :: Maybe Text
limit :: Maybe Natural
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
ne :: Maybe Text
gt :: Maybe Text
prefix :: Maybe Text
ge :: Maybe Text
eq :: Maybe Text
$sel:le:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:filterVariable:DescribeMLModels' :: DescribeMLModels -> Maybe MLModelFilterVariable
$sel:lt:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:limit:DescribeMLModels' :: DescribeMLModels -> Maybe Natural
$sel:sortOrder:DescribeMLModels' :: DescribeMLModels -> Maybe SortOrder
$sel:nextToken:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:ne:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:gt:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:prefix:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:ge:DescribeMLModels' :: DescribeMLModels -> Maybe Text
$sel:eq:DescribeMLModels' :: DescribeMLModels -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EQ" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
eq,
            (Text
"GE" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ge,
            (Text
"Prefix" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
prefix,
            (Text
"GT" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
gt,
            (Text
"NE" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ne,
            (Text
"NextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Text
"SortOrder" Text -> SortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SortOrder -> Pair) -> Maybe SortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SortOrder
sortOrder,
            (Text
"Limit" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
limit,
            (Text
"LT" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
lt,
            (Text
"FilterVariable" Text -> MLModelFilterVariable -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (MLModelFilterVariable -> Pair)
-> Maybe MLModelFilterVariable -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe MLModelFilterVariable
filterVariable,
            (Text
"LE" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
le
          ]
      )

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

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

-- | Represents the output of a @DescribeMLModels@ operation. The content is
-- essentially a list of @MLModel@.
--
-- /See:/ 'newDescribeMLModelsResponse' smart constructor.
data DescribeMLModelsResponse = DescribeMLModelsResponse'
  { -- | A list of @MLModel@ that meet the search criteria.
    DescribeMLModelsResponse -> Maybe [MLModel]
results :: Prelude.Maybe [MLModel],
    -- | The ID of the next page in the paginated results that indicates at least
    -- one more page follows.
    DescribeMLModelsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeMLModelsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
(DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool)
-> (DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool)
-> Eq DescribeMLModelsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
$c/= :: DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
== :: DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
$c== :: DescribeMLModelsResponse -> DescribeMLModelsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeMLModelsResponse]
ReadPrec DescribeMLModelsResponse
Int -> ReadS DescribeMLModelsResponse
ReadS [DescribeMLModelsResponse]
(Int -> ReadS DescribeMLModelsResponse)
-> ReadS [DescribeMLModelsResponse]
-> ReadPrec DescribeMLModelsResponse
-> ReadPrec [DescribeMLModelsResponse]
-> Read DescribeMLModelsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeMLModelsResponse]
$creadListPrec :: ReadPrec [DescribeMLModelsResponse]
readPrec :: ReadPrec DescribeMLModelsResponse
$creadPrec :: ReadPrec DescribeMLModelsResponse
readList :: ReadS [DescribeMLModelsResponse]
$creadList :: ReadS [DescribeMLModelsResponse]
readsPrec :: Int -> ReadS DescribeMLModelsResponse
$creadsPrec :: Int -> ReadS DescribeMLModelsResponse
Prelude.Read, Int -> DescribeMLModelsResponse -> ShowS
[DescribeMLModelsResponse] -> ShowS
DescribeMLModelsResponse -> String
(Int -> DescribeMLModelsResponse -> ShowS)
-> (DescribeMLModelsResponse -> String)
-> ([DescribeMLModelsResponse] -> ShowS)
-> Show DescribeMLModelsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeMLModelsResponse] -> ShowS
$cshowList :: [DescribeMLModelsResponse] -> ShowS
show :: DescribeMLModelsResponse -> String
$cshow :: DescribeMLModelsResponse -> String
showsPrec :: Int -> DescribeMLModelsResponse -> ShowS
$cshowsPrec :: Int -> DescribeMLModelsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeMLModelsResponse -> Rep DescribeMLModelsResponse x)
-> (forall x.
    Rep DescribeMLModelsResponse x -> DescribeMLModelsResponse)
-> Generic DescribeMLModelsResponse
forall x.
Rep DescribeMLModelsResponse x -> DescribeMLModelsResponse
forall x.
DescribeMLModelsResponse -> Rep DescribeMLModelsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeMLModelsResponse x -> DescribeMLModelsResponse
$cfrom :: forall x.
DescribeMLModelsResponse -> Rep DescribeMLModelsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeMLModelsResponse' 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:
--
-- 'results', 'describeMLModelsResponse_results' - A list of @MLModel@ that meet the search criteria.
--
-- 'nextToken', 'describeMLModelsResponse_nextToken' - The ID of the next page in the paginated results that indicates at least
-- one more page follows.
--
-- 'httpStatus', 'describeMLModelsResponse_httpStatus' - The response's http status code.
newDescribeMLModelsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeMLModelsResponse
newDescribeMLModelsResponse :: Int -> DescribeMLModelsResponse
newDescribeMLModelsResponse Int
pHttpStatus_ =
  DescribeMLModelsResponse' :: Maybe [MLModel] -> Maybe Text -> Int -> DescribeMLModelsResponse
DescribeMLModelsResponse'
    { $sel:results:DescribeMLModelsResponse' :: Maybe [MLModel]
results =
        Maybe [MLModel]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeMLModelsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeMLModelsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of @MLModel@ that meet the search criteria.
describeMLModelsResponse_results :: Lens.Lens' DescribeMLModelsResponse (Prelude.Maybe [MLModel])
describeMLModelsResponse_results :: (Maybe [MLModel] -> f (Maybe [MLModel]))
-> DescribeMLModelsResponse -> f DescribeMLModelsResponse
describeMLModelsResponse_results = (DescribeMLModelsResponse -> Maybe [MLModel])
-> (DescribeMLModelsResponse
    -> Maybe [MLModel] -> DescribeMLModelsResponse)
-> Lens' DescribeMLModelsResponse (Maybe [MLModel])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModelsResponse' {Maybe [MLModel]
results :: Maybe [MLModel]
$sel:results:DescribeMLModelsResponse' :: DescribeMLModelsResponse -> Maybe [MLModel]
results} -> Maybe [MLModel]
results) (\s :: DescribeMLModelsResponse
s@DescribeMLModelsResponse' {} Maybe [MLModel]
a -> DescribeMLModelsResponse
s {$sel:results:DescribeMLModelsResponse' :: Maybe [MLModel]
results = Maybe [MLModel]
a} :: DescribeMLModelsResponse) ((Maybe [MLModel] -> f (Maybe [MLModel]))
 -> DescribeMLModelsResponse -> f DescribeMLModelsResponse)
-> ((Maybe [MLModel] -> f (Maybe [MLModel]))
    -> Maybe [MLModel] -> f (Maybe [MLModel]))
-> (Maybe [MLModel] -> f (Maybe [MLModel]))
-> DescribeMLModelsResponse
-> f DescribeMLModelsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [MLModel] [MLModel] [MLModel] [MLModel]
-> Iso
     (Maybe [MLModel])
     (Maybe [MLModel])
     (Maybe [MLModel])
     (Maybe [MLModel])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [MLModel] [MLModel] [MLModel] [MLModel]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the next page in the paginated results that indicates at least
-- one more page follows.
describeMLModelsResponse_nextToken :: Lens.Lens' DescribeMLModelsResponse (Prelude.Maybe Prelude.Text)
describeMLModelsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeMLModelsResponse -> f DescribeMLModelsResponse
describeMLModelsResponse_nextToken = (DescribeMLModelsResponse -> Maybe Text)
-> (DescribeMLModelsResponse
    -> Maybe Text -> DescribeMLModelsResponse)
-> Lens' DescribeMLModelsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeMLModelsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeMLModelsResponse' :: DescribeMLModelsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeMLModelsResponse
s@DescribeMLModelsResponse' {} Maybe Text
a -> DescribeMLModelsResponse
s {$sel:nextToken:DescribeMLModelsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeMLModelsResponse)

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

instance Prelude.NFData DescribeMLModelsResponse