{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of the Amazon 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_nameContains,
    listNotebookInstances_defaultCodeRepositoryContains,
    listNotebookInstances_lastModifiedTimeBefore,
    listNotebookInstances_notebookInstanceLifecycleConfigNameContains,
    listNotebookInstances_creationTimeAfter,
    listNotebookInstances_additionalCodeRepositoryEquals,
    listNotebookInstances_nextToken,
    listNotebookInstances_sortOrder,
    listNotebookInstances_lastModifiedTimeAfter,
    listNotebookInstances_creationTimeBefore,
    listNotebookInstances_statusEquals,
    listNotebookInstances_maxResults,
    listNotebookInstances_sortBy,

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

    -- * Response Lenses
    listNotebookInstancesResponse_notebookInstances,
    listNotebookInstancesResponse_nextToken,
    listNotebookInstancesResponse_httpStatus,
  )
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:/ 'newListNotebookInstances' smart constructor.
data ListNotebookInstances = ListNotebookInstances'
  { -- | 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,
    -- | 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 before
    -- the specified time (timestamp).
    ListNotebookInstances -> Maybe POSIX
lastModifiedTimeBefore :: Prelude.Maybe Core.POSIX,
    -- | 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,
    -- | A filter that returns only notebook instances that were created after
    -- the specified time (timestamp).
    ListNotebookInstances -> Maybe POSIX
creationTimeAfter :: Prelude.Maybe Core.POSIX,
    -- | A filter that returns only notebook instances with associated with the
    -- specified git repository.
    ListNotebookInstances -> Maybe Text
additionalCodeRepositoryEquals :: 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,
    -- | The sort order for results.
    ListNotebookInstances -> Maybe NotebookInstanceSortOrder
sortOrder :: Prelude.Maybe NotebookInstanceSortOrder,
    -- | A filter that returns only notebook instances that were modified after
    -- the specified time (timestamp).
    ListNotebookInstances -> Maybe POSIX
lastModifiedTimeAfter :: Prelude.Maybe Core.POSIX,
    -- | A filter that returns only notebook instances that were created before
    -- the specified time (timestamp).
    ListNotebookInstances -> Maybe POSIX
creationTimeBefore :: Prelude.Maybe Core.POSIX,
    -- | A filter that returns only notebook instances with the specified status.
    ListNotebookInstances -> Maybe NotebookInstanceStatus
statusEquals :: Prelude.Maybe NotebookInstanceStatus,
    -- | The maximum number of notebook instances to return.
    ListNotebookInstances -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The field to sort results by. The default is @Name@.
    ListNotebookInstances -> Maybe NotebookInstanceSortKey
sortBy :: Prelude.Maybe NotebookInstanceSortKey
  }
  deriving (ListNotebookInstances -> ListNotebookInstances -> Bool
(ListNotebookInstances -> ListNotebookInstances -> Bool)
-> (ListNotebookInstances -> ListNotebookInstances -> Bool)
-> Eq ListNotebookInstances
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]
(Int -> ReadS ListNotebookInstances)
-> ReadS [ListNotebookInstances]
-> ReadPrec ListNotebookInstances
-> ReadPrec [ListNotebookInstances]
-> Read 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
(Int -> ListNotebookInstances -> ShowS)
-> (ListNotebookInstances -> String)
-> ([ListNotebookInstances] -> ShowS)
-> Show ListNotebookInstances
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. ListNotebookInstances -> Rep ListNotebookInstances x)
-> (forall x. Rep ListNotebookInstances x -> ListNotebookInstances)
-> Generic ListNotebookInstances
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:
--
-- 'nameContains', 'listNotebookInstances_nameContains' - A string in the notebook instances\' name. This filter returns only
-- notebook instances whose name contains the specified string.
--
-- '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.
--
-- 'lastModifiedTimeBefore', 'listNotebookInstances_lastModifiedTimeBefore' - A filter that returns only notebook instances that were modified before
-- the specified time (timestamp).
--
-- '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.
--
-- 'creationTimeAfter', 'listNotebookInstances_creationTimeAfter' - A filter that returns only notebook instances that were created after
-- the specified time (timestamp).
--
-- 'additionalCodeRepositoryEquals', 'listNotebookInstances_additionalCodeRepositoryEquals' - A filter that returns only notebook instances with associated with the
-- specified git repository.
--
-- '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.
--
-- 'sortOrder', 'listNotebookInstances_sortOrder' - The sort order for results.
--
-- 'lastModifiedTimeAfter', 'listNotebookInstances_lastModifiedTimeAfter' - A filter that returns only notebook instances that were modified after
-- the specified time (timestamp).
--
-- 'creationTimeBefore', 'listNotebookInstances_creationTimeBefore' - A filter that returns only notebook instances that were created before
-- the specified time (timestamp).
--
-- 'statusEquals', 'listNotebookInstances_statusEquals' - A filter that returns only notebook instances with the specified status.
--
-- 'maxResults', 'listNotebookInstances_maxResults' - The maximum number of notebook instances to return.
--
-- 'sortBy', 'listNotebookInstances_sortBy' - The field to sort results by. The default is @Name@.
newListNotebookInstances ::
  ListNotebookInstances
