{-# 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.SageMaker.ListModelPackages
-- 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)
--
-- Lists the model packages that have been created.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListModelPackages
  ( -- * Creating a Request
    ListModelPackages (..),
    newListModelPackages,

    -- * Request Lenses
    listModelPackages_nameContains,
    listModelPackages_modelApprovalStatus,
    listModelPackages_modelPackageType,
    listModelPackages_creationTimeAfter,
    listModelPackages_nextToken,
    listModelPackages_sortOrder,
    listModelPackages_modelPackageGroupName,
    listModelPackages_creationTimeBefore,
    listModelPackages_maxResults,
    listModelPackages_sortBy,

    -- * Destructuring the Response
    ListModelPackagesResponse (..),
    newListModelPackagesResponse,

    -- * Response Lenses
    listModelPackagesResponse_nextToken,
    listModelPackagesResponse_httpStatus,
    listModelPackagesResponse_modelPackageSummaryList,
  )
where

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

-- | /See:/ 'newListModelPackages' smart constructor.
data ListModelPackages = ListModelPackages'
  { -- | A string in the model package name. This filter returns only model
    -- packages whose name contains the specified string.
    ListModelPackages -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
    -- | A filter that returns only the model packages with the specified
    -- approval status.
    ListModelPackages -> Maybe ModelApprovalStatus
modelApprovalStatus :: Prelude.Maybe ModelApprovalStatus,
    -- | A filter that returns onlyl the model packages of the specified type.
    -- This can be one of the following values.
    --
    -- -   @VERSIONED@ - List only versioned models.
    --
    -- -   @UNVERSIONED@ - List only unversioined models.
    --
    -- -   @BOTH@ - List both versioned and unversioned models.
    ListModelPackages -> Maybe ModelPackageType
modelPackageType :: Prelude.Maybe ModelPackageType,
    -- | A filter that returns only model packages created after the specified
    -- time (timestamp).
    ListModelPackages -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Core.POSIX,
    -- | If the response to a previous @ListModelPackages@ request was truncated,
    -- the response includes a @NextToken@. To retrieve the next set of model
    -- packages, use the token in the next request.
    ListModelPackages -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The sort order for the results. The default is @Ascending@.
    ListModelPackages -> Maybe SortOrder
sortOrder :: Prelude.Maybe SortOrder,
    -- | A filter that returns only model versions that belong to the specified
    -- model group.
    ListModelPackages -> Maybe Text
modelPackageGroupName :: Prelude.Maybe Prelude.Text,
    -- | A filter that returns only model packages created before the specified
    -- time (timestamp).
    ListModelPackages -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Core.POSIX,
    -- | The maximum number of model packages to return in the response.
    ListModelPackages -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The parameter by which to sort the results. The default is
    -- @CreationTime@.
    ListModelPackages -> Maybe ModelPackageSortBy
sortBy :: Prelude.Maybe ModelPackageSortBy
  }
  deriving (ListModelPackages -> ListModelPackages -> Bool
(ListModelPackages -> ListModelPackages -> Bool)
-> (ListModelPackages -> ListModelPackages -> Bool)
-> Eq ListModelPackages
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListModelPackages -> ListModelPackages -> Bool
$c/= :: ListModelPackages -> ListModelPackages -> Bool
== :: ListModelPackages -> ListModelPackages -> Bool
$c== :: ListModelPackages -> ListModelPackages -> Bool
Prelude.Eq, ReadPrec [ListModelPackages]
ReadPrec ListModelPackages
Int -> ReadS ListModelPackages
ReadS [ListModelPackages]
(Int -> ReadS ListModelPackages)
-> ReadS [ListModelPackages]
-> ReadPrec ListModelPackages
-> ReadPrec [ListModelPackages]
-> Read ListModelPackages
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListModelPackages]
$creadListPrec :: ReadPrec [ListModelPackages]
readPrec :: ReadPrec ListModelPackages
$creadPrec :: ReadPrec ListModelPackages
readList :: ReadS [ListModelPackages]
$creadList :: ReadS [ListModelPackages]
readsPrec :: Int -> ReadS ListModelPackages
$creadsPrec :: Int -> ReadS ListModelPackages
Prelude.Read, Int -> ListModelPackages -> ShowS
[ListModelPackages] -> ShowS
ListModelPackages -> String
(Int -> ListModelPackages -> ShowS)
-> (ListModelPackages -> String)
-> ([ListModelPackages] -> ShowS)
-> Show ListModelPackages
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListModelPackages] -> ShowS
$cshowList :: [ListModelPackages] -> ShowS
show :: ListModelPackages -> String
$cshow :: ListModelPackages -> String
showsPrec :: Int -> ListModelPackages -> ShowS
$cshowsPrec :: Int -> ListModelPackages -> ShowS
Prelude.Show, (forall x. ListModelPackages -> Rep ListModelPackages x)
-> (forall x. Rep ListModelPackages x -> ListModelPackages)
-> Generic ListModelPackages
forall x. Rep ListModelPackages x -> ListModelPackages
forall x. ListModelPackages -> Rep ListModelPackages x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListModelPackages x -> ListModelPackages
$cfrom :: forall x. ListModelPackages -> Rep ListModelPackages x
Prelude.Generic)

