{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.NotebookInstanceSummary
-- 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)
module Amazonka.SageMaker.Types.NotebookInstanceSummary where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.InstanceType
import Amazonka.SageMaker.Types.NotebookInstanceStatus

-- | Provides summary information for an Amazon SageMaker notebook instance.
--
-- /See:/ 'newNotebookInstanceSummary' smart constructor.
data NotebookInstanceSummary = NotebookInstanceSummary'
  { -- | A timestamp that shows when the notebook instance was created.
    NotebookInstanceSummary -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | An array of up to three Git repositories associated with the notebook
    -- instance. These can be either the names of Git repositories stored as
    -- resources in your account, or the URL of Git repositories in
    -- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
    -- or in any other Git repository. These repositories are cloned at the
    -- same level as the default repository of your notebook instance. For more
    -- information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with Amazon SageMaker Notebook Instances>.
    NotebookInstanceSummary -> Maybe [Text]
additionalCodeRepositories :: Prelude.Maybe [Prelude.Text],
    -- | The URL that you use to connect to the Jupyter instance running in your
    -- notebook instance.
    NotebookInstanceSummary -> Maybe Text
url :: Prelude.Maybe Prelude.Text,
    -- | A timestamp that shows when the notebook instance was last modified.
    NotebookInstanceSummary -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The type of ML compute instance that the notebook instance is running
    -- on.
    NotebookInstanceSummary -> Maybe InstanceType
instanceType :: Prelude.Maybe InstanceType,
    -- | The status of the notebook instance.
    NotebookInstanceSummary -> Maybe NotebookInstanceStatus
notebookInstanceStatus :: Prelude.Maybe NotebookInstanceStatus,
    -- | The Git repository associated with the notebook instance as its default
    -- code repository. This can be either the name of a Git repository stored
    -- as a resource in your account, or the URL of a Git repository in
    -- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
    -- or in any other Git repository. When you open a notebook instance, it
    -- opens in the directory that contains this repository. For more
    -- information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with Amazon SageMaker Notebook Instances>.
    NotebookInstanceSummary -> Maybe Text
defaultCodeRepository :: Prelude.Maybe Prelude.Text,
    -- | The name of a notebook instance lifecycle configuration associated with
    -- this notebook instance.
    --
    -- For information about notebook instance lifestyle configurations, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html Step 2.1: (Optional) Customize a Notebook Instance>.
    NotebookInstanceSummary -> Maybe Text
notebookInstanceLifecycleConfigName :: Prelude.Maybe Prelude.Text,
    -- | The name of the notebook instance that you want a summary for.
    NotebookInstanceSummary -> Text
notebookInstanceName :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the notebook instance.
    NotebookInstanceSummary -> Text
notebookInstanceArn :: Prelude.Text
  }
  deriving (NotebookInstanceSummary -> NotebookInstanceSummary -> Bool
(NotebookInstanceSummary -> NotebookInstanceSummary -> Bool)
-> (NotebookInstanceSummary -> NotebookInstanceSummary -> Bool)
-> Eq NotebookInstanceSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NotebookInstanceSummary -> NotebookInstanceSummary -> Bool
$c/= :: NotebookInstanceSummary -> NotebookInstanceSummary -> Bool
== :: NotebookInstanceSummary -> NotebookInstanceSummary -> Bool
$c== :: NotebookInstanceSummary -> NotebookInstanceSummary -> Bool
Prelude.Eq, ReadPrec [NotebookInstanceSummary]
ReadPrec NotebookInstanceSummary
Int -> ReadS NotebookInstanceSummary
ReadS [NotebookInstanceSummary]
(Int -> ReadS NotebookInstanceSummary)
-> ReadS [NotebookInstanceSummary]
-> ReadPrec NotebookInstanceSummary
-> ReadPrec [NotebookInstanceSummary]
-> Read NotebookInstanceSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NotebookInstanceSummary]
$creadListPrec :: ReadPrec [NotebookInstanceSummary]
readPrec :: ReadPrec NotebookInstanceSummary
$creadPrec :: ReadPrec NotebookInstanceSummary
readList :: ReadS [NotebookInstanceSummary]
$creadList :: ReadS [NotebookInstanceSummary]
readsPrec :: Int -> ReadS NotebookInstanceSummary
$creadsPrec :: Int -> ReadS NotebookInstanceSummary
Prelude.Read, Int -> NotebookInstanceSummary -> ShowS
[NotebookInstanceSummary] -> ShowS
NotebookInstanceSummary -> String
(Int -> NotebookInstanceSummary -> ShowS)
-> (NotebookInstanceSummary -> String)
-> ([NotebookInstanceSummary] -> ShowS)
-> Show NotebookInstanceSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NotebookInstanceSummary] -> ShowS
$cshowList :: [NotebookInstanceSummary] -> ShowS
show :: NotebookInstanceSummary -> String
$cshow :: NotebookInstanceSummary -> String
showsPrec :: Int -> NotebookInstanceSummary -> ShowS
$cshowsPrec :: Int -> NotebookInstanceSummary -> ShowS
Prelude.Show, (forall x.
 NotebookInstanceSummary -> Rep NotebookInstanceSummary x)