newListNotebookInstances :: ListNotebookInstances
newListNotebookInstances =
  ListNotebookInstances' :: Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe NotebookInstanceSortOrder
-> Maybe POSIX
-> Maybe POSIX
-> Maybe NotebookInstanceStatus
-> Maybe Natural
-> Maybe NotebookInstanceSortKey
-> ListNotebookInstances
ListNotebookInstances'
    { $sel:nameContains:ListNotebookInstances' :: Maybe Text
nameContains =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultCodeRepositoryContains:ListNotebookInstances' :: Maybe Text
defaultCodeRepositoryContains = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeBefore:ListNotebookInstances' :: Maybe POSIX
lastModifiedTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:notebookInstanceLifecycleConfigNameContains:ListNotebookInstances' :: Maybe Text
notebookInstanceLifecycleConfigNameContains =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeAfter:ListNotebookInstances' :: Maybe POSIX
creationTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:additionalCodeRepositoryEquals:ListNotebookInstances' :: Maybe Text
additionalCodeRepositoryEquals = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListNotebookInstances' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sortOrder:ListNotebookInstances' :: Maybe NotebookInstanceSortOrder
sortOrder = Maybe NotebookInstanceSortOrder
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTimeAfter:ListNotebookInstances' :: Maybe POSIX
lastModifiedTimeAfter = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimeBefore:ListNotebookInstances' :: Maybe POSIX
creationTimeBefore = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:statusEquals:ListNotebookInstances' :: Maybe NotebookInstanceStatus
statusEquals = Maybe NotebookInstanceStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListNotebookInstances' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sortBy:ListNotebookInstances' :: Maybe NotebookInstanceSortKey
sortBy = Maybe NotebookInstanceSortKey
forall a. Maybe a
Prelude.Nothing
    }

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_nameContains = (ListNotebookInstances -> Maybe Text)
-> (ListNotebookInstances -> Maybe Text -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_defaultCodeRepositoryContains = (ListNotebookInstances -> Maybe Text)
-> (ListNotebookInstances -> Maybe Text -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe Text)
     (Maybe Text)
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 before
-- the specified time (timestamp).
listNotebookInstances_lastModifiedTimeBefore :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.UTCTime)
listNotebookInstances_lastModifiedTimeBefore :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_lastModifiedTimeBefore = (ListNotebookInstances -> Maybe POSIX)
-> (ListNotebookInstances -> Maybe POSIX -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe POSIX)
     (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListNotebookInstances -> f ListNotebookInstances)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListNotebookInstances
-> f ListNotebookInstances
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

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_notebookInstanceLifecycleConfigNameContains = (ListNotebookInstances -> Maybe Text)
-> (ListNotebookInstances -> Maybe Text -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_creationTimeAfter = (ListNotebookInstances -> Maybe POSIX)
-> (ListNotebookInstances -> Maybe POSIX -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe POSIX)
     (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListNotebookInstances -> f ListNotebookInstances)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListNotebookInstances
-> f ListNotebookInstances
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

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_additionalCodeRepositoryEquals = (ListNotebookInstances -> Maybe Text)
-> (ListNotebookInstances -> Maybe Text -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe Text)
     (Maybe Text)
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)

-- | 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 :: (Maybe Text -> f (Maybe Text))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_nextToken = (ListNotebookInstances -> Maybe Text)
-> (ListNotebookInstances -> Maybe Text -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe Text)
     (Maybe Text)
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)

