{-# 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.UpdateNotebookInstance
-- 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)
--
-- Updates a notebook instance. NotebookInstance updates include upgrading
-- or downgrading the ML compute instance used for your notebook instance
-- to accommodate changes in your workload requirements.
module Amazonka.SageMaker.UpdateNotebookInstance
  ( -- * Creating a Request
    UpdateNotebookInstance (..),
    newUpdateNotebookInstance,

    -- * Request Lenses
    updateNotebookInstance_acceleratorTypes,
    updateNotebookInstance_disassociateAdditionalCodeRepositories,
    updateNotebookInstance_additionalCodeRepositories,
    updateNotebookInstance_lifecycleConfigName,
    updateNotebookInstance_disassociateLifecycleConfig,
    updateNotebookInstance_disassociateDefaultCodeRepository,
    updateNotebookInstance_instanceType,
    updateNotebookInstance_defaultCodeRepository,
    updateNotebookInstance_volumeSizeInGB,
    updateNotebookInstance_rootAccess,
    updateNotebookInstance_disassociateAcceleratorTypes,
    updateNotebookInstance_roleArn,
    updateNotebookInstance_notebookInstanceName,

    -- * Destructuring the Response
    UpdateNotebookInstanceResponse (..),
    newUpdateNotebookInstanceResponse,

    -- * Response Lenses
    updateNotebookInstanceResponse_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:/ 'newUpdateNotebookInstance' smart constructor.
data UpdateNotebookInstance = UpdateNotebookInstance'
  { -- | A list of the Elastic Inference (EI) instance types to associate with
    -- this notebook instance. Currently only one EI instance type can be
    -- associated with a notebook instance. For more information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html Using Elastic Inference in Amazon SageMaker>.
    UpdateNotebookInstance -> Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes :: Prelude.Maybe [NotebookInstanceAcceleratorType],
    -- | A list of names or URLs of the default Git repositories to remove from
    -- this notebook instance. This operation is idempotent. If you specify a
    -- Git repository that is not associated with the notebook instance when
    -- you call this method, it does not throw an error.
    UpdateNotebookInstance -> Maybe Bool
disassociateAdditionalCodeRepositories :: Prelude.Maybe Prelude.Bool,
    -- | An array of up to three Git repositories to associate 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>.
    UpdateNotebookInstance -> Maybe [Text]
additionalCodeRepositories :: Prelude.Maybe [Prelude.Text],
    -- | The name of a lifecycle configuration to associate with the notebook
    -- instance. For information about lifestyle configurations, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html Step 2.1: (Optional) Customize a Notebook Instance>.
    UpdateNotebookInstance -> Maybe Text
lifecycleConfigName :: Prelude.Maybe Prelude.Text,
    -- | Set to @true@ to remove the notebook instance lifecycle configuration
    -- currently associated with the notebook instance. This operation is
    -- idempotent. If you specify a lifecycle configuration that is not
    -- associated with the notebook instance when you call this method, it does
    -- not throw an error.
    UpdateNotebookInstance -> Maybe Bool
disassociateLifecycleConfig :: Prelude.Maybe Prelude.Bool,
    -- | The name or URL of the default Git repository to remove from this
    -- notebook instance. This operation is idempotent. If you specify a Git
    -- repository that is not associated with the notebook instance when you
    -- call this method, it does not throw an error.
    UpdateNotebookInstance -> Maybe Bool
disassociateDefaultCodeRepository :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon ML compute instance type.
    UpdateNotebookInstance -> Maybe InstanceType
instanceType :: Prelude.Maybe InstanceType,
    -- | The Git repository to associate 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>.
    UpdateNotebookInstance -> Maybe Text
defaultCodeRepository :: Prelude.Maybe Prelude.Text,
    -- | The size, in GB, of the ML storage volume to attach to the notebook
    -- instance. The default value is 5 GB. ML storage volumes are encrypted,
    -- so Amazon SageMaker can\'t determine the amount of available free space
    -- on the volume. Because of this, you can increase the volume size when
    -- you update a notebook instance, but you can\'t decrease the volume size.
    -- If you want to decrease the size of the ML storage volume in use, create
    -- a new notebook instance with the desired size.
    UpdateNotebookInstance -> Maybe Natural
volumeSizeInGB :: Prelude.Maybe Prelude.Natural,
    -- | Whether root access is enabled or disabled for users of the notebook
    -- instance. The default value is @Enabled@.
    --
    -- If you set this to @Disabled@, users don\'t have root access on the
    -- notebook instance, but lifecycle configuration scripts still run with
    -- root permissions.
    UpdateNotebookInstance -> Maybe RootAccess
rootAccess :: Prelude.Maybe RootAccess,
    -- | A list of the Elastic Inference (EI) instance types to remove from this
    -- notebook instance. This operation is idempotent. If you specify an
    -- accelerator type that is not associated with the notebook instance when
    -- you call this method, it does not throw an error.
    UpdateNotebookInstance -> Maybe Bool
disassociateAcceleratorTypes :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can
    -- assume to access the notebook instance. For more information, see
    -- <https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html Amazon SageMaker Roles>.
    --
    -- To be able to pass this role to Amazon SageMaker, the caller of this API
    -- must have the @iam:PassRole@ permission.
    UpdateNotebookInstance -> Maybe Text
roleArn :: Prelude.Maybe Prelude.Text,
    -- | The name of the notebook instance to update.
    UpdateNotebookInstance -> Text
notebookInstanceName :: Prelude.Text
  }
  deriving (UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
(UpdateNotebookInstance -> UpdateNotebookInstance -> Bool)
-> (UpdateNotebookInstance -> UpdateNotebookInstance -> Bool)
-> Eq UpdateNotebookInstance
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
$c/= :: UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
== :: UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
$c== :: UpdateNotebookInstance -> UpdateNotebookInstance -> Bool
Prelude.Eq, ReadPrec [UpdateNotebookInstance]
ReadPrec UpdateNotebookInstance
Int -> ReadS UpdateNotebookInstance
ReadS [UpdateNotebookInstance]
(Int -> ReadS UpdateNotebookInstance)
-> ReadS [UpdateNotebookInstance]
-> ReadPrec UpdateNotebookInstance
-> ReadPrec [UpdateNotebookInstance]
-> Read UpdateNotebookInstance
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNotebookInstance]
$creadListPrec :: ReadPrec [UpdateNotebookInstance]
readPrec :: ReadPrec UpdateNotebookInstance
$creadPrec :: ReadPrec UpdateNotebookInstance
readList :: ReadS [UpdateNotebookInstance]
$creadList :: ReadS [UpdateNotebookInstance]
readsPrec :: Int -> ReadS UpdateNotebookInstance
$creadsPrec :: Int -> ReadS UpdateNotebookInstance
Prelude.Read, Int -> UpdateNotebookInstance -> ShowS
[UpdateNotebookInstance] -> ShowS
UpdateNotebookInstance -> String
(Int -> UpdateNotebookInstance -> ShowS)
-> (UpdateNotebookInstance -> String)
-> ([UpdateNotebookInstance] -> ShowS)
-> Show UpdateNotebookInstance
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNotebookInstance] -> ShowS
$cshowList :: [UpdateNotebookInstance] -> ShowS
show :: UpdateNotebookInstance -> String
$cshow :: UpdateNotebookInstance -> String
showsPrec :: Int -> UpdateNotebookInstance -> ShowS
$cshowsPrec :: Int -> UpdateNotebookInstance -> ShowS
Prelude.Show, (forall x. UpdateNotebookInstance -> Rep UpdateNotebookInstance x)
-> (forall x.
    Rep UpdateNotebookInstance x -> UpdateNotebookInstance)
