{-# 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.Nimble.Types.SharedFileSystemConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SharedFileSystemConfiguration = SharedFileSystemConfiguration'
{
SharedFileSystemConfiguration -> Maybe Text
fileSystemId :: Prelude.Maybe Prelude.Text,
SharedFileSystemConfiguration -> Maybe Text
windowsMountDrive :: Prelude.Maybe Prelude.Text,
SharedFileSystemConfiguration -> Maybe Text
linuxMountPoint :: Prelude.Maybe Prelude.Text,
SharedFileSystemConfiguration -> Maybe Text
shareName :: Prelude.Maybe Prelude.Text,
SharedFileSystemConfiguration -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text
}
deriving (SharedFileSystemConfiguration
-> SharedFileSystemConfiguration -> Bool
(SharedFileSystemConfiguration
-> SharedFileSystemConfiguration -> Bool)
-> (SharedFileSystemConfiguration
-> SharedFileSystemConfiguration -> Bool)
-> Eq SharedFileSystemConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SharedFileSystemConfiguration
-> SharedFileSystemConfiguration -> Bool
$c/= :: SharedFileSystemConfiguration
-> SharedFileSystemConfiguration -> Bool
== :: SharedFileSystemConfiguration
-> SharedFileSystemConfiguration -> Bool
$c== :: SharedFileSystemConfiguration
-> SharedFileSystemConfiguration -> Bool
Prelude.Eq, ReadPrec [SharedFileSystemConfiguration]
ReadPrec SharedFileSystemConfiguration
Int -> ReadS SharedFileSystemConfiguration
ReadS [SharedFileSystemConfiguration]
(Int -> ReadS SharedFileSystemConfiguration)
-> ReadS [SharedFileSystemConfiguration]
-> ReadPrec SharedFileSystemConfiguration
-> ReadPrec [SharedFileSystemConfiguration]
-> Read SharedFileSystemConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SharedFileSystemConfiguration]
$creadListPrec :: ReadPrec [SharedFileSystemConfiguration]
readPrec :: ReadPrec SharedFileSystemConfiguration
$creadPrec :: ReadPrec SharedFileSystemConfiguration
readList :: ReadS [SharedFileSystemConfiguration]
$creadList :: ReadS [SharedFileSystemConfiguration]
readsPrec :: Int -> ReadS SharedFileSystemConfiguration
$creadsPrec :: Int -> ReadS SharedFileSystemConfiguration
Prelude.Read, Int -> SharedFileSystemConfiguration -> ShowS
[SharedFileSystemConfiguration] -> ShowS
SharedFileSystemConfiguration -> String
(Int -> SharedFileSystemConfiguration -> ShowS)
-> (SharedFileSystemConfiguration -> String)
-> ([SharedFileSystemConfiguration] -> ShowS)
-> Show SharedFileSystemConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SharedFileSystemConfiguration] -> ShowS
$cshowList :: [SharedFileSystemConfiguration] -> ShowS
show :: SharedFileSystemConfiguration -> String
$cshow :: SharedFileSystemConfiguration -> String
showsPrec :: Int -> SharedFileSystemConfiguration -> ShowS
$cshowsPrec :: Int -> SharedFileSystemConfiguration -> ShowS
Prelude.Show, (forall x.
SharedFileSystemConfiguration
-> Rep SharedFileSystemConfiguration x)
-> (forall x.
Rep SharedFileSystemConfiguration x
-> SharedFileSystemConfiguration)
-> Generic SharedFileSystemConfiguration
forall x.
Rep SharedFileSystemConfiguration x
-> SharedFileSystemConfiguration
forall x.
SharedFileSystemConfiguration
-> Rep SharedFileSystemConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SharedFileSystemConfiguration x
-> SharedFileSystemConfiguration
$cfrom :: forall x.
SharedFileSystemConfiguration
-> Rep SharedFileSystemConfiguration x
Prelude.Generic)
newSharedFileSystemConfiguration ::
SharedFileSystemConfiguration
newSharedFileSystemConfiguration :: SharedFileSystemConfiguration
newSharedFileSystemConfiguration =
SharedFileSystemConfiguration' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SharedFileSystemConfiguration
SharedFileSystemConfiguration'
{ $sel:fileSystemId:SharedFileSystemConfiguration' :: Maybe Text
fileSystemId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:windowsMountDrive:SharedFileSystemConfiguration' :: Maybe Text
windowsMountDrive = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:linuxMountPoint:SharedFileSystemConfiguration' :: Maybe Text
linuxMountPoint = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:shareName:SharedFileSystemConfiguration' :: Maybe Text
shareName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:endpoint:SharedFileSystemConfiguration' :: Maybe Text
endpoint = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
sharedFileSystemConfiguration_fileSystemId :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_fileSystemId :: (Maybe Text -> f (Maybe Text))
-> SharedFileSystemConfiguration -> f SharedFileSystemConfiguration
sharedFileSystemConfiguration_fileSystemId = (SharedFileSystemConfiguration -> Maybe Text)
-> (SharedFileSystemConfiguration
-> Maybe Text -> SharedFileSystemConfiguration)
-> Lens
SharedFileSystemConfiguration
SharedFileSystemConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedFileSystemConfiguration' {Maybe Text
fileSystemId :: Maybe Text
$sel:fileSystemId:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
fileSystemId} -> Maybe Text
fileSystemId) (\s :: SharedFileSystemConfiguration
s@SharedFileSystemConfiguration' {} Maybe Text
a -> SharedFileSystemConfiguration
s {$sel:fileSystemId:SharedFileSystemConfiguration' :: Maybe Text
fileSystemId = Maybe Text
a} :: SharedFileSystemConfiguration)
sharedFileSystemConfiguration_windowsMountDrive :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_windowsMountDrive :: (Maybe Text -> f (Maybe Text))
-> SharedFileSystemConfiguration -> f SharedFileSystemConfiguration
sharedFileSystemConfiguration_windowsMountDrive = (SharedFileSystemConfiguration -> Maybe Text)
-> (SharedFileSystemConfiguration
-> Maybe Text -> SharedFileSystemConfiguration)
-> Lens
SharedFileSystemConfiguration
SharedFileSystemConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedFileSystemConfiguration' {Maybe Text
windowsMountDrive :: Maybe Text
$sel:windowsMountDrive:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
windowsMountDrive} -> Maybe Text
windowsMountDrive) (\s :: SharedFileSystemConfiguration
s@SharedFileSystemConfiguration' {} Maybe Text
a -> SharedFileSystemConfiguration
s {$sel:windowsMountDrive:SharedFileSystemConfiguration' :: Maybe Text
windowsMountDrive = Maybe Text
a} :: SharedFileSystemConfiguration)
sharedFileSystemConfiguration_linuxMountPoint :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_linuxMountPoint :: (Maybe Text -> f (Maybe Text))
-> SharedFileSystemConfiguration -> f SharedFileSystemConfiguration
sharedFileSystemConfiguration_linuxMountPoint = (SharedFileSystemConfiguration -> Maybe Text)
-> (SharedFileSystemConfiguration
-> Maybe Text -> SharedFileSystemConfiguration)
-> Lens
SharedFileSystemConfiguration
SharedFileSystemConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedFileSystemConfiguration' {Maybe Text
linuxMountPoint :: Maybe Text
$sel:linuxMountPoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
linuxMountPoint} -> Maybe Text
linuxMountPoint) (\s :: SharedFileSystemConfiguration
s@SharedFileSystemConfiguration' {} Maybe Text
a -> SharedFileSystemConfiguration
s {$sel:linuxMountPoint:SharedFileSystemConfiguration' :: Maybe Text
linuxMountPoint = Maybe Text
a} :: SharedFileSystemConfiguration)
sharedFileSystemConfiguration_shareName :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_shareName :: (Maybe Text -> f (Maybe Text))
-> SharedFileSystemConfiguration -> f SharedFileSystemConfiguration
sharedFileSystemConfiguration_shareName = (SharedFileSystemConfiguration -> Maybe Text)
-> (SharedFileSystemConfiguration
-> Maybe Text -> SharedFileSystemConfiguration)
-> Lens
SharedFileSystemConfiguration
SharedFileSystemConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedFileSystemConfiguration' {Maybe Text
shareName :: Maybe Text
$sel:shareName:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
shareName} -> Maybe Text
shareName) (\s :: SharedFileSystemConfiguration
s@SharedFileSystemConfiguration' {} Maybe Text
a -> SharedFileSystemConfiguration
s {$sel:shareName:SharedFileSystemConfiguration' :: Maybe Text
shareName = Maybe Text
a} :: SharedFileSystemConfiguration)
sharedFileSystemConfiguration_endpoint :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_endpoint :: (Maybe Text -> f (Maybe Text))
-> SharedFileSystemConfiguration -> f SharedFileSystemConfiguration
sharedFileSystemConfiguration_endpoint = (SharedFileSystemConfiguration -> Maybe Text)
-> (SharedFileSystemConfiguration
-> Maybe Text -> SharedFileSystemConfiguration)
-> Lens
SharedFileSystemConfiguration
SharedFileSystemConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedFileSystemConfiguration' {Maybe Text
endpoint :: Maybe Text
$sel:endpoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
endpoint} -> Maybe Text
endpoint) (\s :: SharedFileSystemConfiguration
s@SharedFileSystemConfiguration' {} Maybe Text
a -> SharedFileSystemConfiguration
s {$sel:endpoint:SharedFileSystemConfiguration' :: Maybe Text
endpoint = Maybe Text
a} :: SharedFileSystemConfiguration)
instance Core.FromJSON SharedFileSystemConfiguration where
parseJSON :: Value -> Parser SharedFileSystemConfiguration
parseJSON =
String
-> (Object -> Parser SharedFileSystemConfiguration)
-> Value
-> Parser SharedFileSystemConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SharedFileSystemConfiguration"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SharedFileSystemConfiguration
SharedFileSystemConfiguration'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SharedFileSystemConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SharedFileSystemConfiguration)
forall (f :: * -> *) a b. Functor 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
"fileSystemId")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SharedFileSystemConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> SharedFileSystemConfiguration)
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
"windowsMountDrive")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> SharedFileSystemConfiguration)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> SharedFileSystemConfiguration)
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
"linuxMountPoint")
Parser (Maybe Text -> Maybe Text -> SharedFileSystemConfiguration)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> SharedFileSystemConfiguration)
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
"shareName")
Parser (Maybe Text -> SharedFileSystemConfiguration)
-> Parser (Maybe Text) -> Parser SharedFileSystemConfiguration
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
"endpoint")
)
instance
Prelude.Hashable
SharedFileSystemConfiguration
instance Prelude.NFData SharedFileSystemConfiguration
instance Core.ToJSON SharedFileSystemConfiguration where
toJSON :: SharedFileSystemConfiguration -> Value
toJSON SharedFileSystemConfiguration' {Maybe Text
endpoint :: Maybe Text
shareName :: Maybe Text
linuxMountPoint :: Maybe Text
windowsMountDrive :: Maybe Text
fileSystemId :: Maybe Text
$sel:endpoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:shareName:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:linuxMountPoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:windowsMountDrive:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:fileSystemId:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"fileSystemId" 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
fileSystemId,
(Text
"windowsMountDrive" 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
windowsMountDrive,
(Text
"linuxMountPoint" 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
linuxMountPoint,
(Text
"shareName" 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
shareName,
(Text
"endpoint" 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
endpoint
]
)