{-# 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.ECS.Types.FSxWindowsFileServerVolumeConfiguration where
import qualified Amazonka.Core as Core
import Amazonka.ECS.Types.FSxWindowsFileServerAuthorizationConfig
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data FSxWindowsFileServerVolumeConfiguration = FSxWindowsFileServerVolumeConfiguration'
{
FSxWindowsFileServerVolumeConfiguration -> Text
fileSystemId :: Prelude.Text,
FSxWindowsFileServerVolumeConfiguration -> Text
rootDirectory :: Prelude.Text,
FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerAuthorizationConfig
authorizationConfig :: FSxWindowsFileServerAuthorizationConfig
}
deriving (FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerVolumeConfiguration -> Bool
(FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerVolumeConfiguration -> Bool)
-> (FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerVolumeConfiguration -> Bool)
-> Eq FSxWindowsFileServerVolumeConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerVolumeConfiguration -> Bool
$c/= :: FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerVolumeConfiguration -> Bool
== :: FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerVolumeConfiguration -> Bool
$c== :: FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerVolumeConfiguration -> Bool
Prelude.Eq, ReadPrec [FSxWindowsFileServerVolumeConfiguration]
ReadPrec FSxWindowsFileServerVolumeConfiguration
Int -> ReadS FSxWindowsFileServerVolumeConfiguration
ReadS [FSxWindowsFileServerVolumeConfiguration]
(Int -> ReadS FSxWindowsFileServerVolumeConfiguration)
-> ReadS [FSxWindowsFileServerVolumeConfiguration]
-> ReadPrec FSxWindowsFileServerVolumeConfiguration
-> ReadPrec [FSxWindowsFileServerVolumeConfiguration]
-> Read FSxWindowsFileServerVolumeConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FSxWindowsFileServerVolumeConfiguration]
$creadListPrec :: ReadPrec [FSxWindowsFileServerVolumeConfiguration]
readPrec :: ReadPrec FSxWindowsFileServerVolumeConfiguration
$creadPrec :: ReadPrec FSxWindowsFileServerVolumeConfiguration
readList :: ReadS [FSxWindowsFileServerVolumeConfiguration]
$creadList :: ReadS [FSxWindowsFileServerVolumeConfiguration]
readsPrec :: Int -> ReadS FSxWindowsFileServerVolumeConfiguration
$creadsPrec :: Int -> ReadS FSxWindowsFileServerVolumeConfiguration
Prelude.Read, Int -> FSxWindowsFileServerVolumeConfiguration -> ShowS
[FSxWindowsFileServerVolumeConfiguration] -> ShowS
FSxWindowsFileServerVolumeConfiguration -> String
(Int -> FSxWindowsFileServerVolumeConfiguration -> ShowS)
-> (FSxWindowsFileServerVolumeConfiguration -> String)
-> ([FSxWindowsFileServerVolumeConfiguration] -> ShowS)
-> Show FSxWindowsFileServerVolumeConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FSxWindowsFileServerVolumeConfiguration] -> ShowS
$cshowList :: [FSxWindowsFileServerVolumeConfiguration] -> ShowS
show :: FSxWindowsFileServerVolumeConfiguration -> String
$cshow :: FSxWindowsFileServerVolumeConfiguration -> String
showsPrec :: Int -> FSxWindowsFileServerVolumeConfiguration -> ShowS
$cshowsPrec :: Int -> FSxWindowsFileServerVolumeConfiguration -> ShowS
Prelude.Show, (forall x.
FSxWindowsFileServerVolumeConfiguration
-> Rep FSxWindowsFileServerVolumeConfiguration x)
-> (forall x.
Rep FSxWindowsFileServerVolumeConfiguration x
-> FSxWindowsFileServerVolumeConfiguration)
-> Generic FSxWindowsFileServerVolumeConfiguration
forall x.
Rep FSxWindowsFileServerVolumeConfiguration x
-> FSxWindowsFileServerVolumeConfiguration
forall x.
FSxWindowsFileServerVolumeConfiguration
-> Rep FSxWindowsFileServerVolumeConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep FSxWindowsFileServerVolumeConfiguration x
-> FSxWindowsFileServerVolumeConfiguration
$cfrom :: forall x.
FSxWindowsFileServerVolumeConfiguration
-> Rep FSxWindowsFileServerVolumeConfiguration x
Prelude.Generic)
newFSxWindowsFileServerVolumeConfiguration ::
Prelude.Text ->
Prelude.Text ->
FSxWindowsFileServerAuthorizationConfig ->
FSxWindowsFileServerVolumeConfiguration
newFSxWindowsFileServerVolumeConfiguration :: Text
-> Text
-> FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerVolumeConfiguration
newFSxWindowsFileServerVolumeConfiguration
Text
pFileSystemId_
Text
pRootDirectory_
FSxWindowsFileServerAuthorizationConfig
pAuthorizationConfig_ =
FSxWindowsFileServerVolumeConfiguration' :: Text
-> Text
-> FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerVolumeConfiguration
FSxWindowsFileServerVolumeConfiguration'
{ $sel:fileSystemId:FSxWindowsFileServerVolumeConfiguration' :: Text
fileSystemId =
Text
pFileSystemId_,
$sel:rootDirectory:FSxWindowsFileServerVolumeConfiguration' :: Text
rootDirectory = Text
pRootDirectory_,
$sel:authorizationConfig:FSxWindowsFileServerVolumeConfiguration' :: FSxWindowsFileServerAuthorizationConfig
authorizationConfig =
FSxWindowsFileServerAuthorizationConfig
pAuthorizationConfig_
}
fSxWindowsFileServerVolumeConfiguration_fileSystemId :: Lens.Lens' FSxWindowsFileServerVolumeConfiguration Prelude.Text
fSxWindowsFileServerVolumeConfiguration_fileSystemId :: (Text -> f Text)
-> FSxWindowsFileServerVolumeConfiguration
-> f FSxWindowsFileServerVolumeConfiguration
fSxWindowsFileServerVolumeConfiguration_fileSystemId = (FSxWindowsFileServerVolumeConfiguration -> Text)
-> (FSxWindowsFileServerVolumeConfiguration
-> Text -> FSxWindowsFileServerVolumeConfiguration)
-> Lens
FSxWindowsFileServerVolumeConfiguration
FSxWindowsFileServerVolumeConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FSxWindowsFileServerVolumeConfiguration' {Text
fileSystemId :: Text
$sel:fileSystemId:FSxWindowsFileServerVolumeConfiguration' :: FSxWindowsFileServerVolumeConfiguration -> Text
fileSystemId} -> Text
fileSystemId) (\s :: FSxWindowsFileServerVolumeConfiguration
s@FSxWindowsFileServerVolumeConfiguration' {} Text
a -> FSxWindowsFileServerVolumeConfiguration
s {$sel:fileSystemId:FSxWindowsFileServerVolumeConfiguration' :: Text
fileSystemId = Text
a} :: FSxWindowsFileServerVolumeConfiguration)
fSxWindowsFileServerVolumeConfiguration_rootDirectory :: Lens.Lens' FSxWindowsFileServerVolumeConfiguration Prelude.Text
fSxWindowsFileServerVolumeConfiguration_rootDirectory :: (Text -> f Text)
-> FSxWindowsFileServerVolumeConfiguration
-> f FSxWindowsFileServerVolumeConfiguration
fSxWindowsFileServerVolumeConfiguration_rootDirectory = (FSxWindowsFileServerVolumeConfiguration -> Text)
-> (FSxWindowsFileServerVolumeConfiguration
-> Text -> FSxWindowsFileServerVolumeConfiguration)
-> Lens
FSxWindowsFileServerVolumeConfiguration
FSxWindowsFileServerVolumeConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FSxWindowsFileServerVolumeConfiguration' {Text
rootDirectory :: Text
$sel:rootDirectory:FSxWindowsFileServerVolumeConfiguration' :: FSxWindowsFileServerVolumeConfiguration -> Text
rootDirectory} -> Text
rootDirectory) (\s :: FSxWindowsFileServerVolumeConfiguration
s@FSxWindowsFileServerVolumeConfiguration' {} Text
a -> FSxWindowsFileServerVolumeConfiguration
s {$sel:rootDirectory:FSxWindowsFileServerVolumeConfiguration' :: Text
rootDirectory = Text
a} :: FSxWindowsFileServerVolumeConfiguration)
fSxWindowsFileServerVolumeConfiguration_authorizationConfig :: Lens.Lens' FSxWindowsFileServerVolumeConfiguration FSxWindowsFileServerAuthorizationConfig
fSxWindowsFileServerVolumeConfiguration_authorizationConfig :: (FSxWindowsFileServerAuthorizationConfig
-> f FSxWindowsFileServerAuthorizationConfig)
-> FSxWindowsFileServerVolumeConfiguration
-> f FSxWindowsFileServerVolumeConfiguration
fSxWindowsFileServerVolumeConfiguration_authorizationConfig = (FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerAuthorizationConfig)
-> (FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerVolumeConfiguration)
-> Lens
FSxWindowsFileServerVolumeConfiguration
FSxWindowsFileServerVolumeConfiguration
FSxWindowsFileServerAuthorizationConfig
FSxWindowsFileServerAuthorizationConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\FSxWindowsFileServerVolumeConfiguration' {FSxWindowsFileServerAuthorizationConfig
authorizationConfig :: FSxWindowsFileServerAuthorizationConfig
$sel:authorizationConfig:FSxWindowsFileServerVolumeConfiguration' :: FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerAuthorizationConfig
authorizationConfig} -> FSxWindowsFileServerAuthorizationConfig
authorizationConfig) (\s :: FSxWindowsFileServerVolumeConfiguration
s@FSxWindowsFileServerVolumeConfiguration' {} FSxWindowsFileServerAuthorizationConfig
a -> FSxWindowsFileServerVolumeConfiguration
s {$sel:authorizationConfig:FSxWindowsFileServerVolumeConfiguration' :: FSxWindowsFileServerAuthorizationConfig
authorizationConfig = FSxWindowsFileServerAuthorizationConfig
a} :: FSxWindowsFileServerVolumeConfiguration)
instance
Core.FromJSON
FSxWindowsFileServerVolumeConfiguration
where
parseJSON :: Value -> Parser FSxWindowsFileServerVolumeConfiguration
parseJSON =
String
-> (Object -> Parser FSxWindowsFileServerVolumeConfiguration)
-> Value
-> Parser FSxWindowsFileServerVolumeConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"FSxWindowsFileServerVolumeConfiguration"
( \Object
x ->
Text
-> Text
-> FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerVolumeConfiguration
FSxWindowsFileServerVolumeConfiguration'
(Text
-> Text
-> FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerVolumeConfiguration)
-> Parser Text
-> Parser
(Text
-> FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerVolumeConfiguration)
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
"fileSystemId")
Parser
(Text
-> FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerVolumeConfiguration)
-> Parser Text
-> Parser
(FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerVolumeConfiguration)
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
"rootDirectory")
Parser
(FSxWindowsFileServerAuthorizationConfig
-> FSxWindowsFileServerVolumeConfiguration)
-> Parser FSxWindowsFileServerAuthorizationConfig
-> Parser FSxWindowsFileServerVolumeConfiguration
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser FSxWindowsFileServerAuthorizationConfig
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"authorizationConfig")
)
instance
Prelude.Hashable
FSxWindowsFileServerVolumeConfiguration
instance
Prelude.NFData
FSxWindowsFileServerVolumeConfiguration
instance
Core.ToJSON
FSxWindowsFileServerVolumeConfiguration
where
toJSON :: FSxWindowsFileServerVolumeConfiguration -> Value
toJSON FSxWindowsFileServerVolumeConfiguration' {Text
FSxWindowsFileServerAuthorizationConfig
authorizationConfig :: FSxWindowsFileServerAuthorizationConfig
rootDirectory :: Text
fileSystemId :: Text
$sel:authorizationConfig:FSxWindowsFileServerVolumeConfiguration' :: FSxWindowsFileServerVolumeConfiguration
-> FSxWindowsFileServerAuthorizationConfig
$sel:rootDirectory:FSxWindowsFileServerVolumeConfiguration' :: FSxWindowsFileServerVolumeConfiguration -> Text
$sel:fileSystemId:FSxWindowsFileServerVolumeConfiguration' :: FSxWindowsFileServerVolumeConfiguration -> 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
"fileSystemId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
fileSystemId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"rootDirectory" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
rootDirectory),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"authorizationConfig" Text -> FSxWindowsFileServerAuthorizationConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= FSxWindowsFileServerAuthorizationConfig
authorizationConfig)
]
)