{-# 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.ListNotebookInstances
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of the SageMaker notebook instances in the requester\'s
-- account in an Amazon Web Services Region.
--
-- This operation returns paginated results.
module Amazonka.SageMaker.ListNotebookInstances
  ( -- * Creating a Request
    ListNotebookInstances (..),
    newListNotebookInstances,

    -- * Request Lenses
    listNotebookInstances_additionalCodeRepositoryEquals,
    listNotebookInstances_creationTimeAfter,
    listNotebookInstances_creationTimeBefore,
    listNotebookInstances_defaultCodeRepositoryContains,
    listNotebookInstances_lastModifiedTimeAfter,
    listNotebookInstances_lastModifiedTimeBefore,
    listNotebookInstances_maxResults,
    listNotebookInstances_nameContains,
    listNotebookInstances_nextToken,
    listNotebookInstances_notebookInstanceLifecycleConfigNameContains,
    listNotebookInstances_sortBy,
    listNotebookInstances_sortOrder,
    listNotebookInstances_statusEquals,

    -- * Destructuring the Response
    ListNotebookInstancesResponse (..),
    newListNotebookInstancesResponse,

    -- * Response Lenses
    listNotebookInstancesResponse_nextToken,
    listNotebookInstancesResponse_notebookInstances,
    listNotebookInstancesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newListNotebookInstances' smart constructor.
data ListNotebookInstances = ListNotebookInstances'
  { -- | A filter that returns only notebook instances with associated with the
    -- specified git repository.
    ListNotebookInstances -> Maybe Text
additionalCodeRepositoryEquals :: Prelude.Maybe Prelude.Text,
    -- | A filter that returns only notebook instances that were created after
    -- the specified time (timestamp).
    ListNotebookInstances -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Data.POSIX,
    -- | A filter that returns only notebook instances that were created before
    -- the specified time (timestamp).
    ListNotebookInstances -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Data.POSIX,
    -- | A string in the name or URL of a Git repository associated with this
    -- notebook instance. This filter returns only notebook instances
    -- associated with a git repository with a name that contains the specified
    -- string.
    ListNotebookInstances -> Maybe Text
defaultCodeRepositoryContains :: Prelude.Maybe Prelude.Text,
    -- | A filter that returns only notebook instances that were modified after
    -- the specified time (timestamp).
    ListNotebookInstances -> Maybe POSIX
lastModifiedTimeAfter :: Prelude.Maybe Data.POSIX,
    -- | A filter that returns only notebook instances that were modified before
    -- the specified time (timestamp).
    ListNotebookInstances -> Maybe POSIX
lastModifiedTimeBefore :: Prelude.Maybe Data.POSIX,
    -- | The maximum number of notebook instances to return.
    ListNotebookInstances -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | A string in the notebook instances\' name. This filter returns only
    -- notebook instances whose name contains the specified string.
    ListNotebookInstances -> Maybe Text
nameContains :: Prelude.Maybe Prelude.Text,
    -- | If the previous call to the @ListNotebookInstances@ is truncated, the
    -- response includes a @NextToken@. You can use this token in your
    -- subsequent @ListNotebookInstances@ request to fetch the next set of
    -- notebook instances.
    --
    -- You might specify a filter or a sort order in your request. When
    -- response is truncated, you must use the same values for the filer and
    -- sort order in the next request.
    ListNotebookInstances -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | A string in the name of a notebook instances lifecycle configuration
    -- associated with this notebook instance. This filter returns only
    -- notebook instances associated with a lifecycle configuration with a name
    -- that contains the specified string.
    ListNotebookInstances -> Maybe Text
notebookInstanceLifecycleConfigNameContains :: Prelude.Maybe Prelude.Text,
    -- | The field to sort results by. The default is @Name@.
    ListNotebookInstances -> Maybe NotebookInstanceSortKey
sortBy :: Prelude.Maybe NotebookInstanceSortKey,
    -- | The sort order for results.
    ListNotebookInstances -> Maybe NotebookInstanceSortOrder
sortOrder :: Prelude.Maybe NotebookInstanceSortOrder,
    -- | A filter that returns only notebook instances with the specified status.
    ListNotebookInstances -> Maybe NotebookInstanceStatus
statusEquals :: Prelude.Maybe NotebookInstanceStatus
  }
  deriving (ListNotebookInstances -> ListNotebookInstances -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNotebookInstances -> ListNotebookInstances -> Bool
$c/= :: ListNotebookInstances -> ListNotebookInstances -> Bool
== :: ListNotebookInstances -> ListNotebookInstances -> Bool
$c== :: ListNotebookInstances -> ListNotebookInstances -> Bool
Prelude.Eq, ReadPrec [ListNotebookInstances]
ReadPrec ListNotebookInstances
Int -> ReadS ListNotebookInstances
ReadS [ListNotebookInstances]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNotebookInstances]
$creadListPrec :: ReadPrec [ListNotebookInstances]
readPrec :: ReadPrec ListNotebookInstances
$creadPrec :: ReadPrec ListNotebookInstances
readList :: ReadS [ListNotebookInstances]
$creadList :: ReadS [ListNotebookInstances]
readsPrec :: Int -> ReadS ListNotebookInstances
$creadsPrec :: Int -> ReadS ListNotebookInstances
Prelude.Read, Int -> ListNotebookInstances -> ShowS
[ListNotebookInstances] -> ShowS
ListNotebookInstances -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNotebookInstances] -> ShowS
$cshowList :: [ListNotebookInstances] -> ShowS
show :: ListNotebookInstances -> String
$cshow :: ListNotebookInstances -> String
showsPrec :: Int -> ListNotebookInstances -> ShowS
$cshowsPrec :: Int -> ListNotebookInstances -> ShowS
Prelude.Show, forall x. Rep ListNotebookInstances x -> ListNotebookInstances
forall x. ListNotebookInstances -> Rep ListNotebookInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListNotebookInstances x -> ListNotebookInstances
$cfrom :: forall x. ListNotebookInstances -> Rep ListNotebookInstances x
Prelude.Generic)