-- |
-- Create a value of 'ListModelPackages' 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:
--
-- 'nameContains', 'listModelPackages_nameContains' - A string in the model package name. This filter returns only model
-- packages whose name contains the specified string.
--
-- 'modelApprovalStatus', 'listModelPackages_modelApprovalStatus' - A filter that returns only the model packages with the specified
-- approval status.
--
-- 'modelPackageType', 'listModelPackages_modelPackageType' - A filter that returns onlyl the model packages of the specified type.
-- This can be one of the following values.
--
-- -   @VERSIONED@ - List only versioned models.
--
-- -   @UNVERSIONED@ - List only unversioined models.
--
-- -   @BOTH@ - List both versioned and unversioned models.
--
-- 'creationTimeAfter', 'listModelPackages_creationTimeAfter' - A filter that returns only model packages created after the specified
-- time (timestamp).
--
-- 'nextToken', 'listModelPackages_nextToken' - If the response to a previous @ListModelPackages@ request was truncated,
-- the response includes a @NextToken@. To retrieve the next set of model
-- packages, use the token in the next request.
--
-- 'sortOrder', 'listModelPackages_sortOrder' - The sort order for the results. The default is @Ascending@.
--
-- 'modelPackageGroupName', 'listModelPackages_modelPackageGroupName' - A filter that returns only model versions that belong to the specified
-- model group.
--
-- 'creationTimeBefore', 'listModelPackages_creationTimeBefore' - A filter that returns only model packages created before the specified
-- time (timestamp).
--
-- 'maxResults', 'listModelPackages_maxResults' - The maximum number of model packages to return in the response.
--
-- 'sortBy', 'listModelPackages_sortBy' - The parameter by which to sort the results. The default is
-- @CreationTime@.
newListModelPackages ::
  ListModelPackages
newListModelPackages :: ListModelPackages
newListModelPackages =
  ListModelPackages' :: Maybe Text
-> Maybe ModelApprovalStatus
-> Maybe ModelPackageType
-> Maybe POSIX
-> Maybe Text
-> Maybe SortOrder
-> Maybe Text
-> Maybe POSIX
-> Maybe Natural
-> Maybe ModelPackageSortBy
-> ListModelPackages
ListModelPackages'
    { $sel:nameContains:ListModelPackages' :: Maybe Text
nameContains = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:modelApprovalStatus:ListModelPackages' :: Maybe ModelApprovalStatus
modelApprovalStatus = Maybe ModelApprovalStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:modelPackageType:ListModelPackages' :: Maybe ModelPackageType
modelPackageType = Maybe ModelPackageType
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeAfter:ListModelPackages' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListModelPackages' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListModelPackages' :: Maybe SortOrder
sortOrder = Maybe SortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:modelPackageGroupName:ListModelPackages' :: Maybe Text
modelPackageGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListModelPackages' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListModelPackages' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListModelPackages' :: Maybe ModelPackageSortBy
sortBy = Maybe ModelPackageSortBy
forall a. Maybe a
Prelude.Nothing
    }