-> Generic UpdateNotebookInstance
forall x. Rep UpdateNotebookInstance x -> UpdateNotebookInstance
forall x. UpdateNotebookInstance -> Rep UpdateNotebookInstance x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateNotebookInstance x -> UpdateNotebookInstance
$cfrom :: forall x. UpdateNotebookInstance -> Rep UpdateNotebookInstance x
Prelude.Generic)

-- |
-- Create a value of 'UpdateNotebookInstance' 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:
--
-- 'acceleratorTypes', 'updateNotebookInstance_acceleratorTypes' - A list of the Elastic Inference (EI) instance types to associate with
-- this notebook instance. Currently only one EI instance type can be
-- associated with a notebook instance. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html Using Elastic Inference in Amazon SageMaker>.
--
-- 'disassociateAdditionalCodeRepositories', 'updateNotebookInstance_disassociateAdditionalCodeRepositories' - A list of names or URLs of the default Git repositories to remove from
-- this notebook instance. This operation is idempotent. If you specify a
-- Git repository that is not associated with the notebook instance when
-- you call this method, it does not throw an error.
--
-- 'additionalCodeRepositories', 'updateNotebookInstance_additionalCodeRepositories' - An array of up to three Git repositories to associate 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>.
--
-- 'lifecycleConfigName', 'updateNotebookInstance_lifecycleConfigName' - The name of a lifecycle configuration to associate with the notebook
-- instance. For information about lifestyle configurations, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html Step 2.1: (Optional) Customize a Notebook Instance>.
--
-- 'disassociateLifecycleConfig', 'updateNotebookInstance_disassociateLifecycleConfig' - Set to @true@ to remove the notebook instance lifecycle configuration
-- currently associated with the notebook instance. This operation is
-- idempotent. If you specify a lifecycle configuration that is not
-- associated with the notebook instance when you call this method, it does
-- not throw an error.
--
-- 'disassociateDefaultCodeRepository', 'updateNotebookInstance_disassociateDefaultCodeRepository' - The name or URL of the default Git repository to remove from this
-- notebook instance. This operation is idempotent. If you specify a Git
-- repository that is not associated with the notebook instance when you
-- call this method, it does not throw an error.
--
-- 'instanceType', 'updateNotebookInstance_instanceType' - The Amazon ML compute instance type.
--
-- 'defaultCodeRepository', 'updateNotebookInstance_defaultCodeRepository' - The Git repository to associate 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>.
--
-- 'volumeSizeInGB', 'updateNotebookInstance_volumeSizeInGB' - The size, in GB, of the ML storage volume to attach to the notebook
-- instance. The default value is 5 GB. ML storage volumes are encrypted,
-- so Amazon SageMaker can\'t determine the amount of available free space
-- on the volume. Because of this, you can increase the volume size when
-- you update a notebook instance, but you can\'t decrease the volume size.
-- If you want to decrease the size of the ML storage volume in use, create
-- a new notebook instance with the desired size.
--
-- 'rootAccess', 'updateNotebookInstance_rootAccess' - Whether root access is enabled or disabled for users of the notebook
-- instance. The default value is @Enabled@.
--
-- If you set this to @Disabled@, users don\'t have root access on the
-- notebook instance, but lifecycle configuration scripts still run with
-- root permissions.
--
-- 'disassociateAcceleratorTypes', 'updateNotebookInstance_disassociateAcceleratorTypes' - A list of the Elastic Inference (EI) instance types to remove from this
-- notebook instance. This operation is idempotent. If you specify an
-- accelerator type that is not associated with the notebook instance when
-- you call this method, it does not throw an error.
--
-- 'roleArn', 'updateNotebookInstance_roleArn' - The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can
-- assume to access the notebook instance. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html Amazon SageMaker Roles>.
--
-- To be able to pass this role to Amazon SageMaker, the caller of this API
-- must have the @iam:PassRole@ permission.
--
-- 'notebookInstanceName', 'updateNotebookInstance_notebookInstanceName' - The name of the notebook instance to update.
newUpdateNotebookInstance ::
  -- | 'notebookInstanceName'
  Prelude.Text ->
  UpdateNotebookInstance