-> (forall x.
    Rep NotebookInstanceSummary x -> NotebookInstanceSummary)
-> Generic NotebookInstanceSummary
forall x. Rep NotebookInstanceSummary x -> NotebookInstanceSummary
forall x. NotebookInstanceSummary -> Rep NotebookInstanceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NotebookInstanceSummary x -> NotebookInstanceSummary
$cfrom :: forall x. NotebookInstanceSummary -> Rep NotebookInstanceSummary x
Prelude.Generic)

-- |
-- Create a value of 'NotebookInstanceSummary' 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:
--
-- 'creationTime', 'notebookInstanceSummary_creationTime' - A timestamp that shows when the notebook instance was created.
--
-- 'additionalCodeRepositories', 'notebookInstanceSummary_additionalCodeRepositories' - An array of up to three Git repositories associated with the notebook
-- instance. These can be either the names of Git repositories stored as
-- resources in your account, or the URL of Git repositories in
-- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
-- or in any other Git repository. These repositories are cloned at the
-- same level as the default repository of your notebook instance. For more
-- information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with Amazon SageMaker Notebook Instances>.
--
-- 'url', 'notebookInstanceSummary_url' - The URL that you use to connect to the Jupyter instance running in your
-- notebook instance.
--
-- 'lastModifiedTime', 'notebookInstanceSummary_lastModifiedTime' - A timestamp that shows when the notebook instance was last modified.
--
-- 'instanceType', 'notebookInstanceSummary_instanceType' - The type of ML compute instance that the notebook instance is running
-- on.
--
-- 'notebookInstanceStatus', 'notebookInstanceSummary_notebookInstanceStatus' - The status of the notebook instance.
--
-- 'defaultCodeRepository', 'notebookInstanceSummary_defaultCodeRepository' - The Git repository associated with the notebook instance as its default
-- code repository. This can be either the name of a Git repository stored
-- as a resource in your account, or the URL of a Git repository in
-- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
-- or in any other Git repository. When you open a notebook instance, it
-- opens in the directory that contains this repository. For more
-- information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with Amazon SageMaker Notebook Instances>.
--
-- 'notebookInstanceLifecycleConfigName', 'notebookInstanceSummary_notebookInstanceLifecycleConfigName' - The name of a notebook instance lifecycle configuration associated with
-- this notebook instance.
--
-- For information about notebook instance lifestyle configurations, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html Step 2.1: (Optional) Customize a Notebook Instance>.
--
-- 'notebookInstanceName', 'notebookInstanceSummary_notebookInstanceName' - The name of the notebook instance that you want a summary for.
--
-- 'notebookInstanceArn', 'notebookInstanceSummary_notebookInstanceArn' - The Amazon Resource Name (ARN) of the notebook instance.
newNotebookInstanceSummary ::
  -- | 'notebookInstanceName'
  Prelude.Text ->
  -- | 'notebookInstanceArn'
  Prelude.Text ->
  NotebookInstanceSummary