-- | The sort order for results.
listNotebookInstances_sortOrder :: Lens.Lens' ListNotebookInstances (Prelude.Maybe NotebookInstanceSortOrder)
listNotebookInstances_sortOrder :: (Maybe NotebookInstanceSortOrder
 -> f (Maybe NotebookInstanceSortOrder))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_sortOrder = (ListNotebookInstances -> Maybe NotebookInstanceSortOrder)
-> (ListNotebookInstances
    -> Maybe NotebookInstanceSortOrder -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe NotebookInstanceSortOrder)
     (Maybe NotebookInstanceSortOrder)
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 that were modified after
-- the specified time (timestamp).
listNotebookInstances_lastModifiedTimeAfter :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.UTCTime)
listNotebookInstances_lastModifiedTimeAfter :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_lastModifiedTimeAfter = (ListNotebookInstances -> Maybe POSIX)
-> (ListNotebookInstances -> Maybe POSIX -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe POSIX)
     (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListNotebookInstances -> f ListNotebookInstances)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListNotebookInstances
-> f ListNotebookInstances
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

-- | 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 :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_creationTimeBefore = (ListNotebookInstances -> Maybe POSIX)
-> (ListNotebookInstances -> Maybe POSIX -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe POSIX)
     (Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
 -> ListNotebookInstances -> f ListNotebookInstances)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ListNotebookInstances
-> f ListNotebookInstances
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

-- | A filter that returns only notebook instances with the specified status.
listNotebookInstances_statusEquals :: Lens.Lens' ListNotebookInstances (Prelude.Maybe NotebookInstanceStatus)
listNotebookInstances_statusEquals :: (Maybe NotebookInstanceStatus -> f (Maybe NotebookInstanceStatus))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_statusEquals = (ListNotebookInstances -> Maybe NotebookInstanceStatus)
-> (ListNotebookInstances
    -> Maybe NotebookInstanceStatus -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe NotebookInstanceStatus)
     (Maybe NotebookInstanceStatus)
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)

-- | The maximum number of notebook instances to return.
listNotebookInstances_maxResults :: Lens.Lens' ListNotebookInstances (Prelude.Maybe Prelude.Natural)
listNotebookInstances_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_maxResults = (ListNotebookInstances -> Maybe Natural)
-> (ListNotebookInstances
    -> Maybe Natural -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe Natural)
     (Maybe Natural)
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)

-- | The field to sort results by. The default is @Name@.
listNotebookInstances_sortBy :: Lens.Lens' ListNotebookInstances (Prelude.Maybe NotebookInstanceSortKey)
listNotebookInstances_sortBy :: (Maybe NotebookInstanceSortKey
 -> f (Maybe NotebookInstanceSortKey))
-> ListNotebookInstances -> f ListNotebookInstances
listNotebookInstances_sortBy = (ListNotebookInstances -> Maybe NotebookInstanceSortKey)
-> (ListNotebookInstances
    -> Maybe NotebookInstanceSortKey -> ListNotebookInstances)
-> Lens
     ListNotebookInstances
     ListNotebookInstances
     (Maybe NotebookInstanceSortKey)
     (Maybe NotebookInstanceSortKey)
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)

instance Core.AWSPager ListNotebookInstances where
  page :: ListNotebookInstances
-> AWSResponse ListNotebookInstances -> Maybe ListNotebookInstances
page ListNotebookInstances
rq AWSResponse ListNotebookInstances
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListNotebookInstances
ListNotebookInstancesResponse
rs
            ListNotebookInstancesResponse
-> Getting (First Text) ListNotebookInstancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListNotebookInstancesResponse
-> Const (First Text) ListNotebookInstancesResponse
Lens' ListNotebookInstancesResponse (Maybe Text)
listNotebookInstancesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListNotebookInstancesResponse
 -> Const (First Text) ListNotebookInstancesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListNotebookInstancesResponse 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 ListNotebookInstances
forall a. Maybe a
Prelude.Nothing
    | Maybe [NotebookInstanceSummary] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListNotebookInstances
ListNotebookInstancesResponse
rs
            ListNotebookInstancesResponse
-> Getting
     (First [NotebookInstanceSummary])
     ListNotebookInstancesResponse
     [NotebookInstanceSummary]
-> Maybe [NotebookInstanceSummary]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [NotebookInstanceSummary]
 -> Const
      (First [NotebookInstanceSummary])
      (Maybe [NotebookInstanceSummary]))