newUpdateNotebookInstance :: Text -> UpdateNotebookInstance
newUpdateNotebookInstance Text
pNotebookInstanceName_ =
  UpdateNotebookInstance' :: Maybe [NotebookInstanceAcceleratorType]
-> Maybe Bool
-> Maybe [Text]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe InstanceType
-> Maybe Text
-> Maybe Natural
-> Maybe RootAccess
-> Maybe Bool
-> Maybe Text
-> Text
-> UpdateNotebookInstance
UpdateNotebookInstance'
    { $sel:acceleratorTypes:UpdateNotebookInstance' :: Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes =
        Maybe [NotebookInstanceAcceleratorType]
forall a. Maybe a
Prelude.Nothing,
      $sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: Maybe Bool
disassociateAdditionalCodeRepositories =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:additionalCodeRepositories:UpdateNotebookInstance' :: Maybe [Text]
additionalCodeRepositories = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:lifecycleConfigName:UpdateNotebookInstance' :: Maybe Text
lifecycleConfigName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: Maybe Bool
disassociateLifecycleConfig = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: Maybe Bool
disassociateDefaultCodeRepository = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:UpdateNotebookInstance' :: Maybe InstanceType
instanceType = Maybe InstanceType
forall a. Maybe a
Prelude.Nothing,
      $sel:defaultCodeRepository:UpdateNotebookInstance' :: Maybe Text
defaultCodeRepository = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:volumeSizeInGB:UpdateNotebookInstance' :: Maybe Natural
volumeSizeInGB = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:rootAccess:UpdateNotebookInstance' :: Maybe RootAccess
rootAccess = Maybe RootAccess
forall a. Maybe a
Prelude.Nothing,
      $sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: Maybe Bool
disassociateAcceleratorTypes = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:roleArn:UpdateNotebookInstance' :: Maybe Text
roleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notebookInstanceName:UpdateNotebookInstance' :: Text
notebookInstanceName = Text
pNotebookInstanceName_
    }

