{-# 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.DMS.Types.NeptuneSettings
-- 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.DMS.Types.NeptuneSettings where

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

-- | Provides information that defines an Amazon Neptune endpoint.
--
-- /See:/ 'newNeptuneSettings' smart constructor.
data NeptuneSettings = NeptuneSettings'
  { -- | The maximum size in kilobytes of migrated graph data stored in a .csv
    -- file before DMS bulk-loads the data to the Neptune target database. The
    -- default is 1,048,576 KB. If the bulk load is successful, DMS clears the
    -- bucket, ready to store the next batch of migrated graph data.
    NeptuneSettings -> Maybe Int
maxFileSize :: Prelude.Maybe Prelude.Int,
    -- | The number of times for DMS to retry a bulk load of migrated graph data
    -- to the Neptune target database before raising an error. The default is
    -- 5.
    NeptuneSettings -> Maybe Int
maxRetryCount :: Prelude.Maybe Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the service role that you created for
    -- the Neptune target endpoint. The role must allow the @iam:PassRole@
    -- action. For more information, see
    -- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.ServiceRole Creating an IAM Service Role for Accessing Amazon Neptune as a Target>
    -- in the /Database Migration Service User Guide./
    NeptuneSettings -> Maybe Text
serviceAccessRoleArn :: Prelude.Maybe Prelude.Text,
    -- | If you want Identity and Access Management (IAM) authorization enabled
    -- for this endpoint, set this parameter to @true@. Then attach the
    -- appropriate IAM policy document to your service role specified by
    -- @ServiceAccessRoleArn@. The default is @false@.
    NeptuneSettings -> Maybe Bool
iamAuthEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The number of milliseconds for DMS to wait to retry a bulk-load of
    -- migrated graph data to the Neptune target database before raising an
    -- error. The default is 250.
    NeptuneSettings -> Maybe Int
errorRetryDuration :: Prelude.Maybe Prelude.Int,
    -- | The name of the Amazon S3 bucket where DMS can temporarily store
    -- migrated graph data in .csv files before bulk-loading it to the Neptune
    -- target database. DMS maps the SQL source data to graph data before
    -- storing it in these .csv files.
    NeptuneSettings -> Text
s3BucketName :: Prelude.Text,
    -- | A folder path where you want DMS to store migrated graph data in the S3
    -- bucket specified by @S3BucketName@
    NeptuneSettings -> Text
s3BucketFolder :: Prelude.Text
  }
  deriving (NeptuneSettings -> NeptuneSettings -> Bool
(NeptuneSettings -> NeptuneSettings -> Bool)
-> (NeptuneSettings -> NeptuneSettings -> Bool)
-> Eq NeptuneSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NeptuneSettings -> NeptuneSettings -> Bool
$c/= :: NeptuneSettings -> NeptuneSettings -> Bool
== :: NeptuneSettings -> NeptuneSettings -> Bool
$c== :: NeptuneSettings -> NeptuneSettings -> Bool
Prelude.Eq, ReadPrec [NeptuneSettings]
ReadPrec NeptuneSettings
Int -> ReadS NeptuneSettings
ReadS [NeptuneSettings]
(Int -> ReadS NeptuneSettings)
-> ReadS [NeptuneSettings]
-> ReadPrec NeptuneSettings
-> ReadPrec [NeptuneSettings]
-> Read NeptuneSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NeptuneSettings]
$creadListPrec :: ReadPrec [NeptuneSettings]
readPrec :: ReadPrec NeptuneSettings
$creadPrec :: ReadPrec NeptuneSettings
readList :: ReadS [NeptuneSettings]
$creadList :: ReadS [NeptuneSettings]
readsPrec :: Int -> ReadS NeptuneSettings
$creadsPrec :: Int -> ReadS NeptuneSettings
Prelude.Read, Int -> NeptuneSettings -> ShowS
[NeptuneSettings] -> ShowS
NeptuneSettings -> String
(Int -> NeptuneSettings -> ShowS)
-> (NeptuneSettings -> String)
-> ([NeptuneSettings] -> ShowS)
-> Show NeptuneSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NeptuneSettings] -> ShowS
$cshowList :: [NeptuneSettings] -> ShowS
show :: NeptuneSettings -> String
$cshow :: NeptuneSettings -> String
showsPrec :: Int -> NeptuneSettings -> ShowS
$cshowsPrec :: Int -> NeptuneSettings -> ShowS
Prelude.Show, (forall x. NeptuneSettings -> Rep NeptuneSettings x)
-> (forall x. Rep NeptuneSettings x -> NeptuneSettings)
-> Generic NeptuneSettings
forall x. Rep NeptuneSettings x -> NeptuneSettings
forall x. NeptuneSettings -> Rep NeptuneSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NeptuneSettings x -> NeptuneSettings
$cfrom :: forall x. NeptuneSettings -> Rep NeptuneSettings x
Prelude.Generic)

