{-# 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.Glue.UpdateDevEndpoint
-- 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 specified development endpoint.
module Amazonka.Glue.UpdateDevEndpoint
  ( -- * Creating a Request
    UpdateDevEndpoint (..),
    newUpdateDevEndpoint,

    -- * Request Lenses
    updateDevEndpoint_addPublicKeys,
    updateDevEndpoint_customLibraries,
    updateDevEndpoint_publicKey,
    updateDevEndpoint_deleteArguments,
    updateDevEndpoint_deletePublicKeys,
    updateDevEndpoint_updateEtlLibraries,
    updateDevEndpoint_addArguments,
    updateDevEndpoint_endpointName,

    -- * Destructuring the Response
    UpdateDevEndpointResponse (..),
    newUpdateDevEndpointResponse,

    -- * Response Lenses
    updateDevEndpointResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateDevEndpoint' smart constructor.
data UpdateDevEndpoint = UpdateDevEndpoint'
  { -- | The list of public keys for the @DevEndpoint@ to use.
    UpdateDevEndpoint -> Maybe [Text]
addPublicKeys :: Prelude.Maybe [Prelude.Text],
    -- | Custom Python or Java libraries to be loaded in the @DevEndpoint@.
    UpdateDevEndpoint -> Maybe DevEndpointCustomLibraries
customLibraries :: Prelude.Maybe DevEndpointCustomLibraries,
    -- | The public key for the @DevEndpoint@ to use.
    UpdateDevEndpoint -> Maybe Text
publicKey :: Prelude.Maybe Prelude.Text,
    -- | The list of argument keys to be deleted from the map of arguments used
    -- to configure the @DevEndpoint@.
    UpdateDevEndpoint -> Maybe [Text]
deleteArguments :: Prelude.Maybe [Prelude.Text],
    -- | The list of public keys to be deleted from the @DevEndpoint@.
    UpdateDevEndpoint -> Maybe [Text]
deletePublicKeys :: Prelude.Maybe [Prelude.Text],
    -- | @True@ if the list of custom libraries to be loaded in the development
    -- endpoint needs to be updated, or @False@ if otherwise.
    UpdateDevEndpoint -> Maybe Bool
updateEtlLibraries :: Prelude.Maybe Prelude.Bool,
    -- | The map of arguments to add the map of arguments used to configure the
    -- @DevEndpoint@.
    --
    -- Valid arguments are:
    --
    -- -   @\"--enable-glue-datacatalog\": \"\"@
    --
    -- You can specify a version of Python support for development endpoints by
    -- using the @Arguments@ parameter in the @CreateDevEndpoint@ or
    -- @UpdateDevEndpoint@ APIs. If no arguments are provided, the version
    -- defaults to Python 2.
    UpdateDevEndpoint -> Maybe (HashMap Text Text)
addArguments :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the @DevEndpoint@ to be updated.
    UpdateDevEndpoint -> Text
endpointName :: Prelude.Text
  }
  deriving (UpdateDevEndpoint -> UpdateDevEndpoint -> Bool
(UpdateDevEndpoint -> UpdateDevEndpoint -> Bool)
-> (UpdateDevEndpoint -> UpdateDevEndpoint -> Bool)
-> Eq UpdateDevEndpoint
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDevEndpoint -> UpdateDevEndpoint -> Bool
$c/= :: UpdateDevEndpoint -> UpdateDevEndpoint -> Bool
== :: UpdateDevEndpoint -> UpdateDevEndpoint -> Bool
$c== :: UpdateDevEndpoint -> UpdateDevEndpoint -> Bool
Prelude.Eq, ReadPrec [UpdateDevEndpoint]
ReadPrec UpdateDevEndpoint
Int -> ReadS UpdateDevEndpoint
ReadS [UpdateDevEndpoint]
(Int -> ReadS UpdateDevEndpoint)
-> ReadS [UpdateDevEndpoint]
-> ReadPrec UpdateDevEndpoint
-> ReadPrec [UpdateDevEndpoint]
-> Read UpdateDevEndpoint
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDevEndpoint]
$creadListPrec :: ReadPrec [UpdateDevEndpoint]
readPrec :: ReadPrec UpdateDevEndpoint
$creadPrec :: ReadPrec UpdateDevEndpoint
readList :: ReadS [UpdateDevEndpoint]
$creadList :: ReadS [UpdateDevEndpoint]
readsPrec :: Int -> ReadS UpdateDevEndpoint
$creadsPrec :: Int -> ReadS UpdateDevEndpoint
Prelude.Read, Int -> UpdateDevEndpoint -> ShowS
[UpdateDevEndpoint] -> ShowS
UpdateDevEndpoint -> String
(Int -> UpdateDevEndpoint -> ShowS)
-> (UpdateDevEndpoint -> String)
-> ([UpdateDevEndpoint] -> ShowS)
-> Show UpdateDevEndpoint
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDevEndpoint] -> ShowS
$cshowList :: [UpdateDevEndpoint] -> ShowS
show :: UpdateDevEndpoint -> String
$cshow :: UpdateDevEndpoint -> String
showsPrec :: Int -> UpdateDevEndpoint -> ShowS
$cshowsPrec :: Int -> UpdateDevEndpoint -> ShowS
Prelude.Show, (forall x. UpdateDevEndpoint -> Rep UpdateDevEndpoint x)
-> (forall x. Rep UpdateDevEndpoint x -> UpdateDevEndpoint)
-> Generic UpdateDevEndpoint
forall x. Rep UpdateDevEndpoint x -> UpdateDevEndpoint
forall x. UpdateDevEndpoint -> Rep UpdateDevEndpoint x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDevEndpoint x -> UpdateDevEndpoint
$cfrom :: forall x. UpdateDevEndpoint -> Rep UpdateDevEndpoint x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDevEndpoint' 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:
--
-- 'addPublicKeys', 'updateDevEndpoint_addPublicKeys' - The list of public keys for the @DevEndpoint@ to use.
--
-- 'customLibraries', 'updateDevEndpoint_customLibraries' - Custom Python or Java libraries to be loaded in the @DevEndpoint@.
--
-- 'publicKey', 'updateDevEndpoint_publicKey' - The public key for the @DevEndpoint@ to use.
--
-- 'deleteArguments', 'updateDevEndpoint_deleteArguments' - The list of argument keys to be deleted from the map of arguments used
-- to configure the @DevEndpoint@.
--
-- 'deletePublicKeys', 'updateDevEndpoint_deletePublicKeys' - The list of public keys to be deleted from the @DevEndpoint@.
--
-- 'updateEtlLibraries', 'updateDevEndpoint_updateEtlLibraries' - @True@ if the list of custom libraries to be loaded in the development
-- endpoint needs to be updated, or @False@ if otherwise.
--
-- 'addArguments', 'updateDevEndpoint_addArguments' - The map of arguments to add the map of arguments used to configure the
-- @DevEndpoint@.
--
-- Valid arguments are:
--
-- -   @\"--enable-glue-datacatalog\": \"\"@
--
-- You can specify a version of Python support for development endpoints by
-- using the @Arguments@ parameter in the @CreateDevEndpoint@ or
-- @UpdateDevEndpoint@ APIs. If no arguments are provided, the version
-- defaults to Python 2.
--
-- 'endpointName', 'updateDevEndpoint_endpointName' - The name of the @DevEndpoint@ to be updated.
newUpdateDevEndpoint ::
  -- | 'endpointName'
  Prelude.Text ->
  UpdateDevEndpoint
newUpdateDevEndpoint :: Text -> UpdateDevEndpoint
newUpdateDevEndpoint Text
pEndpointName_ =
  UpdateDevEndpoint' :: Maybe [Text]
-> Maybe DevEndpointCustomLibraries
-> Maybe Text
-> Maybe [Text]
-> Maybe [Text]
-> Maybe Bool
-> Maybe (HashMap Text Text)
-> Text
-> UpdateDevEndpoint
UpdateDevEndpoint'
    { $sel:addPublicKeys:UpdateDevEndpoint' :: Maybe [Text]
addPublicKeys = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:customLibraries:UpdateDevEndpoint' :: Maybe DevEndpointCustomLibraries
customLibraries = Maybe DevEndpointCustomLibraries
forall a. Maybe a
Prelude.Nothing,
      $sel:publicKey:UpdateDevEndpoint' :: Maybe Text
publicKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deleteArguments:UpdateDevEndpoint' :: Maybe [Text]
deleteArguments = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:deletePublicKeys:UpdateDevEndpoint' :: Maybe [Text]
deletePublicKeys = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:updateEtlLibraries:UpdateDevEndpoint' :: Maybe Bool
updateEtlLibraries = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:addArguments:UpdateDevEndpoint' :: Maybe (HashMap Text Text)
addArguments = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:endpointName:UpdateDevEndpoint' :: Text
endpointName = Text
pEndpointName_
    }

-- | The list of public keys for the @DevEndpoint@ to use.
updateDevEndpoint_addPublicKeys :: Lens.Lens' UpdateDevEndpoint (Prelude.Maybe [Prelude.Text])
updateDevEndpoint_addPublicKeys :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateDevEndpoint -> f UpdateDevEndpoint
updateDevEndpoint_addPublicKeys = (UpdateDevEndpoint -> Maybe [Text])
-> (UpdateDevEndpoint -> Maybe [Text] -> UpdateDevEndpoint)
-> Lens
     UpdateDevEndpoint UpdateDevEndpoint (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDevEndpoint' {Maybe [Text]
addPublicKeys :: Maybe [Text]
$sel:addPublicKeys:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe [Text]
addPublicKeys} -> Maybe [Text]
addPublicKeys) (\s :: UpdateDevEndpoint
s@UpdateDevEndpoint' {} Maybe [Text]
a -> UpdateDevEndpoint
s {$sel:addPublicKeys:UpdateDevEndpoint' :: Maybe [Text]
addPublicKeys = Maybe [Text]
a} :: UpdateDevEndpoint) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateDevEndpoint -> f UpdateDevEndpoint)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateDevEndpoint
-> f UpdateDevEndpoint
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

