{-# 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.Lambda.Types.FileSystemConfig where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data FileSystemConfig = FileSystemConfig'
{
FileSystemConfig -> Text
arn :: Prelude.Text,
FileSystemConfig -> Text
localMountPath :: Prelude.Text
}
deriving (FileSystemConfig -> FileSystemConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FileSystemConfig -> FileSystemConfig -> Bool
$c/= :: FileSystemConfig -> FileSystemConfig -> Bool
== :: FileSystemConfig -> FileSystemConfig -> Bool
$c== :: FileSystemConfig -> FileSystemConfig -> Bool
Prelude.Eq, ReadPrec [FileSystemConfig]
ReadPrec FileSystemConfig
Int -> ReadS FileSystemConfig
ReadS [FileSystemConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FileSystemConfig]
$creadListPrec :: ReadPrec [FileSystemConfig]
readPrec :: ReadPrec FileSystemConfig
$creadPrec :: ReadPrec FileSystemConfig
readList :: ReadS [FileSystemConfig]
$creadList :: ReadS [FileSystemConfig]
readsPrec :: Int -> ReadS FileSystemConfig
$creadsPrec :: Int -> ReadS FileSystemConfig
Prelude.Read, Int -> FileSystemConfig -> ShowS
[FileSystemConfig] -> ShowS
FileSystemConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FileSystemConfig] -> ShowS
$cshowList :: [FileSystemConfig] -> ShowS
show :: FileSystemConfig -> String
$cshow :: FileSystemConfig -> String
showsPrec :: Int -> FileSystemConfig -> ShowS
$cshowsPrec :: Int -> FileSystemConfig -> ShowS
Prelude.Show, forall x. Rep FileSystemConfig x -> FileSystemConfig
forall x. FileSystemConfig -> Rep FileSystemConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FileSystemConfig x -> FileSystemConfig
$cfrom :: forall x. FileSystemConfig -> Rep FileSystemConfig x
Prelude.Generic)
newFileSystemConfig ::
Prelude.Text ->
Prelude.Text ->
FileSystemConfig
newFileSystemConfig :: Text -> Text -> FileSystemConfig
newFileSystemConfig Text
pArn_ Text
pLocalMountPath_ =
FileSystemConfig'
{ $sel:arn:FileSystemConfig' :: Text
arn = Text
pArn_,
$sel:localMountPath:FileSystemConfig' :: Text
localMountPath = Text
pLocalMountPath_
}
fileSystemConfig_arn :: Lens.Lens' FileSystemConfig Prelude.Text
fileSystemConfig_arn :: Lens' FileSystemConfig Text
fileSystemConfig_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemConfig' {Text
arn :: Text
$sel:arn:FileSystemConfig' :: FileSystemConfig -> Text
arn} -> Text
arn) (\s :: FileSystemConfig
s@FileSystemConfig' {} Text
a -> FileSystemConfig
s {$sel:arn:FileSystemConfig' :: Text
arn = Text
a} :: FileSystemConfig)
fileSystemConfig_localMountPath :: Lens.Lens' FileSystemConfig Prelude.Text
fileSystemConfig_localMountPath :: Lens' FileSystemConfig Text
fileSystemConfig_localMountPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FileSystemConfig' {Text
localMountPath :: Text
$sel:localMountPath:FileSystemConfig' :: FileSystemConfig -> Text
localMountPath} -> Text
localMountPath) (\s :: FileSystemConfig
s@FileSystemConfig' {} Text
a -> FileSystemConfig
s {$sel:localMountPath:FileSystemConfig' :: Text
localMountPath = Text
a} :: FileSystemConfig)
instance Data.FromJSON FileSystemConfig where
parseJSON :: Value -> Parser FileSystemConfig
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"FileSystemConfig"
( \Object
x ->
Text -> Text -> FileSystemConfig
FileSystemConfig'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"LocalMountPath")
)
instance Prelude.Hashable FileSystemConfig where
hashWithSalt :: Int -> FileSystemConfig -> Int
hashWithSalt Int
_salt FileSystemConfig' {Text
localMountPath :: Text
arn :: Text
$sel:localMountPath:FileSystemConfig' :: FileSystemConfig -> Text
$sel:arn:FileSystemConfig' :: FileSystemConfig -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
localMountPath
instance Prelude.NFData FileSystemConfig where
rnf :: FileSystemConfig -> ()
rnf FileSystemConfig' {Text
localMountPath :: Text
arn :: Text
$sel:localMountPath:FileSystemConfig' :: FileSystemConfig -> Text
$sel:arn:FileSystemConfig' :: FileSystemConfig -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
localMountPath
instance Data.ToJSON FileSystemConfig where
toJSON :: FileSystemConfig -> Value
toJSON FileSystemConfig' {Text
localMountPath :: Text
arn :: Text
$sel:localMountPath:FileSystemConfig' :: FileSystemConfig -> Text
$sel:arn:FileSystemConfig' :: FileSystemConfig -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"Arn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
arn),
forall a. a -> Maybe a
Prelude.Just
(Key
"LocalMountPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
localMountPath)
]
)