newNotebookInstanceSummary :: Text -> Text -> NotebookInstanceSummary
newNotebookInstanceSummary
  Text
pNotebookInstanceName_
  Text
pNotebookInstanceArn_ =
    NotebookInstanceSummary' :: Maybe POSIX
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe InstanceType
-> Maybe NotebookInstanceStatus
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> NotebookInstanceSummary
NotebookInstanceSummary'
      { $sel:creationTime:NotebookInstanceSummary' :: Maybe POSIX
creationTime =
          Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:additionalCodeRepositories:NotebookInstanceSummary' :: Maybe [Text]
additionalCodeRepositories = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
        $sel:url:NotebookInstanceSummary' :: Maybe Text
url = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:lastModifiedTime:NotebookInstanceSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
        $sel:instanceType:NotebookInstanceSummary' :: Maybe InstanceType
instanceType = Maybe InstanceType
forall a. Maybe a
Prelude.Nothing,
        $sel:notebookInstanceStatus:NotebookInstanceSummary' :: Maybe NotebookInstanceStatus
notebookInstanceStatus = Maybe NotebookInstanceStatus
forall a. Maybe a
Prelude.Nothing,
        $sel:defaultCodeRepository:NotebookInstanceSummary' :: Maybe Text
defaultCodeRepository = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:notebookInstanceLifecycleConfigName:NotebookInstanceSummary' :: Maybe Text
notebookInstanceLifecycleConfigName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:notebookInstanceName:NotebookInstanceSummary' :: Text
notebookInstanceName = Text
pNotebookInstanceName_,
        $sel:notebookInstanceArn:NotebookInstanceSummary' :: Text
notebookInstanceArn = Text
pNotebookInstanceArn_
      }

-- | A timestamp that shows when the notebook instance was created.
notebookInstanceSummary_creationTime :: Lens.Lens' NotebookInstanceSummary (Prelude.Maybe Prelude.UTCTime)
notebookInstanceSummary_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_creationTime = (NotebookInstanceSummary -> Maybe POSIX)
-> (NotebookInstanceSummary
    -> Maybe POSIX -> NotebookInstanceSummary)
-> Lens
     NotebookInstanceSummary
     NotebookInstanceSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:NotebookInstanceSummary' :: NotebookInstanceSummary -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Maybe POSIX
a -> NotebookInstanceSummary
s {$sel:creationTime:NotebookInstanceSummary' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: NotebookInstanceSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> NotebookInstanceSummary -> f NotebookInstanceSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> NotebookInstanceSummary
-> f NotebookInstanceSummary
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

-- | An array of up to three Git repositories associated with the notebook
-- instance. These can be either the names of Git repositories stored as
-- resources in your account, or the URL of Git repositories in
-- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
-- or in any other Git repository. These repositories are cloned at the
-- same level as the default repository of your notebook instance. For more
-- information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with Amazon SageMaker Notebook Instances>.
notebookInstanceSummary_additionalCodeRepositories :: Lens.Lens' NotebookInstanceSummary (Prelude.Maybe [Prelude.Text])
notebookInstanceSummary_additionalCodeRepositories :: (Maybe [Text] -> f (Maybe [Text]))
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_additionalCodeRepositories = (NotebookInstanceSummary -> Maybe [Text])
-> (NotebookInstanceSummary
    -> Maybe [Text] -> NotebookInstanceSummary)
-> Lens
     NotebookInstanceSummary
     NotebookInstanceSummary
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Maybe [Text]
additionalCodeRepositories :: Maybe [Text]
$sel:additionalCodeRepositories:NotebookInstanceSummary' :: NotebookInstanceSummary -> Maybe [Text]
additionalCodeRepositories} -> Maybe [Text]
additionalCodeRepositories) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Maybe [Text]
a -> NotebookInstanceSummary
s {$sel:additionalCodeRepositories:NotebookInstanceSummary' :: Maybe [Text]
additionalCodeRepositories = Maybe [Text]
a} :: NotebookInstanceSummary) ((Maybe [Text] -> f (Maybe [Text]))
 -> NotebookInstanceSummary -> f NotebookInstanceSummary)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> NotebookInstanceSummary