-- | Custom Python or Java libraries to be loaded in the @DevEndpoint@.
updateDevEndpoint_customLibraries :: Lens.Lens' UpdateDevEndpoint (Prelude.Maybe DevEndpointCustomLibraries)
updateDevEndpoint_customLibraries :: (Maybe DevEndpointCustomLibraries
 -> f (Maybe DevEndpointCustomLibraries))
-> UpdateDevEndpoint -> f UpdateDevEndpoint
updateDevEndpoint_customLibraries = (UpdateDevEndpoint -> Maybe DevEndpointCustomLibraries)
-> (UpdateDevEndpoint
    -> Maybe DevEndpointCustomLibraries -> UpdateDevEndpoint)
-> Lens
     UpdateDevEndpoint
     UpdateDevEndpoint
     (Maybe DevEndpointCustomLibraries)
     (Maybe DevEndpointCustomLibraries)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDevEndpoint' {Maybe DevEndpointCustomLibraries
customLibraries :: Maybe DevEndpointCustomLibraries
$sel:customLibraries:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe DevEndpointCustomLibraries
customLibraries} -> Maybe DevEndpointCustomLibraries
customLibraries) (\s :: UpdateDevEndpoint
s@UpdateDevEndpoint' {} Maybe DevEndpointCustomLibraries
a -> UpdateDevEndpoint
s {$sel:customLibraries:UpdateDevEndpoint' :: Maybe DevEndpointCustomLibraries
customLibraries = Maybe DevEndpointCustomLibraries
a} :: UpdateDevEndpoint)