-- |
-- Create a value of 'NeptuneSettings' 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:
--
-- 'maxFileSize', 'neptuneSettings_maxFileSize' - The maximum size in kilobytes of migrated graph data stored in a .csv
-- file before DMS bulk-loads the data to the Neptune target database. The
-- default is 1,048,576 KB. If the bulk load is successful, DMS clears the
-- bucket, ready to store the next batch of migrated graph data.
--
-- 'maxRetryCount', 'neptuneSettings_maxRetryCount' - The number of times for DMS to retry a bulk load of migrated graph data
-- to the Neptune target database before raising an error. The default is
-- 5.
--
-- 'serviceAccessRoleArn', 'neptuneSettings_serviceAccessRoleArn' - The Amazon Resource Name (ARN) of the service role that you created for
-- the Neptune target endpoint. The role must allow the @iam:PassRole@
-- action. For more information, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.ServiceRole Creating an IAM Service Role for Accessing Amazon Neptune as a Target>
-- in the /Database Migration Service User Guide./
--
-- 'iamAuthEnabled', 'neptuneSettings_iamAuthEnabled' - If you want Identity and Access Management (IAM) authorization enabled
-- for this endpoint, set this parameter to @true@. Then attach the
-- appropriate IAM policy document to your service role specified by
-- @ServiceAccessRoleArn@. The default is @false@.
--
-- 'errorRetryDuration', 'neptuneSettings_errorRetryDuration' - The number of milliseconds for DMS to wait to retry a bulk-load of
-- migrated graph data to the Neptune target database before raising an
-- error. The default is 250.
--
-- 's3BucketName', 'neptuneSettings_s3BucketName' - The name of the Amazon S3 bucket where DMS can temporarily store
-- migrated graph data in .csv files before bulk-loading it to the Neptune
-- target database. DMS maps the SQL source data to graph data before
-- storing it in these .csv files.
--
-- 's3BucketFolder', 'neptuneSettings_s3BucketFolder' - A folder path where you want DMS to store migrated graph data in the S3
-- bucket specified by @S3BucketName@
newNeptuneSettings ::
  -- | 's3BucketName'
  Prelude.Text ->
  -- | 's3BucketFolder'
  Prelude.Text ->
  NeptuneSettings
newNeptuneSettings :: Text -> Text -> NeptuneSettings
newNeptuneSettings Text
pS3BucketName_ Text
pS3BucketFolder_ =
  NeptuneSettings' :: Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Text
-> Text
-> NeptuneSettings
NeptuneSettings'
    { $sel:maxFileSize:NeptuneSettings' :: Maybe Int
maxFileSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:maxRetryCount:NeptuneSettings' :: Maybe Int
maxRetryCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceAccessRoleArn:NeptuneSettings' :: Maybe Text
serviceAccessRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iamAuthEnabled:NeptuneSettings' :: Maybe Bool
iamAuthEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:errorRetryDuration:NeptuneSettings' :: Maybe Int
errorRetryDuration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:s3BucketName:NeptuneSettings' :: Text
s3BucketName = Text
pS3BucketName_,
      $sel:s3BucketFolder:NeptuneSettings' :: Text
s3BucketFolder = Text
pS3BucketFolder_
    }