-- | A string in the model package name. This filter returns only model
-- packages whose name contains the specified string.
listModelPackages_nameContains :: Lens.Lens' ListModelPackages (Prelude.Maybe Prelude.Text)
listModelPackages_nameContains :: (Maybe Text -> f (Maybe Text))
-> ListModelPackages -> f ListModelPackages
listModelPackages_nameContains = (ListModelPackages -> Maybe Text)
-> (ListModelPackages -> Maybe Text -> ListModelPackages)
-> Lens
     ListModelPackages ListModelPackages (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListModelPackages' :: ListModelPackages -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe Text
a -> ListModelPackages
s {$sel:nameContains:ListModelPackages' :: Maybe Text
nameContains = Maybe Text
a} :: ListModelPackages)

-- | A filter that returns only the model packages with the specified
-- approval status.
listModelPackages_modelApprovalStatus :: Lens.Lens' ListModelPackages (Prelude.Maybe ModelApprovalStatus)
listModelPackages_modelApprovalStatus :: (Maybe ModelApprovalStatus -> f (Maybe ModelApprovalStatus))
-> ListModelPackages -> f ListModelPackages
listModelPackages_modelApprovalStatus = (ListModelPackages -> Maybe ModelApprovalStatus)
-> (ListModelPackages
    -> Maybe ModelApprovalStatus -> ListModelPackages)
-> Lens
     ListModelPackages
     ListModelPackages
     (Maybe ModelApprovalStatus)
     (Maybe ModelApprovalStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe ModelApprovalStatus
modelApprovalStatus :: Maybe ModelApprovalStatus
$sel:modelApprovalStatus:ListModelPackages' :: ListModelPackages -> Maybe ModelApprovalStatus
modelApprovalStatus} -> Maybe ModelApprovalStatus
modelApprovalStatus) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe ModelApprovalStatus
a -> ListModelPackages
s {$sel:modelApprovalStatus:ListModelPackages' :: Maybe ModelApprovalStatus
modelApprovalStatus = Maybe ModelApprovalStatus
a} :: ListModelPackages)

-- | A filter that returns onlyl the model packages of the specified type.
-- This can be one of the following values.
--
-- -   @VERSIONED@ - List only versioned models.
--
-- -   @UNVERSIONED@ - List only unversioined models.
--
-- -   @BOTH@ - List both versioned and unversioned models.
listModelPackages_modelPackageType :: Lens.Lens' ListModelPackages (Prelude.Maybe ModelPackageType)
listModelPackages_modelPackageType :: (Maybe ModelPackageType -> f (Maybe ModelPackageType))
-> ListModelPackages -> f ListModelPackages
listModelPackages_modelPackageType = (ListModelPackages -> Maybe ModelPackageType)
-> (ListModelPackages
    -> Maybe ModelPackageType -> ListModelPackages)
-> Lens
     ListModelPackages
     ListModelPackages
     (Maybe ModelPackageType)
     (Maybe ModelPackageType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe ModelPackageType
modelPackageType :: Maybe ModelPackageType
$sel:modelPackageType:ListModelPackages' :: ListModelPackages -> Maybe ModelPackageType
modelPackageType} -> Maybe ModelPackageType
modelPackageType) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe ModelPackageType
a -> ListModelPackages
s {$sel:modelPackageType:ListModelPackages' :: Maybe ModelPackageType
modelPackageType = Maybe ModelPackageType
a} :: ListModelPackages)