-- |
-- Create a value of 'ListNotebookInstances' 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:
--
-- 'additionalCodeRepositoryEquals', 'listNotebookInstances_additionalCodeRepositoryEquals' - A filter that returns only notebook instances with associated with the
-- specified git repository.
--
-- 'creationTimeAfter', 'listNotebookInstances_creationTimeAfter' - A filter that returns only notebook instances that were created after
-- the specified time (timestamp).
--
-- 'creationTimeBefore', 'listNotebookInstances_creationTimeBefore' - A filter that returns only notebook instances that were created before
-- the specified time (timestamp).
--
-- 'defaultCodeRepositoryContains', 'listNotebookInstances_defaultCodeRepositoryContains' - A string in the name or URL of a Git repository associated with this
-- notebook instance. This filter returns only notebook instances
-- associated with a git repository with a name that contains the specified
-- string.
--
-- 'lastModifiedTimeAfter', 'listNotebookInstances_lastModifiedTimeAfter' - A filter that returns only notebook instances that were modified after
-- the specified time (timestamp).
--
-- 'lastModifiedTimeBefore', 'listNotebookInstances_lastModifiedTimeBefore' - A filter that returns only notebook instances that were modified before
-- the specified time (timestamp).
--
-- 'maxResults', 'listNotebookInstances_maxResults' - The maximum number of notebook instances to return.
--
-- 'nameContains', 'listNotebookInstances_nameContains' - A string in the notebook instances\' name. This filter returns only
-- notebook instances whose name contains the specified string.
--
-- 'nextToken', 'listNotebookInstances_nextToken' - If the previous call to the @ListNotebookInstances@ is truncated, the
-- response includes a @NextToken@. You can use this token in your
-- subsequent @ListNotebookInstances@ request to fetch the next set of
-- notebook instances.
--
-- You might specify a filter or a sort order in your request. When
-- response is truncated, you must use the same values for the filer and
-- sort order in the next request.
--
-- 'notebookInstanceLifecycleConfigNameContains', 'listNotebookInstances_notebookInstanceLifecycleConfigNameContains' - A string in the name of a notebook instances lifecycle configuration
-- associated with this notebook instance. This filter returns only
-- notebook instances associated with a lifecycle configuration with a name
-- that contains the specified string.
--
-- 'sortBy', 'listNotebookInstances_sortBy' - The field to sort results by. The default is @Name@.
--
-- 'sortOrder', 'listNotebookInstances_sortOrder' - The sort order for results.
--
-- 'statusEquals', 'listNotebookInstances_statusEquals' - A filter that returns only notebook instances with the specified status.
newListNotebookInstances ::
  ListNotebookInstances
