{-# 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.Glue.Types.DevEndpointCustomLibraries
-- 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.Glue.Types.DevEndpointCustomLibraries where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Custom libraries to be loaded into a development endpoint.
--
-- /See:/ 'newDevEndpointCustomLibraries' smart constructor.
data DevEndpointCustomLibraries = DevEndpointCustomLibraries'
  { -- | The paths to one or more Python libraries in an Amazon Simple Storage
    -- Service (Amazon S3) bucket that should be loaded in your @DevEndpoint@.
    -- Multiple values must be complete paths separated by a comma.
    --
    -- You can only use pure Python libraries with a @DevEndpoint@. Libraries
    -- that rely on C extensions, such as the
    -- <http://pandas.pydata.org/ pandas> Python data analysis library, are not
    -- currently supported.
    DevEndpointCustomLibraries -> Maybe Text
extraPythonLibsS3Path :: Prelude.Maybe Prelude.Text,
    -- | The path to one or more Java @.jar@ files in an S3 bucket that should be
    -- loaded in your @DevEndpoint@.
    --
    -- You can only use pure Java\/Scala libraries with a @DevEndpoint@.
    DevEndpointCustomLibraries -> Maybe Text
extraJarsS3Path :: Prelude.Maybe Prelude.Text
  }
  deriving (DevEndpointCustomLibraries -> DevEndpointCustomLibraries -> Bool
(DevEndpointCustomLibraries -> DevEndpointCustomLibraries -> Bool)
-> (DevEndpointCustomLibraries
    -> DevEndpointCustomLibraries -> Bool)
-> Eq DevEndpointCustomLibraries
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DevEndpointCustomLibraries -> DevEndpointCustomLibraries -> Bool
$c/= :: DevEndpointCustomLibraries -> DevEndpointCustomLibraries -> Bool
== :: DevEndpointCustomLibraries -> DevEndpointCustomLibraries -> Bool
$c== :: DevEndpointCustomLibraries -> DevEndpointCustomLibraries -> Bool
Prelude.Eq, ReadPrec [DevEndpointCustomLibraries]
ReadPrec DevEndpointCustomLibraries
Int -> ReadS DevEndpointCustomLibraries
ReadS [DevEndpointCustomLibraries]
(Int -> ReadS DevEndpointCustomLibraries)
-> ReadS [DevEndpointCustomLibraries]
-> ReadPrec DevEndpointCustomLibraries
-> ReadPrec [DevEndpointCustomLibraries]
-> Read DevEndpointCustomLibraries
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DevEndpointCustomLibraries]
$creadListPrec :: ReadPrec [DevEndpointCustomLibraries]
readPrec :: ReadPrec DevEndpointCustomLibraries
$creadPrec :: ReadPrec DevEndpointCustomLibraries
readList :: ReadS [DevEndpointCustomLibraries]
$creadList :: ReadS [DevEndpointCustomLibraries]
readsPrec :: Int -> ReadS DevEndpointCustomLibraries
$creadsPrec :: Int -> ReadS DevEndpointCustomLibraries
Prelude.Read, Int -> DevEndpointCustomLibraries -> ShowS
[DevEndpointCustomLibraries] -> ShowS
DevEndpointCustomLibraries -> String
(Int -> DevEndpointCustomLibraries -> ShowS)
-> (DevEndpointCustomLibraries -> String)
-> ([DevEndpointCustomLibraries] -> ShowS)
-> Show DevEndpointCustomLibraries
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DevEndpointCustomLibraries] -> ShowS
$cshowList :: [DevEndpointCustomLibraries] -> ShowS
show :: DevEndpointCustomLibraries -> String
$cshow :: DevEndpointCustomLibraries -> String
showsPrec :: Int -> DevEndpointCustomLibraries -> ShowS
$cshowsPrec :: Int -> DevEndpointCustomLibraries -> ShowS
Prelude.Show, (forall x.
 DevEndpointCustomLibraries -> Rep DevEndpointCustomLibraries x)
-> (forall x.
    Rep DevEndpointCustomLibraries x -> DevEndpointCustomLibraries)
-> Generic DevEndpointCustomLibraries
forall x.
Rep DevEndpointCustomLibraries x -> DevEndpointCustomLibraries
forall x.
DevEndpointCustomLibraries -> Rep DevEndpointCustomLibraries x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DevEndpointCustomLibraries x -> DevEndpointCustomLibraries
$cfrom :: forall x.
DevEndpointCustomLibraries -> Rep DevEndpointCustomLibraries x
Prelude.Generic)

-- |
-- Create a value of 'DevEndpointCustomLibraries' 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:
--
-- 'extraPythonLibsS3Path', 'devEndpointCustomLibraries_extraPythonLibsS3Path' - The paths to one or more Python libraries in an Amazon Simple Storage
-- Service (Amazon S3) bucket that should be loaded in your @DevEndpoint@.
-- Multiple values must be complete paths separated by a comma.
--
-- You can only use pure Python libraries with a @DevEndpoint@. Libraries
-- that rely on C extensions, such as the
-- <http://pandas.pydata.org/ pandas> Python data analysis library, are not
-- currently supported.
--
-- 'extraJarsS3Path', 'devEndpointCustomLibraries_extraJarsS3Path' - The path to one or more Java @.jar@ files in an S3 bucket that should be
-- loaded in your @DevEndpoint@.
--
-- You can only use pure Java\/Scala libraries with a @DevEndpoint@.
newDevEndpointCustomLibraries ::
  DevEndpointCustomLibraries