-- | A list of the Elastic Inference (EI) instance types to associate with
-- this notebook instance. Currently only one EI instance type can be
-- associated with a notebook instance. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html Using Elastic Inference in Amazon SageMaker>.
updateNotebookInstance_acceleratorTypes :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe [NotebookInstanceAcceleratorType])
updateNotebookInstance_acceleratorTypes :: (Maybe [NotebookInstanceAcceleratorType]
 -> f (Maybe [NotebookInstanceAcceleratorType]))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_acceleratorTypes = (UpdateNotebookInstance -> Maybe [NotebookInstanceAcceleratorType])
-> (UpdateNotebookInstance
    -> Maybe [NotebookInstanceAcceleratorType]
    -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe [NotebookInstanceAcceleratorType])
     (Maybe [NotebookInstanceAcceleratorType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes :: Maybe [NotebookInstanceAcceleratorType]
$sel:acceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes} -> Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe [NotebookInstanceAcceleratorType]
a -> UpdateNotebookInstance
s {$sel:acceleratorTypes:UpdateNotebookInstance' :: Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes = Maybe [NotebookInstanceAcceleratorType]
a} :: UpdateNotebookInstance) ((Maybe [NotebookInstanceAcceleratorType]
  -> f (Maybe [NotebookInstanceAcceleratorType]))
 -> UpdateNotebookInstance -> f UpdateNotebookInstance)
-> ((Maybe [NotebookInstanceAcceleratorType]
     -> f (Maybe [NotebookInstanceAcceleratorType]))
    -> Maybe [NotebookInstanceAcceleratorType]
    -> f (Maybe [NotebookInstanceAcceleratorType]))
-> (Maybe [NotebookInstanceAcceleratorType]
    -> f (Maybe [NotebookInstanceAcceleratorType]))
-> UpdateNotebookInstance
-> f UpdateNotebookInstance
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [NotebookInstanceAcceleratorType]
  [NotebookInstanceAcceleratorType]
  [NotebookInstanceAcceleratorType]
  [NotebookInstanceAcceleratorType]
-> Iso
     (Maybe [NotebookInstanceAcceleratorType])
     (Maybe [NotebookInstanceAcceleratorType])
     (Maybe [NotebookInstanceAcceleratorType])
     (Maybe [NotebookInstanceAcceleratorType])
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
  [NotebookInstanceAcceleratorType]
  [NotebookInstanceAcceleratorType]
  [NotebookInstanceAcceleratorType]
  [NotebookInstanceAcceleratorType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of names or URLs of the default Git repositories to remove from
-- this notebook instance. This operation is idempotent. If you specify a
-- Git repository that is not associated with the notebook instance when
-- you call this method, it does not throw an error.
updateNotebookInstance_disassociateAdditionalCodeRepositories :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Bool)
updateNotebookInstance_disassociateAdditionalCodeRepositories :: (Maybe Bool -> f (Maybe Bool))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_disassociateAdditionalCodeRepositories = (UpdateNotebookInstance -> Maybe Bool)
-> (UpdateNotebookInstance -> Maybe Bool -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Bool
disassociateAdditionalCodeRepositories :: Maybe Bool
$sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
disassociateAdditionalCodeRepositories} -> Maybe Bool
disassociateAdditionalCodeRepositories) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Bool
a -> UpdateNotebookInstance
s {$sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: Maybe Bool
disassociateAdditionalCodeRepositories = Maybe Bool
a} :: UpdateNotebookInstance)