newListNotebookInstances :: ListNotebookInstances
newListNotebookInstances =
  ListNotebookInstances'
    { $sel:additionalCodeRepositoryEquals:ListNotebookInstances' :: Maybe Text
additionalCodeRepositoryEquals =
        forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeAfter:ListNotebookInstances' :: Maybe POSIX
creationTimeAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListNotebookInstances' :: Maybe POSIX
creationTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:defaultCodeRepositoryContains:ListNotebookInstances' :: Maybe Text
defaultCodeRepositoryContains = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListNotebookInstances' :: Maybe POSIX
lastModifiedTimeAfter = forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListNotebookInstances' :: Maybe POSIX
lastModifiedTimeBefore = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListNotebookInstances' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nameContains:ListNotebookInstances' :: Maybe Text
nameContains = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListNotebookInstances' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:notebookInstanceLifecycleConfigNameContains:ListNotebookInstances' :: Maybe Text
notebookInstanceLifecycleConfigNameContains =
        forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListNotebookInstances' :: Maybe NotebookInstanceSortKey
sortBy = forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListNotebookInstances' :: Maybe NotebookInstanceSortOrder
sortOrder = forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListNotebookInstances' :: Maybe NotebookInstanceStatus
statusEquals = forall a. Maybe a
Prelude.Nothing
    }

-- | A filter that returns only notebook instances with associated with the
-- specified git repository.
listNotebookInstances_additionalCodeRepositoryEquals :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.Text)
listNotebookInstances_additionalCodeRepositoryEquals :: Lens' ListNotebookInstances (Maybe Text)
listNotebookInstances_additionalCodeRepositoryEquals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe Text
additionalCodeRepositoryEquals :: Maybe Text
$sel:additionalCodeRepositoryEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
additionalCodeRepositoryEquals} -> Maybe Text
additionalCodeRepositoryEquals) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe Text
a -> ListNotebookInstances
s {$sel:additionalCodeRepositoryEquals:ListNotebookInstances' :: Maybe Text
additionalCodeRepositoryEquals = Maybe Text
a} :: ListNotebookInstances)

-- | A filter that returns only notebook instances that were created after
-- the specified time (timestamp).
listNotebookInstances_creationTimeAfter :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.UTCTime)
listNotebookInstances_creationTimeAfter :: Lens' ListNotebookInstances (Maybe UTCTime)
listNotebookInstances_creationTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe POSIX
creationTimeAfter :: Maybe POSIX
$sel:creationTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
creationTimeAfter} -> Maybe POSIX
creationTimeAfter) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe POSIX
a -> ListNotebookInstances
s {$sel:creationTimeAfter:ListNotebookInstances' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
a} :: ListNotebookInstances) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A filter that returns only notebook instances that were created before
-- the specified time (timestamp).
listNotebookInstances_creationTimeBefore :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.UTCTime)
listNotebookInstances_creationTimeBefore :: Lens' ListNotebookInstances (Maybe UTCTime)
listNotebookInstances_creationTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe POSIX
creationTimeBefore :: Maybe POSIX
$sel:creationTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
creationTimeBefore} -> Maybe POSIX
creationTimeBefore) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe POSIX
a -> ListNotebookInstances
s {$sel:creationTimeBefore:ListNotebookInstances' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
a} :: ListNotebookInstances) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A string in the name or URL of a Git repository associated with this
-- notebook instance. This filter returns only notebook instances
-- associated with a git repository with a name that contains the specified
-- string.
listNotebookInstances_defaultCodeRepositoryContains :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.Text)
listNotebookInstances_defaultCodeRepositoryContains :: Lens' ListNotebookInstances (Maybe Text)
listNotebookInstances_defaultCodeRepositoryContains = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe Text
defaultCodeRepositoryContains :: Maybe Text
$sel:defaultCodeRepositoryContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
defaultCodeRepositoryContains} -> Maybe Text
defaultCodeRepositoryContains) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe Text
a -> ListNotebookInstances
s {$sel:defaultCodeRepositoryContains:ListNotebookInstances' :: Maybe Text
defaultCodeRepositoryContains = Maybe Text
a} :: ListNotebookInstances)