-> ListNotebookInstancesResponse
-> Const
     (First [NotebookInstanceSummary]) ListNotebookInstancesResponse
Lens'
  ListNotebookInstancesResponse (Maybe [NotebookInstanceSummary])
listNotebookInstancesResponse_notebookInstances
              ((Maybe [NotebookInstanceSummary]
  -> Const
       (First [NotebookInstanceSummary])
       (Maybe [NotebookInstanceSummary]))
 -> ListNotebookInstancesResponse
 -> Const
      (First [NotebookInstanceSummary]) ListNotebookInstancesResponse)
-> (([NotebookInstanceSummary]
     -> Const
          (First [NotebookInstanceSummary]) [NotebookInstanceSummary])
    -> Maybe [NotebookInstanceSummary]
    -> Const
         (First [NotebookInstanceSummary])
         (Maybe [NotebookInstanceSummary]))
-> Getting
     (First [NotebookInstanceSummary])
     ListNotebookInstancesResponse
     [NotebookInstanceSummary]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([NotebookInstanceSummary]
 -> Const
      (First [NotebookInstanceSummary]) [NotebookInstanceSummary])
-> Maybe [NotebookInstanceSummary]
-> Const
     (First [NotebookInstanceSummary]) (Maybe [NotebookInstanceSummary])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListNotebookInstances
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListNotebookInstances -> Maybe ListNotebookInstances
forall a. a -> Maybe a
Prelude.Just (ListNotebookInstances -> Maybe ListNotebookInstances)
-> ListNotebookInstances -> Maybe ListNotebookInstances
forall a b. (a -> b) -> a -> b
Prelude.$
        ListNotebookInstances
rq
          ListNotebookInstances
-> (ListNotebookInstances -> ListNotebookInstances)
-> ListNotebookInstances
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListNotebookInstances -> Identity ListNotebookInstances
Lens
  ListNotebookInstances
  ListNotebookInstances
  (Maybe Text)
  (Maybe Text)
listNotebookInstances_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListNotebookInstances -> Identity ListNotebookInstances)
-> Maybe Text -> ListNotebookInstances -> ListNotebookInstances
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListNotebookInstances
ListNotebookInstancesResponse
rs
          ListNotebookInstancesResponse
-> Getting (First Text) ListNotebookInstancesResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListNotebookInstancesResponse
-> Const (First Text) ListNotebookInstancesResponse
Lens' ListNotebookInstancesResponse (Maybe Text)
listNotebookInstancesResponse_nextToken
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListNotebookInstancesResponse
 -> Const (First Text) ListNotebookInstancesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListNotebookInstancesResponse 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 ListNotebookInstances where
  type
    AWSResponse ListNotebookInstances =
      ListNotebookInstancesResponse
  request :: ListNotebookInstances -> Request ListNotebookInstances
request = Service -> ListNotebookInstances -> Request ListNotebookInstances
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ListNotebookInstances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListNotebookInstances)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListNotebookInstances))
-> Logger
-> Service
-> Proxy ListNotebookInstances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListNotebookInstances)))
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 [NotebookInstanceSummary]
-> Maybe Text -> Int -> ListNotebookInstancesResponse
ListNotebookInstancesResponse'
            (Maybe [NotebookInstanceSummary]
 -> Maybe Text -> Int -> ListNotebookInstancesResponse)