-- | An array of up to three Git repositories to associate 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>.
updateNotebookInstance_additionalCodeRepositories :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe [Prelude.Text])
updateNotebookInstance_additionalCodeRepositories :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_additionalCodeRepositories = (UpdateNotebookInstance -> Maybe [Text])
-> (UpdateNotebookInstance
    -> Maybe [Text] -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe [Text]
additionalCodeRepositories :: Maybe [Text]
$sel:additionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [Text]
additionalCodeRepositories} -> Maybe [Text]
additionalCodeRepositories) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe [Text]
a -> UpdateNotebookInstance
s {$sel:additionalCodeRepositories:UpdateNotebookInstance' :: Maybe [Text]
additionalCodeRepositories = Maybe [Text]
a} :: UpdateNotebookInstance) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateNotebookInstance -> f UpdateNotebookInstance)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateNotebookInstance
-> f UpdateNotebookInstance
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 name of a lifecycle configuration to associate with the notebook
-- instance. For information about lifestyle configurations, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html Step 2.1: (Optional) Customize a Notebook Instance>.
updateNotebookInstance_lifecycleConfigName :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Text)
updateNotebookInstance_lifecycleConfigName :: (Maybe Text -> f (Maybe Text))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_lifecycleConfigName = (UpdateNotebookInstance -> Maybe Text)
-> (UpdateNotebookInstance -> Maybe Text -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Text
lifecycleConfigName :: Maybe Text
$sel:lifecycleConfigName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
lifecycleConfigName} -> Maybe Text
lifecycleConfigName) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Text
a -> UpdateNotebookInstance
s {$sel:lifecycleConfigName:UpdateNotebookInstance' :: Maybe Text
lifecycleConfigName = Maybe Text
a} :: UpdateNotebookInstance)

-- | Set to @true@ to remove the notebook instance lifecycle configuration
-- currently associated with the notebook instance. This operation is
-- idempotent. If you specify a lifecycle configuration that is not
-- associated with the notebook instance when you call this method, it does
-- not throw an error.
updateNotebookInstance_disassociateLifecycleConfig :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Bool)
updateNotebookInstance_disassociateLifecycleConfig :: (Maybe Bool -> f (Maybe Bool))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_disassociateLifecycleConfig = (UpdateNotebookInstance -> Maybe Bool)
-> (UpdateNotebookInstance -> Maybe Bool -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Bool
disassociateLifecycleConfig :: Maybe Bool
$sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
disassociateLifecycleConfig} -> Maybe Bool
disassociateLifecycleConfig) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Bool
a -> UpdateNotebookInstance
s {$sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: Maybe Bool
disassociateLifecycleConfig = Maybe Bool
a} :: UpdateNotebookInstance)

-- | The name or URL of the default Git repository to remove from this
-- notebook instance. This operation is idempotent. If you specify a Git
-- repository that is not associated with the notebook instance when you
-- call this method, it does not throw an error.
updateNotebookInstance_disassociateDefaultCodeRepository :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Bool)
updateNotebookInstance_disassociateDefaultCodeRepository :: (Maybe Bool -> f (Maybe Bool))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_disassociateDefaultCodeRepository = (UpdateNotebookInstance -> Maybe Bool)
-> (UpdateNotebookInstance -> Maybe Bool -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Bool
disassociateDefaultCodeRepository :: Maybe Bool
$sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
disassociateDefaultCodeRepository} -> Maybe Bool
disassociateDefaultCodeRepository) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Bool
a -> UpdateNotebookInstance
s {$sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: Maybe Bool
disassociateDefaultCodeRepository = Maybe Bool
a} :: UpdateNotebookInstance)

-- | The Amazon ML compute instance type.
updateNotebookInstance_instanceType :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe InstanceType)
updateNotebookInstance_instanceType :: (Maybe InstanceType -> f (Maybe InstanceType))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_instanceType = (UpdateNotebookInstance -> Maybe InstanceType)
-> (UpdateNotebookInstance
    -> Maybe InstanceType -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe InstanceType)
     (Maybe InstanceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe InstanceType
instanceType :: Maybe InstanceType
$sel:instanceType:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe InstanceType
instanceType} -> Maybe InstanceType
instanceType) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe InstanceType
a -> UpdateNotebookInstance
s {$sel:instanceType:UpdateNotebookInstance' :: Maybe InstanceType
instanceType = Maybe InstanceType
a} :: UpdateNotebookInstance)

-- | The Git repository to associate 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>.
updateNotebookInstance_defaultCodeRepository :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Text)
updateNotebookInstance_defaultCodeRepository :: (Maybe Text -> f (Maybe Text))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_defaultCodeRepository = (UpdateNotebookInstance -> Maybe Text)
-> (UpdateNotebookInstance -> Maybe Text -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Text
defaultCodeRepository :: Maybe Text
$sel:defaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
defaultCodeRepository} -> Maybe Text
defaultCodeRepository) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Text
a -> UpdateNotebookInstance
s {$sel:defaultCodeRepository:UpdateNotebookInstance' :: Maybe Text
defaultCodeRepository = Maybe Text
a} :: UpdateNotebookInstance)