-- | A filter that returns only notebook instances that were modified after
-- the specified time (timestamp).
listNotebookInstances_lastModifiedTimeAfter :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.UTCTime)
listNotebookInstances_lastModifiedTimeAfter :: Lens' ListNotebookInstances (Maybe UTCTime)
listNotebookInstances_lastModifiedTimeAfter = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
$sel:lastModifiedTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
lastModifiedTimeAfter} -> Maybe POSIX
lastModifiedTimeAfter) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe POSIX
a -> ListNotebookInstances
s {$sel:lastModifiedTimeAfter:ListNotebookInstances' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
a} :: ListNotebookInstances) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | A filter that returns only notebook instances that were modified before
-- the specified time (timestamp).
listNotebookInstances_lastModifiedTimeBefore :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.UTCTime)
listNotebookInstances_lastModifiedTimeBefore :: Lens' ListNotebookInstances (Maybe UTCTime)
listNotebookInstances_lastModifiedTimeBefore = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe POSIX
lastModifiedTimeBefore :: Maybe POSIX
$sel:lastModifiedTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
lastModifiedTimeBefore} -> Maybe POSIX
lastModifiedTimeBefore) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe POSIX
a -> ListNotebookInstances
s {$sel:lastModifiedTimeBefore:ListNotebookInstances' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
a} :: ListNotebookInstances) 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 (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The maximum number of notebook instances to return.
listNotebookInstances_maxResults :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.Natural)
listNotebookInstances_maxResults :: Lens' ListNotebookInstances (Maybe Natural)
listNotebookInstances_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListNotebookInstances' :: ListNotebookInstances -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe Natural
a -> ListNotebookInstances
s {$sel:maxResults:ListNotebookInstances' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListNotebookInstances)

-- | A string in the notebook instances\' name. This filter returns only
-- notebook instances whose name contains the specified string.
listNotebookInstances_nameContains :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.Text)
listNotebookInstances_nameContains :: Lens' ListNotebookInstances (Maybe Text)
listNotebookInstances_nameContains = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe Text
nameContains :: Maybe Text
$sel:nameContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
nameContains} -> Maybe Text
nameContains) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe Text
a -> ListNotebookInstances
s {$sel:nameContains:ListNotebookInstances' :: Maybe Text
nameContains = Maybe Text
a} :: ListNotebookInstances)

-- | If the previous call to the @ListNotebookInstances@ is truncated, the
-- response includes a @NextToken@. You can use this token in your
-- subsequent @ListNotebookInstances@ request to fetch the next set of
-- notebook instances.
--
-- You might specify a filter or a sort order in your request. When
-- response is truncated, you must use the same values for the filer and
-- sort order in the next request.
listNotebookInstances_nextToken :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.Text)
listNotebookInstances_nextToken :: Lens' ListNotebookInstances (Maybe Text)
listNotebookInstances_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe Text
a -> ListNotebookInstances
s {$sel:nextToken:ListNotebookInstances' :: Maybe Text
nextToken = Maybe Text
a} :: ListNotebookInstances)