-- | A filter that returns only model packages created after the specified
-- time (timestamp).
listModelPackages_creationTimeAfter :: Lens.Lens' ListModelPackages (Prelude.Maybe Prelude.UTCTime)
listModelPackages_creationTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListModelPackages -> f ListModelPackages
listModelPackages_creationTimeAfter = (ListModelPackages -> Maybe POSIX)
-> (ListModelPackages -> Maybe POSIX -> ListModelPackages)
-> Lens
     ListModelPackages ListModelPackages (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListModelPackages' :: ListModelPackages -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe POSIX
a -> ListModelPackages
s {$sel:creationTimeAfter:ListModelPackages' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListModelPackages) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListModelPackages -> f ListModelPackages)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListModelPackages
-> f ListModelPackages
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | If the response to a previous @ListModelPackages@ request was truncated,
-- the response includes a @NextToken@. To retrieve the next set of model
-- packages, use the token in the next request.
listModelPackages_nextToken :: Lens.Lens' ListModelPackages (Prelude.Maybe Prelude.Text)
listModelPackages_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListModelPackages -> f ListModelPackages
listModelPackages_nextToken = (ListModelPackages -> Maybe Text)
-> (ListModelPackages -> Maybe Text -> ListModelPackages)
-> Lens
     ListModelPackages ListModelPackages (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListModelPackages' :: ListModelPackages -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe Text
a -> ListModelPackages
s {$sel:nextToken:ListModelPackages' :: Maybe Text
nextToken = Maybe Text
a} :: ListModelPackages)

-- | The sort order for the results. The default is @Ascending@.
listModelPackages_sortOrder :: Lens.Lens' ListModelPackages (Prelude.Maybe SortOrder)
listModelPackages_sortOrder :: (Maybe SortOrder -> f (Maybe SortOrder))
-> ListModelPackages -> f ListModelPackages
listModelPackages_sortOrder = (ListModelPackages -> Maybe SortOrder)
-> (ListModelPackages -> Maybe SortOrder -> ListModelPackages)
-> Lens
     ListModelPackages
     ListModelPackages
     (Maybe SortOrder)
     (Maybe SortOrder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe SortOrder
sortOrder :: Maybe SortOrder
$sel:sortOrder:ListModelPackages' :: ListModelPackages -> Maybe SortOrder
sortOrder} -> Maybe SortOrder
sortOrder) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe SortOrder
a -> ListModelPackages
s {$sel:sortOrder:ListModelPackages' :: Maybe SortOrder
sortOrder = Maybe SortOrder
a} :: ListModelPackages)

-- | A filter that returns only model versions that belong to the specified
-- model group.
listModelPackages_modelPackageGroupName :: Lens.Lens' ListModelPackages (Prelude.Maybe Prelude.Text)
listModelPackages_modelPackageGroupName :: (Maybe Text -> f (Maybe Text))
-> ListModelPackages -> f ListModelPackages
listModelPackages_modelPackageGroupName = (ListModelPackages -> Maybe Text)
-> (ListModelPackages -> Maybe Text -> ListModelPackages)
-> Lens
     ListModelPackages ListModelPackages (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe Text
modelPackageGroupName :: Maybe Text
$sel:modelPackageGroupName:ListModelPackages' :: ListModelPackages -> Maybe Text
modelPackageGroupName} -> Maybe Text
modelPackageGroupName) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe Text
a -> ListModelPackages
s {$sel:modelPackageGroupName:ListModelPackages' :: Maybe Text
modelPackageGroupName = Maybe Text
a} :: ListModelPackages)