-> f NotebookInstanceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The URL that you use to connect to the Jupyter instance running in your
-- notebook instance.
notebookInstanceSummary_url :: Lens.Lens' NotebookInstanceSummary (Prelude.Maybe Prelude.Text)
notebookInstanceSummary_url :: (Maybe Text -> f (Maybe Text))
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_url = (NotebookInstanceSummary -> Maybe Text)
-> (NotebookInstanceSummary
    -> Maybe Text -> NotebookInstanceSummary)
-> Lens
     NotebookInstanceSummary
     NotebookInstanceSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Maybe Text
url :: Maybe Text
$sel:url:NotebookInstanceSummary' :: NotebookInstanceSummary -> Maybe Text
url} -> Maybe Text
url) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Maybe Text
a -> NotebookInstanceSummary
s {$sel:url:NotebookInstanceSummary' :: Maybe Text
url = Maybe Text
a} :: NotebookInstanceSummary)

-- | A timestamp that shows when the notebook instance was last modified.
notebookInstanceSummary_lastModifiedTime :: Lens.Lens' NotebookInstanceSummary (Prelude.Maybe Prelude.UTCTime)
notebookInstanceSummary_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_lastModifiedTime = (NotebookInstanceSummary -> Maybe POSIX)
-> (NotebookInstanceSummary
    -> Maybe POSIX -> NotebookInstanceSummary)
-> Lens
     NotebookInstanceSummary
     NotebookInstanceSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:NotebookInstanceSummary' :: NotebookInstanceSummary -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Maybe POSIX
a -> NotebookInstanceSummary
s {$sel:lastModifiedTime:NotebookInstanceSummary' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: NotebookInstanceSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> NotebookInstanceSummary -> f NotebookInstanceSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> NotebookInstanceSummary
-> f NotebookInstanceSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The type of ML compute instance that the notebook instance is running
-- on.
notebookInstanceSummary_instanceType :: Lens.Lens' NotebookInstanceSummary (Prelude.Maybe InstanceType)
notebookInstanceSummary_instanceType :: (Maybe InstanceType -> f (Maybe InstanceType))
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_instanceType = (NotebookInstanceSummary -> Maybe InstanceType)
-> (NotebookInstanceSummary
    -> Maybe InstanceType -> NotebookInstanceSummary)
-> Lens
     NotebookInstanceSummary
     NotebookInstanceSummary
     (Maybe InstanceType)
     (Maybe InstanceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Maybe InstanceType
instanceType :: Maybe InstanceType
$sel:instanceType:NotebookInstanceSummary' :: NotebookInstanceSummary -> Maybe InstanceType
instanceType} -> Maybe InstanceType
instanceType) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Maybe InstanceType
a -> NotebookInstanceSummary
s {$sel:instanceType:NotebookInstanceSummary' :: Maybe InstanceType
instanceType = Maybe InstanceType
a} :: NotebookInstanceSummary)

-- | The status of the notebook instance.
notebookInstanceSummary_notebookInstanceStatus :: Lens.Lens' NotebookInstanceSummary (Prelude.Maybe NotebookInstanceStatus)
notebookInstanceSummary_notebookInstanceStatus :: (Maybe NotebookInstanceStatus -> f (Maybe NotebookInstanceStatus))
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_notebookInstanceStatus = (NotebookInstanceSummary -> Maybe NotebookInstanceStatus)
-> (NotebookInstanceSummary
    -> Maybe NotebookInstanceStatus -> NotebookInstanceSummary)
-> Lens
     NotebookInstanceSummary
     NotebookInstanceSummary
     (Maybe NotebookInstanceStatus)
     (Maybe NotebookInstanceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Maybe NotebookInstanceStatus
notebookInstanceStatus :: Maybe NotebookInstanceStatus
$sel:notebookInstanceStatus:NotebookInstanceSummary' :: NotebookInstanceSummary -> Maybe NotebookInstanceStatus
notebookInstanceStatus} -> Maybe NotebookInstanceStatus
notebookInstanceStatus) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Maybe NotebookInstanceStatus
a -> NotebookInstanceSummary
s {$sel:notebookInstanceStatus:NotebookInstanceSummary' :: Maybe NotebookInstanceStatus
notebookInstanceStatus = Maybe NotebookInstanceStatus
a} :: NotebookInstanceSummary)