-- | A string in the name of a notebook instances lifecycle configuration
-- associated with this notebook instance. This filter returns only
-- notebook instances associated with a lifecycle configuration with a name
-- that contains the specified string.
listNotebookInstances_notebookInstanceLifecycleConfigNameContains :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.Text)
listNotebookInstances_notebookInstanceLifecycleConfigNameContains :: Lens' ListNotebookInstances (Maybe Text)
listNotebookInstances_notebookInstanceLifecycleConfigNameContains = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe Text
notebookInstanceLifecycleConfigNameContains :: Maybe Text
$sel:notebookInstanceLifecycleConfigNameContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
notebookInstanceLifecycleConfigNameContains} -> Maybe Text
notebookInstanceLifecycleConfigNameContains) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe Text
a -> ListNotebookInstances
s {$sel:notebookInstanceLifecycleConfigNameContains:ListNotebookInstances' :: Maybe Text
notebookInstanceLifecycleConfigNameContains = Maybe Text
a} :: ListNotebookInstances)

-- | The field to sort results by. The default is @Name@.
listNotebookInstances_sortBy :: Lens.Lens' ListNotebookInstances (Prelude.Maybe NotebookInstanceSortKey)
listNotebookInstances_sortBy :: Lens' ListNotebookInstances (Maybe NotebookInstanceSortKey)
listNotebookInstances_sortBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe NotebookInstanceSortKey
sortBy :: Maybe NotebookInstanceSortKey
$sel:sortBy:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortKey
sortBy} -> Maybe NotebookInstanceSortKey
sortBy) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe NotebookInstanceSortKey
a -> ListNotebookInstances
s {$sel:sortBy:ListNotebookInstances' :: Maybe NotebookInstanceSortKey
sortBy = Maybe NotebookInstanceSortKey
a} :: ListNotebookInstances)

-- | The sort order for results.
listNotebookInstances_sortOrder :: Lens.Lens' ListNotebookInstances (Prelude.Maybe NotebookInstanceSortOrder)
listNotebookInstances_sortOrder :: Lens' ListNotebookInstances (Maybe NotebookInstanceSortOrder)
listNotebookInstances_sortOrder = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe NotebookInstanceSortOrder
sortOrder :: Maybe NotebookInstanceSortOrder
$sel:sortOrder:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortOrder
sortOrder} -> Maybe NotebookInstanceSortOrder
sortOrder) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe NotebookInstanceSortOrder
a -> ListNotebookInstances
s {$sel:sortOrder:ListNotebookInstances' :: Maybe NotebookInstanceSortOrder
sortOrder = Maybe NotebookInstanceSortOrder
a} :: ListNotebookInstances)

-- | A filter that returns only notebook instances with the specified status.
listNotebookInstances_statusEquals :: Lens.Lens' ListNotebookInstances (Prelude.Maybe NotebookInstanceStatus)
listNotebookInstances_statusEquals :: Lens' ListNotebookInstances (Maybe NotebookInstanceStatus)
listNotebookInstances_statusEquals = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstances' {Maybe NotebookInstanceStatus
statusEquals :: Maybe NotebookInstanceStatus
$sel:statusEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceStatus
statusEquals} -> Maybe NotebookInstanceStatus
statusEquals) (\s :: ListNotebookInstances
s@ListNotebookInstances' {} Maybe NotebookInstanceStatus
a -> ListNotebookInstances
s {$sel:statusEquals:ListNotebookInstances' :: Maybe NotebookInstanceStatus
statusEquals = Maybe NotebookInstanceStatus
a} :: ListNotebookInstances)

instance Core.AWSPager ListNotebookInstances where
  page :: ListNotebookInstances
-> AWSResponse ListNotebookInstances -> Maybe ListNotebookInstances
page ListNotebookInstances
rq AWSResponse ListNotebookInstances
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListNotebookInstances
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListNotebookInstancesResponse (Maybe Text)
listNotebookInstancesResponse_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 ListNotebookInstances
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  ListNotebookInstancesResponse (Maybe [NotebookInstanceSummary])
listNotebookInstancesResponse_notebookInstances
            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.$ ListNotebookInstances
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' ListNotebookInstances (Maybe Text)
listNotebookInstances_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListNotebookInstances
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' ListNotebookInstancesResponse (Maybe Text)
listNotebookInstancesResponse_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 ListNotebookInstances where
  type
    AWSResponse ListNotebookInstances =
      ListNotebookInstancesResponse
  request :: (Service -> Service)