-- | A filter that returns only model packages created before the specified
-- time (timestamp).
listModelPackages_creationTimeBefore :: Lens.Lens' ListModelPackages (Prelude.Maybe Prelude.UTCTime)
listModelPackages_creationTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListModelPackages -> f ListModelPackages
listModelPackages_creationTimeBefore = (ListModelPackages -> Maybe POSIX)
-> (ListModelPackages -> Maybe POSIX -> ListModelPackages)
-> Lens
     ListModelPackages ListModelPackages (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListModelPackages' :: ListModelPackages -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe POSIX
a -> ListModelPackages
s {$sel:creationTimeBefore:ListModelPackages' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListModelPackages) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListModelPackages -> f ListModelPackages)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListModelPackages
-> f ListModelPackages
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The maximum number of model packages to return in the response.
listModelPackages_maxResults :: Lens.Lens' ListModelPackages (Prelude.Maybe Prelude.Natural)
listModelPackages_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListModelPackages -> f ListModelPackages
listModelPackages_maxResults = (ListModelPackages -> Maybe Natural)
-> (ListModelPackages -> Maybe Natural -> ListModelPackages)
-> Lens
     ListModelPackages ListModelPackages (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListModelPackages' :: ListModelPackages -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe Natural
a -> ListModelPackages
s {$sel:maxResults:ListModelPackages' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListModelPackages)

-- | The parameter by which to sort the results. The default is
-- @CreationTime@.
listModelPackages_sortBy :: Lens.Lens' ListModelPackages (Prelude.Maybe ModelPackageSortBy)
listModelPackages_sortBy :: (Maybe ModelPackageSortBy -> f (Maybe ModelPackageSortBy))
-> ListModelPackages -> f ListModelPackages
listModelPackages_sortBy = (ListModelPackages -> Maybe ModelPackageSortBy)
-> (ListModelPackages
    -> Maybe ModelPackageSortBy -> ListModelPackages)
-> Lens
     ListModelPackages
     ListModelPackages
     (Maybe ModelPackageSortBy)
     (Maybe ModelPackageSortBy)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackages' {Maybe ModelPackageSortBy
sortBy :: Maybe ModelPackageSortBy
$sel:sortBy:ListModelPackages' :: ListModelPackages -> Maybe ModelPackageSortBy
sortBy} -> Maybe ModelPackageSortBy
sortBy) (\s :: ListModelPackages
s@ListModelPackages' {} Maybe ModelPackageSortBy
a -> ListModelPackages
s {$sel:sortBy:ListModelPackages' :: Maybe ModelPackageSortBy
sortBy = Maybe ModelPackageSortBy
a} :: ListModelPackages)

instance Core.AWSPager ListModelPackages where
  page :: ListModelPackages
-> AWSResponse ListModelPackages -> Maybe ListModelPackages
page ListModelPackages
rq AWSResponse ListModelPackages
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListModelPackages
ListModelPackagesResponse
rs
            ListModelPackagesResponse
-> Getting (First Text) ListModelPackagesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListModelPackagesResponse
-> Const (First Text) ListModelPackagesResponse
Lens' ListModelPackagesResponse (Maybe Text)
listModelPackagesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListModelPackagesResponse
 -> Const (First Text) ListModelPackagesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListModelPackagesResponse 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 ListModelPackages
forall a. Maybe a
Prelude.Nothing
    | [ModelPackageSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListModelPackages
ListModelPackagesResponse
rs
            ListModelPackagesResponse
-> Getting
     [ModelPackageSummary]
     ListModelPackagesResponse
     [ModelPackageSummary]
-> [ModelPackageSummary]
forall s a. s -> Getting a s a -> a
Lens.^. Getting
  [ModelPackageSummary]
  ListModelPackagesResponse
  [ModelPackageSummary]
Lens' ListModelPackagesResponse [ModelPackageSummary]
listModelPackagesResponse_modelPackageSummaryList
        ) =
      Maybe ListModelPackages
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListModelPackages -> Maybe ListModelPackages
forall a. a -> Maybe a
Prelude.Just (ListModelPackages -> Maybe ListModelPackages)
-> ListModelPackages -> Maybe ListModelPackages
forall a b. (a -> b) -> a -> b
Prelude.$
        ListModelPackages
rq
          ListModelPackages
-> (ListModelPackages -> ListModelPackages) -> ListModelPackages
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListModelPackages -> Identity ListModelPackages
Lens ListModelPackages ListModelPackages (Maybe Text) (Maybe Text)
listModelPackages_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListModelPackages -> Identity ListModelPackages)
-> Maybe Text -> ListModelPackages -> ListModelPackages
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListModelPackages
ListModelPackagesResponse
rs
          ListModelPackagesResponse
-> Getting (First Text) ListModelPackagesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListModelPackagesResponse
-> Const (First Text) ListModelPackagesResponse
Lens' ListModelPackagesResponse (Maybe Text)
listModelPackagesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListModelPackagesResponse
 -> Const (First Text) ListModelPackagesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListModelPackagesResponse 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 ListModelPackages where
  type
    AWSResponse ListModelPackages =
      ListModelPackagesResponse
  request :: ListModelPackages -> Request ListModelPackages
request = Service -> ListModelPackages -> Request ListModelPackages
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListModelPackages
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListModelPackages)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListModelPackages))
-> Logger
-> Service
-> Proxy ListModelPackages
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListModelPackages)))
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 Text
-> Int -> [ModelPackageSummary] -> ListModelPackagesResponse
ListModelPackagesResponse'
            (Maybe Text
 -> Int -> [ModelPackageSummary] -> ListModelPackagesResponse)
