{-# 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 #-}
module Amazonka.DMS.Types.NeptuneSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NeptuneSettings = NeptuneSettings'
{
NeptuneSettings -> Maybe Int
maxFileSize :: Prelude.Maybe Prelude.Int,
NeptuneSettings -> Maybe Int
maxRetryCount :: Prelude.Maybe Prelude.Int,
NeptuneSettings -> Maybe Text
serviceAccessRoleArn :: Prelude.Maybe Prelude.Text,
NeptuneSettings -> Maybe Bool
iamAuthEnabled :: Prelude.Maybe Prelude.Bool,
NeptuneSettings -> Maybe Int
errorRetryDuration :: Prelude.Maybe Prelude.Int,
NeptuneSettings -> Text
s3BucketName :: Prelude.Text,
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)
newNeptuneSettings ::
Prelude.Text ->
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_
}
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)
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)
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)
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)
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)
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)
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)
]
)