-> ListNotebookInstances -> Request ListNotebookInstances
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 ListNotebookInstances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListNotebookInstances)))
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 [NotebookInstanceSummary]
-> Int
-> ListNotebookInstancesResponse
ListNotebookInstancesResponse'
            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
"NotebookInstances"
                            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 ListNotebookInstances where
  hashWithSalt :: Int -> ListNotebookInstances -> Int
hashWithSalt Int
_salt ListNotebookInstances' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe NotebookInstanceSortKey
Maybe NotebookInstanceSortOrder
Maybe NotebookInstanceStatus
statusEquals :: Maybe NotebookInstanceStatus
sortOrder :: Maybe NotebookInstanceSortOrder
sortBy :: Maybe NotebookInstanceSortKey
notebookInstanceLifecycleConfigNameContains :: Maybe Text
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
lastModifiedTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
defaultCodeRepositoryContains :: Maybe Text
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
additionalCodeRepositoryEquals :: Maybe Text
$sel:statusEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceStatus
$sel:sortOrder:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortOrder
$sel:sortBy:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortKey
$sel:notebookInstanceLifecycleConfigNameContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:nextToken:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:nameContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:maxResults:ListNotebookInstances' :: ListNotebookInstances -> Maybe Natural
$sel:lastModifiedTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:defaultCodeRepositoryContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:creationTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:creationTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:additionalCodeRepositoryEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
additionalCodeRepositoryEquals
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTimeAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTimeBefore
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
defaultCodeRepositoryContains
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTimeAfter
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTimeBefore
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nameContains
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
notebookInstanceLifecycleConfigNameContains
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NotebookInstanceSortKey
sortBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NotebookInstanceSortOrder
sortOrder
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe NotebookInstanceStatus
statusEquals

instance Prelude.NFData ListNotebookInstances where
  rnf :: ListNotebookInstances -> ()
rnf ListNotebookInstances' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe NotebookInstanceSortKey
Maybe NotebookInstanceSortOrder
Maybe NotebookInstanceStatus
statusEquals :: Maybe NotebookInstanceStatus
sortOrder :: Maybe NotebookInstanceSortOrder
sortBy :: Maybe NotebookInstanceSortKey
notebookInstanceLifecycleConfigNameContains :: Maybe Text
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
lastModifiedTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
defaultCodeRepositoryContains :: Maybe Text
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
additionalCodeRepositoryEquals :: Maybe Text
$sel:statusEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceStatus
$sel:sortOrder:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortOrder
$sel:sortBy:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortKey
$sel:notebookInstanceLifecycleConfigNameContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:nextToken:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:nameContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:maxResults:ListNotebookInstances' :: ListNotebookInstances -> Maybe Natural
$sel:lastModifiedTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:defaultCodeRepositoryContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:creationTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:creationTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:additionalCodeRepositoryEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
additionalCodeRepositoryEquals
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTimeAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTimeBefore
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
defaultCodeRepositoryContains
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTimeAfter
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTimeBefore
      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
nameContains
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf
        Maybe Text
notebookInstanceLifecycleConfigNameContains
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NotebookInstanceSortKey
sortBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NotebookInstanceSortOrder
sortOrder
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe NotebookInstanceStatus
statusEquals

instance Data.ToHeaders ListNotebookInstances where
  toHeaders :: ListNotebookInstances -> 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
"SageMaker.ListNotebookInstances" ::
                          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 ListNotebookInstances where
  toJSON :: ListNotebookInstances -> Value