newDevEndpointCustomLibraries :: DevEndpointCustomLibraries
newDevEndpointCustomLibraries =
  DevEndpointCustomLibraries' :: Maybe Text -> Maybe Text -> DevEndpointCustomLibraries
DevEndpointCustomLibraries'
    { $sel:extraPythonLibsS3Path:DevEndpointCustomLibraries' :: Maybe Text
extraPythonLibsS3Path =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:extraJarsS3Path:DevEndpointCustomLibraries' :: Maybe Text
extraJarsS3Path = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The paths to one or more Python libraries in an Amazon Simple Storage
-- Service (Amazon S3) bucket that should be loaded in your @DevEndpoint@.
-- Multiple values must be complete paths separated by a comma.
--
-- You can only use pure Python libraries with a @DevEndpoint@. Libraries
-- that rely on C extensions, such as the
-- <http://pandas.pydata.org/ pandas> Python data analysis library, are not
-- currently supported.
devEndpointCustomLibraries_extraPythonLibsS3Path :: Lens.Lens' DevEndpointCustomLibraries (Prelude.Maybe Prelude.Text)
devEndpointCustomLibraries_extraPythonLibsS3Path :: (Maybe Text -> f (Maybe Text))
-> DevEndpointCustomLibraries -> f DevEndpointCustomLibraries
devEndpointCustomLibraries_extraPythonLibsS3Path = (DevEndpointCustomLibraries -> Maybe Text)
-> (DevEndpointCustomLibraries
    -> Maybe Text -> DevEndpointCustomLibraries)
-> Lens
     DevEndpointCustomLibraries
     DevEndpointCustomLibraries
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DevEndpointCustomLibraries' {Maybe Text
extraPythonLibsS3Path :: Maybe Text
$sel:extraPythonLibsS3Path:DevEndpointCustomLibraries' :: DevEndpointCustomLibraries -> Maybe Text
extraPythonLibsS3Path} -> Maybe Text
extraPythonLibsS3Path) (\s :: DevEndpointCustomLibraries
s@DevEndpointCustomLibraries' {} Maybe Text
a -> DevEndpointCustomLibraries
s {$sel:extraPythonLibsS3Path:DevEndpointCustomLibraries' :: Maybe Text
extraPythonLibsS3Path = Maybe Text
a} :: DevEndpointCustomLibraries)

-- | The path to one or more Java @.jar@ files in an S3 bucket that should be
-- loaded in your @DevEndpoint@.
--
-- You can only use pure Java\/Scala libraries with a @DevEndpoint@.
devEndpointCustomLibraries_extraJarsS3Path :: Lens.Lens' DevEndpointCustomLibraries (Prelude.Maybe Prelude.Text)
devEndpointCustomLibraries_extraJarsS3Path :: (Maybe Text -> f (Maybe Text))
-> DevEndpointCustomLibraries -> f DevEndpointCustomLibraries
devEndpointCustomLibraries_extraJarsS3Path = (DevEndpointCustomLibraries -> Maybe Text)
-> (DevEndpointCustomLibraries
    -> Maybe Text -> DevEndpointCustomLibraries)
-> Lens
     DevEndpointCustomLibraries
     DevEndpointCustomLibraries
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DevEndpointCustomLibraries' {Maybe Text
extraJarsS3Path :: Maybe Text
$sel:extraJarsS3Path:DevEndpointCustomLibraries' :: DevEndpointCustomLibraries -> Maybe Text
extraJarsS3Path} -> Maybe Text
extraJarsS3Path) (\s :: DevEndpointCustomLibraries
s@DevEndpointCustomLibraries' {} Maybe Text
a -> DevEndpointCustomLibraries
s {$sel:extraJarsS3Path:DevEndpointCustomLibraries' :: Maybe Text
extraJarsS3Path = Maybe Text
a} :: DevEndpointCustomLibraries)

instance Prelude.Hashable DevEndpointCustomLibraries

instance Prelude.NFData DevEndpointCustomLibraries

instance Core.ToJSON DevEndpointCustomLibraries where
  toJSON :: DevEndpointCustomLibraries -> Value
toJSON DevEndpointCustomLibraries' {Maybe Text
extraJarsS3Path :: Maybe Text
extraPythonLibsS3Path :: Maybe Text
$sel:extraJarsS3Path:DevEndpointCustomLibraries' :: DevEndpointCustomLibraries -> Maybe Text
$sel:extraPythonLibsS3Path:DevEndpointCustomLibraries' :: DevEndpointCustomLibraries -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ExtraPythonLibsS3Path" 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
extraPythonLibsS3Path,
            (Text
"ExtraJarsS3Path" 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
extraJarsS3Path
          ]
      )