-- | The maximum size in kilobytes of migrated graph data stored in a .csv
-- file before DMS bulk-loads the data to the Neptune target database. The
-- default is 1,048,576 KB. If the bulk load is successful, DMS clears the
-- bucket, ready to store the next batch of migrated graph data.
neptuneSettings_maxFileSize :: Lens.Lens' NeptuneSettings (Prelude.Maybe Prelude.Int)
neptuneSettings_maxFileSize :: (Maybe Int -> f (Maybe Int))
-> NeptuneSettings -> f NeptuneSettings
neptuneSettings_maxFileSize = (NeptuneSettings -> Maybe Int)
-> (NeptuneSettings -> Maybe Int -> NeptuneSettings)
-> Lens NeptuneSettings NeptuneSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NeptuneSettings' {Maybe Int
maxFileSize :: Maybe Int
$sel:maxFileSize:NeptuneSettings' :: NeptuneSettings -> Maybe Int
maxFileSize} -> Maybe Int
maxFileSize) (\s :: NeptuneSettings
s@NeptuneSettings' {} Maybe Int
a -> NeptuneSettings
s {$sel:maxFileSize:NeptuneSettings' :: Maybe Int
maxFileSize = Maybe Int
a} :: NeptuneSettings)

-- | The number of times for DMS to retry a bulk load of migrated graph data
-- to the Neptune target database before raising an error. The default is
-- 5.
neptuneSettings_maxRetryCount :: Lens.Lens' NeptuneSettings (Prelude.Maybe Prelude.Int)
neptuneSettings_maxRetryCount :: (Maybe Int -> f (Maybe Int))
-> NeptuneSettings -> f NeptuneSettings
neptuneSettings_maxRetryCount = (NeptuneSettings -> Maybe Int)
-> (NeptuneSettings -> Maybe Int -> NeptuneSettings)
-> Lens NeptuneSettings NeptuneSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NeptuneSettings' {Maybe Int
maxRetryCount :: Maybe Int
$sel:maxRetryCount:NeptuneSettings' :: NeptuneSettings -> Maybe Int
maxRetryCount} -> Maybe Int
maxRetryCount) (\s :: NeptuneSettings
s@NeptuneSettings' {} Maybe Int
a -> NeptuneSettings
s {$sel:maxRetryCount:NeptuneSettings' :: Maybe Int
maxRetryCount = Maybe Int
a} :: NeptuneSettings)

-- | The Amazon Resource Name (ARN) of the service role that you created for
-- the Neptune target endpoint. The role must allow the @iam:PassRole@
-- action. For more information, see
-- <https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Target.Neptune.html#CHAP_Target.Neptune.ServiceRole Creating an IAM Service Role for Accessing Amazon Neptune as a Target>
-- in the /Database Migration Service User Guide./
neptuneSettings_serviceAccessRoleArn :: Lens.Lens' NeptuneSettings (Prelude.Maybe Prelude.Text)
neptuneSettings_serviceAccessRoleArn :: (Maybe Text -> f (Maybe Text))
-> NeptuneSettings -> f NeptuneSettings
neptuneSettings_serviceAccessRoleArn = (NeptuneSettings -> Maybe Text)
-> (NeptuneSettings -> Maybe Text -> NeptuneSettings)
-> Lens NeptuneSettings NeptuneSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NeptuneSettings' {Maybe Text
serviceAccessRoleArn :: Maybe Text
$sel:serviceAccessRoleArn:NeptuneSettings' :: NeptuneSettings -> Maybe Text
serviceAccessRoleArn} -> Maybe Text
serviceAccessRoleArn) (\s :: NeptuneSettings
s@NeptuneSettings' {} Maybe Text
a -> NeptuneSettings
s {$sel:serviceAccessRoleArn:NeptuneSettings' :: Maybe Text
serviceAccessRoleArn = Maybe Text
a} :: NeptuneSettings)