-> Either String (Maybe [NotebookInstanceSummary])
-> Either
     String (Maybe Text -> Int -> ListNotebookInstancesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [NotebookInstanceSummary]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NotebookInstances"
                            Either String (Maybe (Maybe [NotebookInstanceSummary]))
-> Maybe [NotebookInstanceSummary]
-> Either String (Maybe [NotebookInstanceSummary])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [NotebookInstanceSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either String (Maybe Text -> Int -> ListNotebookInstancesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListNotebookInstancesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
            Either String (Int -> ListNotebookInstancesResponse)
-> Either String Int -> Either String ListNotebookInstancesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable ListNotebookInstances

instance Prelude.NFData ListNotebookInstances

instance Core.ToHeaders ListNotebookInstances where
  toHeaders :: ListNotebookInstances -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListNotebookInstances -> 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.ListNotebookInstances" ::
                          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 ListNotebookInstances where
  toJSON :: ListNotebookInstances -> Value
toJSON ListNotebookInstances' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe NotebookInstanceSortKey
Maybe NotebookInstanceSortOrder
Maybe NotebookInstanceStatus
sortBy :: Maybe NotebookInstanceSortKey
maxResults :: Maybe Natural
statusEquals :: Maybe NotebookInstanceStatus
creationTimeBefore :: Maybe POSIX
lastModifiedTimeAfter :: Maybe POSIX
sortOrder :: Maybe NotebookInstanceSortOrder
nextToken :: Maybe Text
additionalCodeRepositoryEquals :: Maybe Text
creationTimeAfter :: Maybe POSIX
notebookInstanceLifecycleConfigNameContains :: Maybe Text
lastModifiedTimeBefore :: Maybe POSIX
defaultCodeRepositoryContains :: Maybe Text
nameContains :: Maybe Text
$sel:sortBy:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortKey
$sel:maxResults:ListNotebookInstances' :: ListNotebookInstances -> Maybe Natural
$sel:statusEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceStatus
$sel:creationTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:lastModifiedTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:sortOrder:ListNotebookInstances' :: ListNotebookInstances -> Maybe NotebookInstanceSortOrder
$sel:nextToken:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:additionalCodeRepositoryEquals:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:creationTimeAfter:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:notebookInstanceLifecycleConfigNameContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:lastModifiedTimeBefore:ListNotebookInstances' :: ListNotebookInstances -> Maybe POSIX
$sel:defaultCodeRepositoryContains:ListNotebookInstances' :: ListNotebookInstances -> Maybe Text
$sel:nameContains:ListNotebookInstances' :: ListNotebookInstances -> 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
"DefaultCodeRepositoryContains" 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
defaultCodeRepositoryContains,
            (Text
"LastModifiedTimeBefore" 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
lastModifiedTimeBefore,
            ( Text
"NotebookInstanceLifecycleConfigNameContains"
                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
notebookInstanceLifecycleConfigNameContains,
            (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
"AdditionalCodeRepositoryEquals" 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
additionalCodeRepositoryEquals,
            (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 -> NotebookInstanceSortOrder -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NotebookInstanceSortOrder -> Pair)
-> Maybe NotebookInstanceSortOrder -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotebookInstanceSortOrder
sortOrder,
            (Text
"LastModifiedTimeAfter" 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
lastModifiedTimeAfter,
            (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
"StatusEquals" Text -> NotebookInstanceStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NotebookInstanceStatus -> Pair)
-> Maybe NotebookInstanceStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotebookInstanceStatus
statusEquals,
            (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 -> NotebookInstanceSortKey -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NotebookInstanceSortKey -> Pair)
-> Maybe NotebookInstanceSortKey -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe NotebookInstanceSortKey
sortBy
          ]
      )

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

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

-- | /See:/ 'newListNotebookInstancesResponse' smart constructor.
data ListNotebookInstancesResponse = ListNotebookInstancesResponse'
  { -- | An array of @NotebookInstanceSummary@ objects, one for each notebook
    -- instance.
    ListNotebookInstancesResponse -> Maybe [NotebookInstanceSummary]
notebookInstances :: Prelude.Maybe [NotebookInstanceSummary],
    -- | If the response to the previous @ListNotebookInstances@ request was
    -- truncated, Amazon 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,
    -- | The response's http status code.
    ListNotebookInstancesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListNotebookInstancesResponse
-> ListNotebookInstancesResponse -> Bool
(ListNotebookInstancesResponse
 -> ListNotebookInstancesResponse -> Bool)
-> (ListNotebookInstancesResponse
    -> ListNotebookInstancesResponse -> Bool)
-> Eq ListNotebookInstancesResponse
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]
(Int -> ReadS ListNotebookInstancesResponse)
-> ReadS [ListNotebookInstancesResponse]
-> ReadPrec ListNotebookInstancesResponse
-> ReadPrec [ListNotebookInstancesResponse]
-> Read 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
(Int -> ListNotebookInstancesResponse -> ShowS)
-> (ListNotebookInstancesResponse -> String)
-> ([ListNotebookInstancesResponse] -> ShowS)
-> Show ListNotebookInstancesResponse
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.
 ListNotebookInstancesResponse
 -> Rep ListNotebookInstancesResponse x)
-> (forall x.
    Rep ListNotebookInstancesResponse x
    -> ListNotebookInstancesResponse)
-> Generic ListNotebookInstancesResponse
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:
--
-- 'notebookInstances', 'listNotebookInstancesResponse_notebookInstances' - An array of @NotebookInstanceSummary@ objects, one for each notebook
-- instance.
--
-- 'nextToken', 'listNotebookInstancesResponse_nextToken' - If the response to the previous @ListNotebookInstances@ request was
-- truncated, Amazon SageMaker returns this token. To retrieve the next set
-- of notebook instances, use the token in the next request.
--
-- 'httpStatus', 'listNotebookInstancesResponse_httpStatus' - The response's http status code.
newListNotebookInstancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListNotebookInstancesResponse
newListNotebookInstancesResponse :: Int -> ListNotebookInstancesResponse
newListNotebookInstancesResponse Int
pHttpStatus_ =
  ListNotebookInstancesResponse' :: Maybe [NotebookInstanceSummary]
-> Maybe Text -> Int -> ListNotebookInstancesResponse
ListNotebookInstancesResponse'
    { $sel:notebookInstances:ListNotebookInstancesResponse' :: Maybe [NotebookInstanceSummary]
notebookInstances =
        Maybe [NotebookInstanceSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListNotebookInstancesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListNotebookInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of @NotebookInstanceSummary@ objects, one for each notebook
-- instance.
listNotebookInstancesResponse_notebookInstances :: Lens.Lens' ListNotebookInstancesResponse (Prelude.Maybe [NotebookInstanceSummary])
listNotebookInstancesResponse_notebookInstances :: (Maybe [NotebookInstanceSummary]
 -> f (Maybe [NotebookInstanceSummary]))
-> ListNotebookInstancesResponse -> f ListNotebookInstancesResponse
listNotebookInstancesResponse_notebookInstances = (ListNotebookInstancesResponse -> Maybe [NotebookInstanceSummary])
-> (ListNotebookInstancesResponse
    -> Maybe [NotebookInstanceSummary]
    -> ListNotebookInstancesResponse)
-> Lens'
     ListNotebookInstancesResponse (Maybe [NotebookInstanceSummary])
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) ((Maybe [NotebookInstanceSummary]
  -> f (Maybe [NotebookInstanceSummary]))
 -> ListNotebookInstancesResponse
 -> f ListNotebookInstancesResponse)
-> ((Maybe [NotebookInstanceSummary]
     -> f (Maybe [NotebookInstanceSummary]))
    -> Maybe [NotebookInstanceSummary]
    -> f (Maybe [NotebookInstanceSummary]))
-> (Maybe [NotebookInstanceSummary]
    -> f (Maybe [NotebookInstanceSummary]))
-> ListNotebookInstancesResponse
-> f ListNotebookInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [NotebookInstanceSummary]
  [NotebookInstanceSummary]
  [NotebookInstanceSummary]
  [NotebookInstanceSummary]
-> Iso
     (Maybe [NotebookInstanceSummary])
     (Maybe [NotebookInstanceSummary])
     (Maybe [NotebookInstanceSummary])
     (Maybe [NotebookInstanceSummary])
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
  [NotebookInstanceSummary]
  [NotebookInstanceSummary]
  [NotebookInstanceSummary]
  [NotebookInstanceSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | If the response to the previous @ListNotebookInstances@ request was
-- truncated, Amazon 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 :: (Maybe Text -> f (Maybe Text))
-> ListNotebookInstancesResponse -> f ListNotebookInstancesResponse
listNotebookInstancesResponse_nextToken = (ListNotebookInstancesResponse -> Maybe Text)
-> (ListNotebookInstancesResponse
    -> Maybe Text -> ListNotebookInstancesResponse)
-> Lens' ListNotebookInstancesResponse (Maybe Text)
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)

-- | The response's http status code.
listNotebookInstancesResponse_httpStatus :: Lens.Lens' ListNotebookInstancesResponse Prelude.Int
listNotebookInstancesResponse_httpStatus :: (Int -> f Int)
-> ListNotebookInstancesResponse -> f ListNotebookInstancesResponse
listNotebookInstancesResponse_httpStatus = (ListNotebookInstancesResponse -> Int)
-> (ListNotebookInstancesResponse
    -> Int -> ListNotebookInstancesResponse)
-> Lens
     ListNotebookInstancesResponse ListNotebookInstancesResponse Int Int
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