-- | The size, in GB, of the ML storage volume to attach to the notebook
-- instance. The default value is 5 GB. ML storage volumes are encrypted,
-- so Amazon SageMaker can\'t determine the amount of available free space
-- on the volume. Because of this, you can increase the volume size when
-- you update a notebook instance, but you can\'t decrease the volume size.
-- If you want to decrease the size of the ML storage volume in use, create
-- a new notebook instance with the desired size.
updateNotebookInstance_volumeSizeInGB :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Natural)
updateNotebookInstance_volumeSizeInGB :: (Maybe Natural -> f (Maybe Natural))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_volumeSizeInGB = (UpdateNotebookInstance -> Maybe Natural)
-> (UpdateNotebookInstance
    -> Maybe Natural -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Natural
volumeSizeInGB :: Maybe Natural
$sel:volumeSizeInGB:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Natural
volumeSizeInGB} -> Maybe Natural
volumeSizeInGB) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Natural
a -> UpdateNotebookInstance
s {$sel:volumeSizeInGB:UpdateNotebookInstance' :: Maybe Natural
volumeSizeInGB = Maybe Natural
a} :: UpdateNotebookInstance)

-- | Whether root access is enabled or disabled for users of the notebook
-- instance. The default value is @Enabled@.
--
-- If you set this to @Disabled@, users don\'t have root access on the
-- notebook instance, but lifecycle configuration scripts still run with
-- root permissions.
updateNotebookInstance_rootAccess :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe RootAccess)
updateNotebookInstance_rootAccess :: (Maybe RootAccess -> f (Maybe RootAccess))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_rootAccess = (UpdateNotebookInstance -> Maybe RootAccess)
-> (UpdateNotebookInstance
    -> Maybe RootAccess -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe RootAccess)
     (Maybe RootAccess)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe RootAccess
rootAccess :: Maybe RootAccess
$sel:rootAccess:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe RootAccess
rootAccess} -> Maybe RootAccess
rootAccess) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe RootAccess
a -> UpdateNotebookInstance
s {$sel:rootAccess:UpdateNotebookInstance' :: Maybe RootAccess
rootAccess = Maybe RootAccess
a} :: UpdateNotebookInstance)

-- | A list of the Elastic Inference (EI) instance types to remove from this
-- notebook instance. This operation is idempotent. If you specify an
-- accelerator type that is not associated with the notebook instance when
-- you call this method, it does not throw an error.
updateNotebookInstance_disassociateAcceleratorTypes :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Bool)
updateNotebookInstance_disassociateAcceleratorTypes :: (Maybe Bool -> f (Maybe Bool))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_disassociateAcceleratorTypes = (UpdateNotebookInstance -> Maybe Bool)
-> (UpdateNotebookInstance -> Maybe Bool -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Bool
disassociateAcceleratorTypes :: Maybe Bool
$sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
disassociateAcceleratorTypes} -> Maybe Bool
disassociateAcceleratorTypes) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Bool
a -> UpdateNotebookInstance
s {$sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: Maybe Bool
disassociateAcceleratorTypes = Maybe Bool
a} :: UpdateNotebookInstance)

-- | The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker can
-- assume to access the notebook instance. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html Amazon SageMaker Roles>.
--
-- To be able to pass this role to Amazon SageMaker, the caller of this API
-- must have the @iam:PassRole@ permission.
updateNotebookInstance_roleArn :: Lens.Lens' UpdateNotebookInstance (Prelude.Maybe Prelude.Text)
updateNotebookInstance_roleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_roleArn = (UpdateNotebookInstance -> Maybe Text)
-> (UpdateNotebookInstance -> Maybe Text -> UpdateNotebookInstance)
-> Lens
     UpdateNotebookInstance
     UpdateNotebookInstance
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Maybe Text
roleArn :: Maybe Text
$sel:roleArn:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
roleArn} -> Maybe Text
roleArn) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Maybe Text
a -> UpdateNotebookInstance
s {$sel:roleArn:UpdateNotebookInstance' :: Maybe Text
roleArn = Maybe Text
a} :: UpdateNotebookInstance)