-- | The public key for the @DevEndpoint@ to use.
updateDevEndpoint_publicKey :: Lens.Lens' UpdateDevEndpoint (Prelude.Maybe Prelude.Text)
updateDevEndpoint_publicKey :: (Maybe Text -> f (Maybe Text))
-> UpdateDevEndpoint -> f UpdateDevEndpoint
updateDevEndpoint_publicKey = (UpdateDevEndpoint -> Maybe Text)
-> (UpdateDevEndpoint -> Maybe Text -> UpdateDevEndpoint)
-> Lens
     UpdateDevEndpoint UpdateDevEndpoint (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDevEndpoint' {Maybe Text
publicKey :: Maybe Text
$sel:publicKey:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe Text
publicKey} -> Maybe Text
publicKey) (\s :: UpdateDevEndpoint
s@UpdateDevEndpoint' {} Maybe Text
a -> UpdateDevEndpoint
s {$sel:publicKey:UpdateDevEndpoint' :: Maybe Text
publicKey = Maybe Text
a} :: UpdateDevEndpoint)

-- | The list of argument keys to be deleted from the map of arguments used
-- to configure the @DevEndpoint@.
updateDevEndpoint_deleteArguments :: Lens.Lens' UpdateDevEndpoint (Prelude.Maybe [Prelude.Text])
updateDevEndpoint_deleteArguments :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateDevEndpoint -> f UpdateDevEndpoint
updateDevEndpoint_deleteArguments = (UpdateDevEndpoint -> Maybe [Text])
-> (UpdateDevEndpoint -> Maybe [Text] -> UpdateDevEndpoint)
-> Lens
     UpdateDevEndpoint UpdateDevEndpoint (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDevEndpoint' {Maybe [Text]
deleteArguments :: Maybe [Text]
$sel:deleteArguments:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe [Text]
deleteArguments} -> Maybe [Text]
deleteArguments) (\s :: UpdateDevEndpoint
s@UpdateDevEndpoint' {} Maybe [Text]
a -> UpdateDevEndpoint
s {$sel:deleteArguments:UpdateDevEndpoint' :: Maybe [Text]
deleteArguments = Maybe [Text]
a} :: UpdateDevEndpoint) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateDevEndpoint -> f UpdateDevEndpoint)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateDevEndpoint
-> f UpdateDevEndpoint
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 list of public keys to be deleted from the @DevEndpoint@.
updateDevEndpoint_deletePublicKeys :: Lens.Lens' UpdateDevEndpoint (Prelude.Maybe [Prelude.Text])
updateDevEndpoint_deletePublicKeys :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateDevEndpoint -> f UpdateDevEndpoint
updateDevEndpoint_deletePublicKeys = (UpdateDevEndpoint -> Maybe [Text])
-> (UpdateDevEndpoint -> Maybe [Text] -> UpdateDevEndpoint)
-> Lens
     UpdateDevEndpoint UpdateDevEndpoint (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDevEndpoint' {Maybe [Text]
deletePublicKeys :: Maybe [Text]
$sel:deletePublicKeys:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe [Text]
deletePublicKeys} -> Maybe [Text]
deletePublicKeys) (\s :: UpdateDevEndpoint
s@UpdateDevEndpoint' {} Maybe [Text]
a -> UpdateDevEndpoint
s {$sel:deletePublicKeys:UpdateDevEndpoint' :: Maybe [Text]
deletePublicKeys = Maybe [Text]
a} :: UpdateDevEndpoint) ((Maybe [Text] -> f (Maybe [Text]))
 -> UpdateDevEndpoint -> f UpdateDevEndpoint)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateDevEndpoint
-> f UpdateDevEndpoint
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

-- | @True@ if the list of custom libraries to be loaded in the development
-- endpoint needs to be updated, or @False@ if otherwise.
updateDevEndpoint_updateEtlLibraries :: Lens.Lens' UpdateDevEndpoint (Prelude.Maybe Prelude.Bool)
updateDevEndpoint_updateEtlLibraries :: (Maybe Bool -> f (Maybe Bool))
-> UpdateDevEndpoint -> f UpdateDevEndpoint
updateDevEndpoint_updateEtlLibraries = (UpdateDevEndpoint -> Maybe Bool)
-> (UpdateDevEndpoint -> Maybe Bool -> UpdateDevEndpoint)
-> Lens
     UpdateDevEndpoint UpdateDevEndpoint (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDevEndpoint' {Maybe Bool
updateEtlLibraries :: Maybe Bool
$sel:updateEtlLibraries:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe Bool
updateEtlLibraries} -> Maybe Bool
updateEtlLibraries) (\s :: UpdateDevEndpoint
s@UpdateDevEndpoint' {} Maybe Bool
a -> UpdateDevEndpoint
s {$sel:updateEtlLibraries:UpdateDevEndpoint' :: Maybe Bool
updateEtlLibraries = Maybe Bool
a} :: UpdateDevEndpoint)

-- | The map of arguments to add the map of arguments used to configure the
-- @DevEndpoint@.
--
-- Valid arguments are:
--
-- -   @\"--enable-glue-datacatalog\": \"\"@
--
-- You can specify a version of Python support for development endpoints by
-- using the @Arguments@ parameter in the @CreateDevEndpoint@ or
-- @UpdateDevEndpoint@ APIs. If no arguments are provided, the version
-- defaults to Python 2.
updateDevEndpoint_addArguments :: Lens.Lens' UpdateDevEndpoint (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateDevEndpoint_addArguments :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateDevEndpoint -> f UpdateDevEndpoint
updateDevEndpoint_addArguments = (UpdateDevEndpoint -> Maybe (HashMap Text Text))
-> (UpdateDevEndpoint
    -> Maybe (HashMap Text Text) -> UpdateDevEndpoint)