-> Either String (Maybe Text)
-> Either
     String (Int -> [ModelPackageSummary] -> ListModelPackagesResponse)
forall (f :: * -> *) a b. Functor 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 -> [ModelPackageSummary] -> ListModelPackagesResponse)
-> Either String Int
-> Either
     String ([ModelPackageSummary] -> ListModelPackagesResponse)
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))
            Either String ([ModelPackageSummary] -> ListModelPackagesResponse)
-> Either String [ModelPackageSummary]
-> Either String ListModelPackagesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe [ModelPackageSummary])
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ModelPackageSummaryList"
                            Either String (Maybe [ModelPackageSummary])
-> [ModelPackageSummary] -> Either String [ModelPackageSummary]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [ModelPackageSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable ListModelPackages

instance Prelude.NFData ListModelPackages

instance Core.ToHeaders ListModelPackages where
  toHeaders :: ListModelPackages -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListModelPackages -> 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
"SageMaker.ListModelPackages" ::
                          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 ListModelPackages where
  toJSON :: ListModelPackages -> Value
toJSON ListModelPackages' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe ModelApprovalStatus
Maybe ModelPackageSortBy
Maybe ModelPackageType
Maybe SortOrder
sortBy :: Maybe ModelPackageSortBy
maxResults :: Maybe Natural
creationTimeBefore :: Maybe POSIX
modelPackageGroupName :: Maybe Text
sortOrder :: Maybe SortOrder
nextToken :: Maybe Text
creationTimeAfter :: Maybe POSIX
modelPackageType :: Maybe ModelPackageType
modelApprovalStatus :: Maybe ModelApprovalStatus
nameContains :: Maybe Text
$sel:sortBy:ListModelPackages' :: ListModelPackages -> Maybe ModelPackageSortBy
$sel:maxResults:ListModelPackages' :: ListModelPackages -> Maybe Natural
$sel:creationTimeBefore:ListModelPackages' :: ListModelPackages -> Maybe POSIX
$sel:modelPackageGroupName:ListModelPackages' :: ListModelPackages -> Maybe Text
$sel:sortOrder:ListModelPackages' :: ListModelPackages -> Maybe SortOrder
$sel:nextToken:ListModelPackages' :: ListModelPackages -> Maybe Text
$sel:creationTimeAfter:ListModelPackages' :: ListModelPackages -> Maybe POSIX
$sel:modelPackageType:ListModelPackages' :: ListModelPackages -> Maybe ModelPackageType
$sel:modelApprovalStatus:ListModelPackages' :: ListModelPackages -> Maybe ModelApprovalStatus
$sel:nameContains:ListModelPackages' :: ListModelPackages -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"NameContains" 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
nameContains,
            (Text
"ModelApprovalStatus" Text -> ModelApprovalStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ModelApprovalStatus -> Pair)
-> Maybe ModelApprovalStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ModelApprovalStatus
modelApprovalStatus,
            (Text
"ModelPackageType" Text -> ModelPackageType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ModelPackageType -> Pair) -> Maybe ModelPackageType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ModelPackageType
modelPackageType,
            (Text
"CreationTimeAfter" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeAfter,
            (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
"ModelPackageGroupName" 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
modelPackageGroupName,
            (Text
"CreationTimeBefore" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
creationTimeBefore,
            (Text
"MaxResults" 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
maxResults,
            (Text
"SortBy" Text -> ModelPackageSortBy -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ModelPackageSortBy -> Pair)
-> Maybe ModelPackageSortBy -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ModelPackageSortBy
sortBy
          ]
      )

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

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

-- | /See:/ 'newListModelPackagesResponse' smart constructor.
data ListModelPackagesResponse = ListModelPackagesResponse'
  { -- | If the response is truncated, Amazon SageMaker returns this token. To
    -- retrieve the next set of model packages, use it in the subsequent
    -- request.
    ListModelPackagesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListModelPackagesResponse -> Int
httpStatus :: Prelude.Int,
    -- | An array of @ModelPackageSummary@ objects, each of which lists a model
    -- package.
    ListModelPackagesResponse -> [ModelPackageSummary]
modelPackageSummaryList :: [ModelPackageSummary]
  }
  deriving (ListModelPackagesResponse -> ListModelPackagesResponse -> Bool
(ListModelPackagesResponse -> ListModelPackagesResponse -> Bool)
-> (ListModelPackagesResponse -> ListModelPackagesResponse -> Bool)
-> Eq ListModelPackagesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListModelPackagesResponse -> ListModelPackagesResponse -> Bool
$c/= :: ListModelPackagesResponse -> ListModelPackagesResponse -> Bool
== :: ListModelPackagesResponse -> ListModelPackagesResponse -> Bool
$c== :: ListModelPackagesResponse -> ListModelPackagesResponse -> Bool
Prelude.Eq, ReadPrec [ListModelPackagesResponse]
ReadPrec ListModelPackagesResponse
Int -> ReadS ListModelPackagesResponse
ReadS [ListModelPackagesResponse]
(Int -> ReadS ListModelPackagesResponse)
-> ReadS [ListModelPackagesResponse]
-> ReadPrec ListModelPackagesResponse
-> ReadPrec [ListModelPackagesResponse]
-> Read ListModelPackagesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListModelPackagesResponse]
$creadListPrec :: ReadPrec [ListModelPackagesResponse]
readPrec :: ReadPrec ListModelPackagesResponse
$creadPrec :: ReadPrec ListModelPackagesResponse
readList :: ReadS [ListModelPackagesResponse]
$creadList :: ReadS [ListModelPackagesResponse]
readsPrec :: Int -> ReadS ListModelPackagesResponse
$creadsPrec :: Int -> ReadS ListModelPackagesResponse
Prelude.Read, Int -> ListModelPackagesResponse -> ShowS
[ListModelPackagesResponse] -> ShowS
ListModelPackagesResponse -> String
(Int -> ListModelPackagesResponse -> ShowS)
-> (ListModelPackagesResponse -> String)
-> ([ListModelPackagesResponse] -> ShowS)
-> Show ListModelPackagesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListModelPackagesResponse] -> ShowS
$cshowList :: [ListModelPackagesResponse] -> ShowS
show :: ListModelPackagesResponse -> String
$cshow :: ListModelPackagesResponse -> String
showsPrec :: Int -> ListModelPackagesResponse -> ShowS
$cshowsPrec :: Int -> ListModelPackagesResponse -> ShowS
Prelude.Show, (forall x.
 ListModelPackagesResponse -> Rep ListModelPackagesResponse x)
-> (forall x.
    Rep ListModelPackagesResponse x -> ListModelPackagesResponse)
-> Generic ListModelPackagesResponse
forall x.
Rep ListModelPackagesResponse x -> ListModelPackagesResponse
forall x.
ListModelPackagesResponse -> Rep ListModelPackagesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListModelPackagesResponse x -> ListModelPackagesResponse
$cfrom :: forall x.
ListModelPackagesResponse -> Rep ListModelPackagesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListModelPackagesResponse' 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', 'listModelPackagesResponse_nextToken' - If the response is truncated, Amazon SageMaker returns this token. To
-- retrieve the next set of model packages, use it in the subsequent
-- request.
--
-- 'httpStatus', 'listModelPackagesResponse_httpStatus' - The response's http status code.
--
-- 'modelPackageSummaryList', 'listModelPackagesResponse_modelPackageSummaryList' - An array of @ModelPackageSummary@ objects, each of which lists a model
-- package.
newListModelPackagesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListModelPackagesResponse
newListModelPackagesResponse :: Int -> ListModelPackagesResponse
newListModelPackagesResponse Int
pHttpStatus_ =
  ListModelPackagesResponse' :: Maybe Text
-> Int -> [ModelPackageSummary] -> ListModelPackagesResponse
ListModelPackagesResponse'
    { $sel:nextToken:ListModelPackagesResponse' :: Maybe Text
nextToken =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListModelPackagesResponse' :: Int
httpStatus = Int
pHttpStatus_,
      $sel:modelPackageSummaryList:ListModelPackagesResponse' :: [ModelPackageSummary]
modelPackageSummaryList = [ModelPackageSummary]
forall a. Monoid a => a
Prelude.mempty
    }

-- | If the response is truncated, Amazon SageMaker returns this token. To
-- retrieve the next set of model packages, use it in the subsequent
-- request.
listModelPackagesResponse_nextToken :: Lens.Lens' ListModelPackagesResponse (Prelude.Maybe Prelude.Text)
listModelPackagesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListModelPackagesResponse -> f ListModelPackagesResponse
listModelPackagesResponse_nextToken = (ListModelPackagesResponse -> Maybe Text)
-> (ListModelPackagesResponse
    -> Maybe Text -> ListModelPackagesResponse)
-> Lens' ListModelPackagesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackagesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListModelPackagesResponse' :: ListModelPackagesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListModelPackagesResponse
s@ListModelPackagesResponse' {} Maybe Text
a -> ListModelPackagesResponse
s {$sel:nextToken:ListModelPackagesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListModelPackagesResponse)

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

-- | An array of @ModelPackageSummary@ objects, each of which lists a model
-- package.
listModelPackagesResponse_modelPackageSummaryList :: Lens.Lens' ListModelPackagesResponse [ModelPackageSummary]
listModelPackagesResponse_modelPackageSummaryList :: ([ModelPackageSummary] -> f [ModelPackageSummary])
-> ListModelPackagesResponse -> f ListModelPackagesResponse
listModelPackagesResponse_modelPackageSummaryList = (ListModelPackagesResponse -> [ModelPackageSummary])
-> (ListModelPackagesResponse
    -> [ModelPackageSummary] -> ListModelPackagesResponse)
-> Lens' ListModelPackagesResponse [ModelPackageSummary]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListModelPackagesResponse' {[ModelPackageSummary]
modelPackageSummaryList :: [ModelPackageSummary]
$sel:modelPackageSummaryList:ListModelPackagesResponse' :: ListModelPackagesResponse -> [ModelPackageSummary]
modelPackageSummaryList} -> [ModelPackageSummary]
modelPackageSummaryList) (\s :: ListModelPackagesResponse
s@ListModelPackagesResponse' {} [ModelPackageSummary]
a -> ListModelPackagesResponse
s {$sel:modelPackageSummaryList:ListModelPackagesResponse' :: [ModelPackageSummary]
modelPackageSummaryList = [ModelPackageSummary]
a} :: ListModelPackagesResponse) (([ModelPackageSummary] -> f [ModelPackageSummary])
 -> ListModelPackagesResponse -> f ListModelPackagesResponse)
-> (([ModelPackageSummary] -> f [ModelPackageSummary])
    -> [ModelPackageSummary] -> f [ModelPackageSummary])
-> ([ModelPackageSummary] -> f [ModelPackageSummary])
-> ListModelPackagesResponse
-> f ListModelPackagesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ModelPackageSummary] -> f [ModelPackageSummary])
-> [ModelPackageSummary] -> f [ModelPackageSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Prelude.NFData ListModelPackagesResponse