-- | The name of the notebook instance to update.
updateNotebookInstance_notebookInstanceName :: Lens.Lens' UpdateNotebookInstance Prelude.Text
updateNotebookInstance_notebookInstanceName :: (Text -> f Text)
-> UpdateNotebookInstance -> f UpdateNotebookInstance
updateNotebookInstance_notebookInstanceName = (UpdateNotebookInstance -> Text)
-> (UpdateNotebookInstance -> Text -> UpdateNotebookInstance)
-> Lens UpdateNotebookInstance UpdateNotebookInstance Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNotebookInstance' {Text
notebookInstanceName :: Text
$sel:notebookInstanceName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Text
notebookInstanceName} -> Text
notebookInstanceName) (\s :: UpdateNotebookInstance
s@UpdateNotebookInstance' {} Text
a -> UpdateNotebookInstance
s {$sel:notebookInstanceName:UpdateNotebookInstance' :: Text
notebookInstanceName = Text
a} :: UpdateNotebookInstance)

instance Core.AWSRequest UpdateNotebookInstance where
  type
    AWSResponse UpdateNotebookInstance =
      UpdateNotebookInstanceResponse
  request :: UpdateNotebookInstance -> Request UpdateNotebookInstance
request = Service -> UpdateNotebookInstance -> Request UpdateNotebookInstance
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateNotebookInstance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateNotebookInstance)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse UpdateNotebookInstance))
-> Logger
-> Service
-> Proxy UpdateNotebookInstance
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateNotebookInstance)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> UpdateNotebookInstanceResponse
UpdateNotebookInstanceResponse'
            (Int -> UpdateNotebookInstanceResponse)
-> Either String Int
-> Either String UpdateNotebookInstanceResponse
forall (f :: * -> *) a b. Functor 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 UpdateNotebookInstance

instance Prelude.NFData UpdateNotebookInstance

instance Core.ToHeaders UpdateNotebookInstance where
  toHeaders :: UpdateNotebookInstance -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateNotebookInstance -> 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.UpdateNotebookInstance" ::
                          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 UpdateNotebookInstance where
  toJSON :: UpdateNotebookInstance -> Value