-- | The Git repository associated with the notebook instance as its default
-- code repository. This can be either the name of a Git repository stored
-- as a resource in your account, or the URL of a Git repository in
-- <https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html Amazon Web Services CodeCommit>
-- or in any other Git repository. When you open a notebook instance, it
-- opens in the directory that contains this repository. For more
-- information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/nbi-git-repo.html Associating Git Repositories with Amazon SageMaker Notebook Instances>.
notebookInstanceSummary_defaultCodeRepository :: Lens.Lens' NotebookInstanceSummary (Prelude.Maybe Prelude.Text)
notebookInstanceSummary_defaultCodeRepository :: (Maybe Text -> f (Maybe Text))
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_defaultCodeRepository = (NotebookInstanceSummary -> Maybe Text)
-> (NotebookInstanceSummary
    -> Maybe Text -> NotebookInstanceSummary)
-> Lens
     NotebookInstanceSummary
     NotebookInstanceSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Maybe Text
defaultCodeRepository :: Maybe Text
$sel:defaultCodeRepository:NotebookInstanceSummary' :: NotebookInstanceSummary -> Maybe Text
defaultCodeRepository} -> Maybe Text
defaultCodeRepository) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Maybe Text
a -> NotebookInstanceSummary
s {$sel:defaultCodeRepository:NotebookInstanceSummary' :: Maybe Text
defaultCodeRepository = Maybe Text
a} :: NotebookInstanceSummary)

-- | The name of a notebook instance lifecycle configuration associated with
-- this notebook instance.
--
-- For information about notebook instance lifestyle configurations, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html Step 2.1: (Optional) Customize a Notebook Instance>.
notebookInstanceSummary_notebookInstanceLifecycleConfigName :: Lens.Lens' NotebookInstanceSummary (Prelude.Maybe Prelude.Text)
notebookInstanceSummary_notebookInstanceLifecycleConfigName :: (Maybe Text -> f (Maybe Text))
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_notebookInstanceLifecycleConfigName = (NotebookInstanceSummary -> Maybe Text)
-> (NotebookInstanceSummary
    -> Maybe Text -> NotebookInstanceSummary)
-> Lens
     NotebookInstanceSummary
     NotebookInstanceSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Maybe Text
notebookInstanceLifecycleConfigName :: Maybe Text
$sel:notebookInstanceLifecycleConfigName:NotebookInstanceSummary' :: NotebookInstanceSummary -> Maybe Text
notebookInstanceLifecycleConfigName} -> Maybe Text
notebookInstanceLifecycleConfigName) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Maybe Text
a -> NotebookInstanceSummary
s {$sel:notebookInstanceLifecycleConfigName:NotebookInstanceSummary' :: Maybe Text
notebookInstanceLifecycleConfigName = Maybe Text
a} :: NotebookInstanceSummary)

-- | The name of the notebook instance that you want a summary for.
notebookInstanceSummary_notebookInstanceName :: Lens.Lens' NotebookInstanceSummary Prelude.Text
notebookInstanceSummary_notebookInstanceName :: (Text -> f Text)
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_notebookInstanceName = (NotebookInstanceSummary -> Text)
-> (NotebookInstanceSummary -> Text -> NotebookInstanceSummary)
-> Lens NotebookInstanceSummary NotebookInstanceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Text
notebookInstanceName :: Text
$sel:notebookInstanceName:NotebookInstanceSummary' :: NotebookInstanceSummary -> Text
notebookInstanceName} -> Text
notebookInstanceName) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Text
a -> NotebookInstanceSummary
s {$sel:notebookInstanceName:NotebookInstanceSummary' :: Text
notebookInstanceName = Text
a} :: NotebookInstanceSummary)

