{-# 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.DynamoDbSettings where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data DynamoDbSettings = DynamoDbSettings'
{
DynamoDbSettings -> Text
serviceAccessRoleArn :: Prelude.Text
}
deriving (DynamoDbSettings -> DynamoDbSettings -> Bool
(DynamoDbSettings -> DynamoDbSettings -> Bool)
-> (DynamoDbSettings -> DynamoDbSettings -> Bool)
-> Eq DynamoDbSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DynamoDbSettings -> DynamoDbSettings -> Bool
$c/= :: DynamoDbSettings -> DynamoDbSettings -> Bool
== :: DynamoDbSettings -> DynamoDbSettings -> Bool
$c== :: DynamoDbSettings -> DynamoDbSettings -> Bool
Prelude.Eq, ReadPrec [DynamoDbSettings]
ReadPrec DynamoDbSettings
Int -> ReadS DynamoDbSettings
ReadS [DynamoDbSettings]
(Int -> ReadS DynamoDbSettings)
-> ReadS [DynamoDbSettings]
-> ReadPrec DynamoDbSettings
-> ReadPrec [DynamoDbSettings]
-> Read DynamoDbSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DynamoDbSettings]
$creadListPrec :: ReadPrec [DynamoDbSettings]
readPrec :: ReadPrec DynamoDbSettings
$creadPrec :: ReadPrec DynamoDbSettings
readList :: ReadS [DynamoDbSettings]
$creadList :: ReadS [DynamoDbSettings]
readsPrec :: Int -> ReadS DynamoDbSettings
$creadsPrec :: Int -> ReadS DynamoDbSettings
Prelude.Read, Int -> DynamoDbSettings -> ShowS
[DynamoDbSettings] -> ShowS
DynamoDbSettings -> String
(Int -> DynamoDbSettings -> ShowS)
-> (DynamoDbSettings -> String)
-> ([DynamoDbSettings] -> ShowS)
-> Show DynamoDbSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DynamoDbSettings] -> ShowS
$cshowList :: [DynamoDbSettings] -> ShowS
show :: DynamoDbSettings -> String
$cshow :: DynamoDbSettings -> String
showsPrec :: Int -> DynamoDbSettings -> ShowS
$cshowsPrec :: Int -> DynamoDbSettings -> ShowS
Prelude.Show, (forall x. DynamoDbSettings -> Rep DynamoDbSettings x)
-> (forall x. Rep DynamoDbSettings x -> DynamoDbSettings)
-> Generic DynamoDbSettings
forall x. Rep DynamoDbSettings x -> DynamoDbSettings
forall x. DynamoDbSettings -> Rep DynamoDbSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DynamoDbSettings x -> DynamoDbSettings
$cfrom :: forall x. DynamoDbSettings -> Rep DynamoDbSettings x
Prelude.Generic)
newDynamoDbSettings ::
Prelude.Text ->
DynamoDbSettings
newDynamoDbSettings :: Text -> DynamoDbSettings
newDynamoDbSettings Text
pServiceAccessRoleArn_ =
DynamoDbSettings' :: Text -> DynamoDbSettings
DynamoDbSettings'
{ $sel:serviceAccessRoleArn:DynamoDbSettings' :: Text
serviceAccessRoleArn =
Text
pServiceAccessRoleArn_
}
dynamoDbSettings_serviceAccessRoleArn :: Lens.Lens' DynamoDbSettings Prelude.Text
dynamoDbSettings_serviceAccessRoleArn :: (Text -> f Text) -> DynamoDbSettings -> f DynamoDbSettings
dynamoDbSettings_serviceAccessRoleArn = (DynamoDbSettings -> Text)
-> (DynamoDbSettings -> Text -> DynamoDbSettings)
-> Lens DynamoDbSettings DynamoDbSettings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DynamoDbSettings' {Text
serviceAccessRoleArn :: Text
$sel:serviceAccessRoleArn:DynamoDbSettings' :: DynamoDbSettings -> Text
serviceAccessRoleArn} -> Text
serviceAccessRoleArn) (\s :: DynamoDbSettings
s@DynamoDbSettings' {} Text
a -> DynamoDbSettings
s {$sel:serviceAccessRoleArn:DynamoDbSettings' :: Text
serviceAccessRoleArn = Text
a} :: DynamoDbSettings)
instance Core.FromJSON DynamoDbSettings where
parseJSON :: Value -> Parser DynamoDbSettings
parseJSON =
String
-> (Object -> Parser DynamoDbSettings)
-> Value
-> Parser DynamoDbSettings
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"DynamoDbSettings"
( \Object
x ->
Text -> DynamoDbSettings
DynamoDbSettings'
(Text -> DynamoDbSettings)
-> Parser Text -> Parser DynamoDbSettings
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ServiceAccessRoleArn")
)
instance Prelude.Hashable DynamoDbSettings
instance Prelude.NFData DynamoDbSettings
instance Core.ToJSON DynamoDbSettings where
toJSON :: DynamoDbSettings -> Value
toJSON DynamoDbSettings' {Text
serviceAccessRoleArn :: Text
$sel:serviceAccessRoleArn:DynamoDbSettings' :: DynamoDbSettings -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ServiceAccessRoleArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceAccessRoleArn
)
]
)