toJSON UpdateNotebookInstance' {Maybe Bool
Maybe Natural
Maybe [Text]
Maybe [NotebookInstanceAcceleratorType]
Maybe Text
Maybe InstanceType
Maybe RootAccess
Text
notebookInstanceName :: Text
roleArn :: Maybe Text
disassociateAcceleratorTypes :: Maybe Bool
rootAccess :: Maybe RootAccess
volumeSizeInGB :: Maybe Natural
defaultCodeRepository :: Maybe Text
instanceType :: Maybe InstanceType
disassociateDefaultCodeRepository :: Maybe Bool
disassociateLifecycleConfig :: Maybe Bool
lifecycleConfigName :: Maybe Text
additionalCodeRepositories :: Maybe [Text]
disassociateAdditionalCodeRepositories :: Maybe Bool
acceleratorTypes :: Maybe [NotebookInstanceAcceleratorType]
$sel:notebookInstanceName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Text
$sel:roleArn:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:disassociateAcceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:rootAccess:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe RootAccess
$sel:volumeSizeInGB:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Natural
$sel:defaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:instanceType:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe InstanceType
$sel:disassociateDefaultCodeRepository:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:disassociateLifecycleConfig:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:lifecycleConfigName:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Text
$sel:additionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [Text]
$sel:disassociateAdditionalCodeRepositories:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe Bool
$sel:acceleratorTypes:UpdateNotebookInstance' :: UpdateNotebookInstance -> Maybe [NotebookInstanceAcceleratorType]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AcceleratorTypes" Text -> [NotebookInstanceAcceleratorType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([NotebookInstanceAcceleratorType] -> Pair)
-> Maybe [NotebookInstanceAcceleratorType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotebookInstanceAcceleratorType]
acceleratorTypes,
            (Text
"DisassociateAdditionalCodeRepositories" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disassociateAdditionalCodeRepositories,
            (Text
"AdditionalCodeRepositories" 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]
additionalCodeRepositories,
            (Text
"LifecycleConfigName" 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
lifecycleConfigName,
            (Text
"DisassociateLifecycleConfig" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disassociateLifecycleConfig,
            (Text
"DisassociateDefaultCodeRepository" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disassociateDefaultCodeRepository,
            (Text
"InstanceType" Text -> InstanceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (InstanceType -> Pair) -> Maybe InstanceType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceType
instanceType,
            (Text
"DefaultCodeRepository" 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
defaultCodeRepository,
            (Text
"VolumeSizeInGB" 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
volumeSizeInGB,
            (Text
"RootAccess" Text -> RootAccess -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (RootAccess -> Pair) -> Maybe RootAccess -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RootAccess
rootAccess,
            (Text
"DisassociateAcceleratorTypes" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
disassociateAcceleratorTypes,
            (Text
"RoleArn" 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
roleArn,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"NotebookInstanceName"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
notebookInstanceName
              )
          ]
      )

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

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

-- | /See:/ 'newUpdateNotebookInstanceResponse' smart constructor.
data UpdateNotebookInstanceResponse = UpdateNotebookInstanceResponse'
  { -- | The response's http status code.
    UpdateNotebookInstanceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
(UpdateNotebookInstanceResponse
 -> UpdateNotebookInstanceResponse -> Bool)
-> (UpdateNotebookInstanceResponse
    -> UpdateNotebookInstanceResponse -> Bool)
-> Eq UpdateNotebookInstanceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
$c/= :: UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
== :: UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
$c== :: UpdateNotebookInstanceResponse
-> UpdateNotebookInstanceResponse -> Bool
Prelude.Eq, ReadPrec [UpdateNotebookInstanceResponse]
ReadPrec UpdateNotebookInstanceResponse
Int -> ReadS UpdateNotebookInstanceResponse
ReadS [UpdateNotebookInstanceResponse]
(Int -> ReadS UpdateNotebookInstanceResponse)
-> ReadS [UpdateNotebookInstanceResponse]
-> ReadPrec UpdateNotebookInstanceResponse
-> ReadPrec [UpdateNotebookInstanceResponse]
-> Read UpdateNotebookInstanceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNotebookInstanceResponse]
$creadListPrec :: ReadPrec [UpdateNotebookInstanceResponse]
readPrec :: ReadPrec UpdateNotebookInstanceResponse
$creadPrec :: ReadPrec UpdateNotebookInstanceResponse
readList :: ReadS [UpdateNotebookInstanceResponse]
$creadList :: ReadS [UpdateNotebookInstanceResponse]
readsPrec :: Int -> ReadS UpdateNotebookInstanceResponse
$creadsPrec :: Int -> ReadS UpdateNotebookInstanceResponse
Prelude.Read, Int -> UpdateNotebookInstanceResponse -> ShowS
[UpdateNotebookInstanceResponse] -> ShowS
UpdateNotebookInstanceResponse -> String
(Int -> UpdateNotebookInstanceResponse -> ShowS)
-> (UpdateNotebookInstanceResponse -> String)
-> ([UpdateNotebookInstanceResponse] -> ShowS)
-> Show UpdateNotebookInstanceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNotebookInstanceResponse] -> ShowS
$cshowList :: [UpdateNotebookInstanceResponse] -> ShowS
show :: UpdateNotebookInstanceResponse -> String
$cshow :: UpdateNotebookInstanceResponse -> String
showsPrec :: Int -> UpdateNotebookInstanceResponse -> ShowS
$cshowsPrec :: Int -> UpdateNotebookInstanceResponse -> ShowS
Prelude.Show, (forall x.
 UpdateNotebookInstanceResponse
 -> Rep UpdateNotebookInstanceResponse x)
-> (forall x.
    Rep UpdateNotebookInstanceResponse x
    -> UpdateNotebookInstanceResponse)
-> Generic UpdateNotebookInstanceResponse
forall x.
Rep UpdateNotebookInstanceResponse x
-> UpdateNotebookInstanceResponse
forall x.
UpdateNotebookInstanceResponse
-> Rep UpdateNotebookInstanceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateNotebookInstanceResponse x
-> UpdateNotebookInstanceResponse
$cfrom :: forall x.
UpdateNotebookInstanceResponse
-> Rep UpdateNotebookInstanceResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateNotebookInstanceResponse' 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:
--
-- 'httpStatus', 'updateNotebookInstanceResponse_httpStatus' - The response's http status code.
newUpdateNotebookInstanceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateNotebookInstanceResponse
newUpdateNotebookInstanceResponse :: Int -> UpdateNotebookInstanceResponse
newUpdateNotebookInstanceResponse Int
pHttpStatus_ =
  UpdateNotebookInstanceResponse' :: Int -> UpdateNotebookInstanceResponse
UpdateNotebookInstanceResponse'
    { $sel:httpStatus:UpdateNotebookInstanceResponse' :: Int
httpStatus =
        Int
pHttpStatus_
    }

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

instance
  Prelude.NFData
    UpdateNotebookInstanceResponse