-- | The Amazon Resource Name (ARN) of the notebook instance.
notebookInstanceSummary_notebookInstanceArn :: Lens.Lens' NotebookInstanceSummary Prelude.Text
notebookInstanceSummary_notebookInstanceArn :: (Text -> f Text)
-> NotebookInstanceSummary -> f NotebookInstanceSummary
notebookInstanceSummary_notebookInstanceArn = (NotebookInstanceSummary -> Text)
-> (NotebookInstanceSummary -> Text -> NotebookInstanceSummary)
-> Lens NotebookInstanceSummary NotebookInstanceSummary Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NotebookInstanceSummary' {Text
notebookInstanceArn :: Text
$sel:notebookInstanceArn:NotebookInstanceSummary' :: NotebookInstanceSummary -> Text
notebookInstanceArn} -> Text
notebookInstanceArn) (\s :: NotebookInstanceSummary
s@NotebookInstanceSummary' {} Text
a -> NotebookInstanceSummary
s {$sel:notebookInstanceArn:NotebookInstanceSummary' :: Text
notebookInstanceArn = Text
a} :: NotebookInstanceSummary)

instance Core.FromJSON NotebookInstanceSummary where
  parseJSON :: Value -> Parser NotebookInstanceSummary
parseJSON =
    String
-> (Object -> Parser NotebookInstanceSummary)
-> Value
-> Parser NotebookInstanceSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"NotebookInstanceSummary"
      ( \Object
x ->
          Maybe POSIX
-> Maybe [Text]
-> Maybe Text
-> Maybe POSIX
-> Maybe InstanceType
-> Maybe NotebookInstanceStatus
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> NotebookInstanceSummary
NotebookInstanceSummary'
            (Maybe POSIX
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe InstanceType
 -> Maybe NotebookInstanceStatus
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> Text
 -> NotebookInstanceSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [Text]
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe InstanceType
      -> Maybe NotebookInstanceStatus
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> NotebookInstanceSummary)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
            Parser
  (Maybe [Text]
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe InstanceType
   -> Maybe NotebookInstanceStatus
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> NotebookInstanceSummary)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe InstanceType
      -> Maybe NotebookInstanceStatus
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> NotebookInstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AdditionalCodeRepositories"
                            Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe InstanceType
   -> Maybe NotebookInstanceStatus
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> NotebookInstanceSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe InstanceType
      -> Maybe NotebookInstanceStatus
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> NotebookInstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Url")
            Parser
  (Maybe POSIX
   -> Maybe InstanceType
   -> Maybe NotebookInstanceStatus
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> NotebookInstanceSummary)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe InstanceType
      -> Maybe NotebookInstanceStatus
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> NotebookInstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastModifiedTime")
            Parser
  (Maybe InstanceType
   -> Maybe NotebookInstanceStatus
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> NotebookInstanceSummary)
-> Parser (Maybe InstanceType)
-> Parser
     (Maybe NotebookInstanceStatus
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> Text
      -> NotebookInstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe InstanceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstanceType")
            Parser
  (Maybe NotebookInstanceStatus
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> Text
   -> NotebookInstanceSummary)
-> Parser (Maybe NotebookInstanceStatus)
-> Parser
     (Maybe Text
      -> Maybe Text -> Text -> Text -> NotebookInstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NotebookInstanceStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotebookInstanceStatus")
            Parser
  (Maybe Text
   -> Maybe Text -> Text -> Text -> NotebookInstanceSummary)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> Text -> NotebookInstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DefaultCodeRepository")
            Parser (Maybe Text -> Text -> Text -> NotebookInstanceSummary)
-> Parser (Maybe Text)
-> Parser (Text -> Text -> NotebookInstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotebookInstanceLifecycleConfigName")
            Parser (Text -> Text -> NotebookInstanceSummary)
-> Parser Text -> Parser (Text -> NotebookInstanceSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"NotebookInstanceName")
            Parser (Text -> NotebookInstanceSummary)
-> Parser Text -> Parser NotebookInstanceSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"NotebookInstanceArn")
      )

instance Prelude.Hashable NotebookInstanceSummary

instance Prelude.NFData NotebookInstanceSummary