-> Lens
     UpdateDevEndpoint
     UpdateDevEndpoint
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDevEndpoint' {Maybe (HashMap Text Text)
addArguments :: Maybe (HashMap Text Text)
$sel:addArguments:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe (HashMap Text Text)
addArguments} -> Maybe (HashMap Text Text)
addArguments) (\s :: UpdateDevEndpoint
s@UpdateDevEndpoint' {} Maybe (HashMap Text Text)
a -> UpdateDevEndpoint
s {$sel:addArguments:UpdateDevEndpoint' :: Maybe (HashMap Text Text)
addArguments = Maybe (HashMap Text Text)
a} :: UpdateDevEndpoint) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateDevEndpoint -> f UpdateDevEndpoint)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateDevEndpoint
-> f UpdateDevEndpoint
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text 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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the @DevEndpoint@ to be updated.
updateDevEndpoint_endpointName :: Lens.Lens' UpdateDevEndpoint Prelude.Text
updateDevEndpoint_endpointName :: (Text -> f Text) -> UpdateDevEndpoint -> f UpdateDevEndpoint
updateDevEndpoint_endpointName = (UpdateDevEndpoint -> Text)
-> (UpdateDevEndpoint -> Text -> UpdateDevEndpoint)
-> Lens UpdateDevEndpoint UpdateDevEndpoint Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDevEndpoint' {Text
endpointName :: Text
$sel:endpointName:UpdateDevEndpoint' :: UpdateDevEndpoint -> Text
endpointName} -> Text
endpointName) (\s :: UpdateDevEndpoint
s@UpdateDevEndpoint' {} Text
a -> UpdateDevEndpoint
s {$sel:endpointName:UpdateDevEndpoint' :: Text
endpointName = Text
a} :: UpdateDevEndpoint)

instance Core.AWSRequest UpdateDevEndpoint where
  type
    AWSResponse UpdateDevEndpoint =
      UpdateDevEndpointResponse
  request :: UpdateDevEndpoint -> Request UpdateDevEndpoint
request = Service -> UpdateDevEndpoint -> Request UpdateDevEndpoint
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDevEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDevEndpoint)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse UpdateDevEndpoint))
-> Logger
-> Service
-> Proxy UpdateDevEndpoint
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDevEndpoint)))
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 -> UpdateDevEndpointResponse
UpdateDevEndpointResponse'
            (Int -> UpdateDevEndpointResponse)
-> Either String Int -> Either String UpdateDevEndpointResponse
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 UpdateDevEndpoint

instance Prelude.NFData UpdateDevEndpoint

instance Core.ToHeaders UpdateDevEndpoint where
  toHeaders :: UpdateDevEndpoint -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateDevEndpoint -> 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
"AWSGlue.UpdateDevEndpoint" :: 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 UpdateDevEndpoint where
  toJSON :: UpdateDevEndpoint -> Value
toJSON UpdateDevEndpoint' {Maybe Bool
Maybe [Text]
Maybe Text
Maybe (HashMap Text Text)
Maybe DevEndpointCustomLibraries
Text
endpointName :: Text
addArguments :: Maybe (HashMap Text Text)
updateEtlLibraries :: Maybe Bool
deletePublicKeys :: Maybe [Text]
deleteArguments :: Maybe [Text]
publicKey :: Maybe Text
customLibraries :: Maybe DevEndpointCustomLibraries
addPublicKeys :: Maybe [Text]
$sel:endpointName:UpdateDevEndpoint' :: UpdateDevEndpoint -> Text
$sel:addArguments:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe (HashMap Text Text)
$sel:updateEtlLibraries:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe Bool
$sel:deletePublicKeys:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe [Text]
$sel:deleteArguments:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe [Text]
$sel:publicKey:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe Text
$sel:customLibraries:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe DevEndpointCustomLibraries
$sel:addPublicKeys:UpdateDevEndpoint' :: UpdateDevEndpoint -> Maybe [Text]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AddPublicKeys" 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]
addPublicKeys,
            (Text
"CustomLibraries" Text -> DevEndpointCustomLibraries -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DevEndpointCustomLibraries -> Pair)
-> Maybe DevEndpointCustomLibraries -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DevEndpointCustomLibraries
customLibraries,
            (Text
"PublicKey" 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
publicKey,
            (Text
"DeleteArguments" 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]
deleteArguments,
            (Text
"DeletePublicKeys" 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]
deletePublicKeys,
            (Text
"UpdateEtlLibraries" 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
updateEtlLibraries,
            (Text
"AddArguments" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
addArguments,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EndpointName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
endpointName)
          ]
      )

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

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

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

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

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

instance Prelude.NFData UpdateDevEndpointResponse