toJSON ListNotebookInstances' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe NotebookInstanceSortKey
Maybe NotebookInstanceSortOrder
Maybe NotebookInstanceStatus
statusEquals :: Maybe NotebookInstanceStatus
sortOrder :: Maybe NotebookInstanceSortOrder
sortBy :: Maybe NotebookInstanceSortKey
notebookInstanceLifecycleConfigNameContains :: Maybe Text
nextToken :: Maybe Text
nameContains :: Maybe Text
maxResults :: Maybe Natural
lastModifiedTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
defaultCodeRepositoryContains :: Maybe Text
creationTimeBefore :: Maybe POSIX
creationTimeAfter :: Maybe POSIX
additionalCodeRepositoryEquals :: Maybe Text
$sel:statusEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceStatus
$sel:sortOrder:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortOrder
$sel:sortBy:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortKey
$sel:notebookInstanceLifecycleConfigNameContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:nextToken:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:nameContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:maxResults:ListNotebookInstances' :: ListNotebookInstances -> Maybe Natural
$sel:lastModifiedTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:defaultCodeRepositoryContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:creationTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:creationTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:additionalCodeRepositoryEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"AdditionalCodeRepositoryEquals" 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
additionalCodeRepositoryEquals,
            (Key
"CreationTimeAfter" 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 POSIX
creationTimeAfter,
            (Key
"CreationTimeBefore" 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 POSIX
creationTimeBefore,
            (Key
"DefaultCodeRepositoryContains" 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
defaultCodeRepositoryContains,
            (Key
"LastModifiedTimeAfter" 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 POSIX
lastModifiedTimeAfter,
            (Key
"LastModifiedTimeBefore" 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 POSIX
lastModifiedTimeBefore,
            (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
"NameContains" 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
nameContains,
            (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,
            ( Key
"NotebookInstanceLifecycleConfigNameContains"
                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
notebookInstanceLifecycleConfigNameContains,
            (Key
"SortBy" 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 NotebookInstanceSortKey
sortBy,
            (Key
"SortOrder" 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 NotebookInstanceSortOrder
sortOrder,
            (Key
"StatusEquals" 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 NotebookInstanceStatus
statusEquals
          ]
      )

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

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

-- | /See:/ 'newListNotebookInstancesResponse' smart constructor.
data ListNotebookInstancesResponse = ListNotebookInstancesResponse'
  { -- | If the response to the previous @ListNotebookInstances@ request was
    -- truncated, SageMaker returns this token. To retrieve the next set of
    -- notebook instances, use the token in the next request.
    ListNotebookInstancesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | An array of @NotebookInstanceSummary@ objects, one for each notebook
    -- instance.
    ListNotebookInstancesResponse -> Maybe [NotebookInstanceSummary]
notebookInstances :: Prelude.Maybe [NotebookInstanceSummary],
    -- | The response's http status code.
    ListNotebookInstancesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListNotebookInstancesResponse
-> ListNotebookInstancesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListNotebookInstancesResponse
-> ListNotebookInstancesResponse -> Bool
$c/= :: ListNotebookInstancesResponse
-> ListNotebookInstancesResponse -> Bool
== :: ListNotebookInstancesResponse
-> ListNotebookInstancesResponse -> Bool
$c== :: ListNotebookInstancesResponse
-> ListNotebookInstancesResponse -> Bool
Prelude.Eq, ReadPrec [ListNotebookInstancesResponse]
ReadPrec ListNotebookInstancesResponse
Int -> ReadS ListNotebookInstancesResponse
ReadS [ListNotebookInstancesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListNotebookInstancesResponse]
$creadListPrec :: ReadPrec [ListNotebookInstancesResponse]
readPrec :: ReadPrec ListNotebookInstancesResponse
$creadPrec :: ReadPrec ListNotebookInstancesResponse
readList :: ReadS [ListNotebookInstancesResponse]
$creadList :: ReadS [ListNotebookInstancesResponse]
readsPrec :: Int -> ReadS ListNotebookInstancesResponse
$creadsPrec :: Int -> ReadS ListNotebookInstancesResponse
Prelude.Read, Int -> ListNotebookInstancesResponse -> ShowS
[ListNotebookInstancesResponse] -> ShowS
ListNotebookInstancesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListNotebookInstancesResponse] -> ShowS
$cshowList :: [ListNotebookInstancesResponse] -> ShowS
show :: ListNotebookInstancesResponse -> String
$cshow :: ListNotebookInstancesResponse -> String
showsPrec :: Int -> ListNotebookInstancesResponse -> ShowS
$cshowsPrec :: Int -> ListNotebookInstancesResponse -> ShowS
Prelude.Show, forall x.
Rep ListNotebookInstancesResponse x
-> ListNotebookInstancesResponse
forall x.
ListNotebookInstancesResponse
-> Rep ListNotebookInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListNotebookInstancesResponse x
-> ListNotebookInstancesResponse
$cfrom :: forall x.
ListNotebookInstancesResponse
-> Rep ListNotebookInstancesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListNotebookInstancesResponse' 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', 'listNotebookInstancesResponse_nextToken' - If the response to the previous @ListNotebookInstances@ request was
-- truncated, SageMaker returns this token. To retrieve the next set of
-- notebook instances, use the token in the next request.
--
-- 'notebookInstances', 'listNotebookInstancesResponse_notebookInstances' - An array of @NotebookInstanceSummary@ objects, one for each notebook
-- instance.
--
-- 'httpStatus', 'listNotebookInstancesResponse_httpStatus' - The response's http status code.
newListNotebookInstancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListNotebookInstancesResponse
newListNotebookInstancesResponse :: Int -> ListNotebookInstancesResponse
newListNotebookInstancesResponse Int
pHttpStatus_ =
  ListNotebookInstancesResponse'
    { $sel:nextToken:ListNotebookInstancesResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:notebookInstances:ListNotebookInstancesResponse' :: Maybe [NotebookInstanceSummary]
notebookInstances = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListNotebookInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | If the response to the previous @ListNotebookInstances@ request was
-- truncated, SageMaker returns this token. To retrieve the next set of
-- notebook instances, use the token in the next request.
listNotebookInstancesResponse_nextToken :: Lens.Lens' ListNotebookInstancesResponse (Prelude.Maybe Prelude.Text)
listNotebookInstancesResponse_nextToken :: Lens' ListNotebookInstancesResponse (Maybe Text)
listNotebookInstancesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstancesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListNotebookInstancesResponse' :: ListNotebookInstancesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListNotebookInstancesResponse
s@ListNotebookInstancesResponse' {} Maybe Text
a -> ListNotebookInstancesResponse
s {$sel:nextToken:ListNotebookInstancesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListNotebookInstancesResponse)

-- | An array of @NotebookInstanceSummary@ objects, one for each notebook
-- instance.
listNotebookInstancesResponse_notebookInstances :: Lens.Lens' ListNotebookInstancesResponse (Prelude.Maybe [NotebookInstanceSummary])
listNotebookInstancesResponse_notebookInstances :: Lens'
  ListNotebookInstancesResponse (Maybe [NotebookInstanceSummary])
listNotebookInstancesResponse_notebookInstances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstancesResponse' {Maybe [NotebookInstanceSummary]
notebookInstances :: Maybe [NotebookInstanceSummary]
$sel:notebookInstances:ListNotebookInstancesResponse' :: ListNotebookInstancesResponse -> Maybe [NotebookInstanceSummary]
notebookInstances} -> Maybe [NotebookInstanceSummary]
notebookInstances) (\s :: ListNotebookInstancesResponse
s@ListNotebookInstancesResponse' {} Maybe [NotebookInstanceSummary]
a -> ListNotebookInstancesResponse
s {$sel:notebookInstances:ListNotebookInstancesResponse' :: Maybe [NotebookInstanceSummary]
notebookInstances = Maybe [NotebookInstanceSummary]
a} :: ListNotebookInstancesResponse) 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.
listNotebookInstancesResponse_httpStatus :: Lens.Lens' ListNotebookInstancesResponse Prelude.Int
listNotebookInstancesResponse_httpStatus :: Lens' ListNotebookInstancesResponse Int
listNotebookInstancesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListNotebookInstancesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListNotebookInstancesResponse' :: ListNotebookInstancesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListNotebookInstancesResponse
s@ListNotebookInstancesResponse' {} Int
a -> ListNotebookInstancesResponse
s {$sel:httpStatus:ListNotebookInstancesResponse' :: Int
httpStatus = Int
a} :: ListNotebookInstancesResponse)

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