-- | If you want Identity and Access Management (IAM) authorization enabled
-- for this endpoint, set this parameter to @true@. Then attach the
-- appropriate IAM policy document to your service role specified by
-- @ServiceAccessRoleArn@. The default is @false@.
neptuneSettings_iamAuthEnabled :: Lens.Lens' NeptuneSettings (Prelude.Maybe Prelude.Bool)
neptuneSettings_iamAuthEnabled :: (Maybe Bool -> f (Maybe Bool))
-> NeptuneSettings -> f NeptuneSettings
neptuneSettings_iamAuthEnabled = (NeptuneSettings -> Maybe Bool)
-> (NeptuneSettings -> Maybe Bool -> NeptuneSettings)
-> Lens NeptuneSettings NeptuneSettings (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NeptuneSettings' {Maybe Bool
iamAuthEnabled :: Maybe Bool
$sel:iamAuthEnabled:NeptuneSettings' :: NeptuneSettings -> Maybe Bool
iamAuthEnabled} -> Maybe Bool
iamAuthEnabled) (\s :: NeptuneSettings
s@NeptuneSettings' {} Maybe Bool
a -> NeptuneSettings
s {$sel:iamAuthEnabled:NeptuneSettings' :: Maybe Bool
iamAuthEnabled = Maybe Bool
a} :: NeptuneSettings)

-- | The number of milliseconds for DMS to wait to retry a bulk-load of
-- migrated graph data to the Neptune target database before raising an
-- error. The default is 250.
neptuneSettings_errorRetryDuration :: Lens.Lens' NeptuneSettings (Prelude.Maybe Prelude.Int)
neptuneSettings_errorRetryDuration :: (Maybe Int -> f (Maybe Int))
-> NeptuneSettings -> f NeptuneSettings
neptuneSettings_errorRetryDuration = (NeptuneSettings -> Maybe Int)
-> (NeptuneSettings -> Maybe Int -> NeptuneSettings)
-> Lens NeptuneSettings NeptuneSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NeptuneSettings' {Maybe Int
errorRetryDuration :: Maybe Int
$sel:errorRetryDuration:NeptuneSettings' :: NeptuneSettings -> Maybe Int
errorRetryDuration} -> Maybe Int
errorRetryDuration) (\s :: NeptuneSettings
s@NeptuneSettings' {} Maybe Int
a -> NeptuneSettings
s {$sel:errorRetryDuration:NeptuneSettings' :: Maybe Int
errorRetryDuration = Maybe Int
a} :: NeptuneSettings)

-- | The name of the Amazon S3 bucket where DMS can temporarily store
-- migrated graph data in .csv files before bulk-loading it to the Neptune
-- target database. DMS maps the SQL source data to graph data before
-- storing it in these .csv files.
neptuneSettings_s3BucketName :: Lens.Lens' NeptuneSettings Prelude.Text
neptuneSettings_s3BucketName :: (Text -> f Text) -> NeptuneSettings -> f NeptuneSettings
neptuneSettings_s3BucketName = (NeptuneSettings -> Text)
-> (NeptuneSettings -> Text -> NeptuneSettings)
-> Lens NeptuneSettings NeptuneSettings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NeptuneSettings' {Text
s3BucketName :: Text
$sel:s3BucketName:NeptuneSettings' :: NeptuneSettings -> Text
s3BucketName} -> Text
s3BucketName) (\s :: NeptuneSettings
s@NeptuneSettings' {} Text
a -> NeptuneSettings
s {$sel:s3BucketName:NeptuneSettings' :: Text
s3BucketName = Text
a} :: NeptuneSettings)

-- | A folder path where you want DMS to store migrated graph data in the S3
-- bucket specified by @S3BucketName@
neptuneSettings_s3BucketFolder :: Lens.Lens' NeptuneSettings Prelude.Text
neptuneSettings_s3BucketFolder :: (Text -> f Text) -> NeptuneSettings -> f NeptuneSettings
neptuneSettings_s3BucketFolder = (NeptuneSettings -> Text)
-> (NeptuneSettings -> Text -> NeptuneSettings)
-> Lens NeptuneSettings NeptuneSettings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NeptuneSettings' {Text
s3BucketFolder :: Text
$sel:s3BucketFolder:NeptuneSettings' :: NeptuneSettings -> Text
s3BucketFolder} -> Text
s3BucketFolder) (\s :: NeptuneSettings
s@NeptuneSettings' {} Text
a -> NeptuneSettings
s {$sel:s3BucketFolder:NeptuneSettings' :: Text
s3BucketFolder = Text
a} :: NeptuneSettings)

instance Core.FromJSON NeptuneSettings where
  parseJSON :: Value -> Parser NeptuneSettings
parseJSON =
    String
-> (Object -> Parser NeptuneSettings)
-> Value
-> Parser NeptuneSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"NeptuneSettings"
      ( \Object
x ->
          Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> Text
-> Text
-> NeptuneSettings
NeptuneSettings'
            (Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Int
 -> Text
 -> Text
 -> NeptuneSettings)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Int
      -> Text
      -> Text
      -> NeptuneSettings)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxFileSize")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Int
   -> Text
   -> Text
   -> NeptuneSettings)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Bool -> Maybe Int -> Text -> Text -> NeptuneSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MaxRetryCount")
            Parser
  (Maybe Text
   -> Maybe Bool -> Maybe Int -> Text -> Text -> NeptuneSettings)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool -> Maybe Int -> Text -> Text -> NeptuneSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ServiceAccessRoleArn")
            Parser (Maybe Bool -> Maybe Int -> Text -> Text -> NeptuneSettings)
-> Parser (Maybe Bool)
-> Parser (Maybe Int -> Text -> Text -> NeptuneSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IamAuthEnabled")
            Parser (Maybe Int -> Text -> Text -> NeptuneSettings)
-> Parser (Maybe Int) -> Parser (Text -> Text -> NeptuneSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorRetryDuration")
            Parser (Text -> Text -> NeptuneSettings)
-> Parser Text -> Parser (Text -> NeptuneSettings)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3BucketName")
            Parser (Text -> NeptuneSettings)
-> Parser Text -> Parser NeptuneSettings
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3BucketFolder")
      )

instance Prelude.Hashable NeptuneSettings

instance Prelude.NFData NeptuneSettings

instance Core.ToJSON NeptuneSettings where
  toJSON :: NeptuneSettings -> Value
toJSON NeptuneSettings' {Maybe Bool
Maybe Int
Maybe Text
Text
s3BucketFolder :: Text
s3BucketName :: Text
errorRetryDuration :: Maybe Int
iamAuthEnabled :: Maybe Bool
serviceAccessRoleArn :: Maybe Text
maxRetryCount :: Maybe Int
maxFileSize :: Maybe Int
$sel:s3BucketFolder:NeptuneSettings' :: NeptuneSettings -> Text
$sel:s3BucketName:NeptuneSettings' :: NeptuneSettings -> Text
$sel:errorRetryDuration:NeptuneSettings' :: NeptuneSettings -> Maybe Int
$sel:iamAuthEnabled:NeptuneSettings' :: NeptuneSettings -> Maybe Bool
$sel:serviceAccessRoleArn:NeptuneSettings' :: NeptuneSettings -> Maybe Text
$sel:maxRetryCount:NeptuneSettings' :: NeptuneSettings -> Maybe Int
$sel:maxFileSize:NeptuneSettings' :: NeptuneSettings -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"MaxFileSize" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxFileSize,
            (Text
"MaxRetryCount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxRetryCount,
            (Text
"ServiceAccessRoleArn" 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
serviceAccessRoleArn,
            (Text
"IamAuthEnabled" 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
iamAuthEnabled,
            (Text
"ErrorRetryDuration" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
errorRetryDuration,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"S3BucketName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
s3BucketName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"S3BucketFolder" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
s3BucketFolder)
          ]
      )