{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Nimble.Types.SharedFileSystemConfiguration
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Nimble.Types.SharedFileSystemConfiguration 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

-- | The configuration for a shared file storage system that is associated
-- with a studio resource.
--
-- /See:/ 'newSharedFileSystemConfiguration' smart constructor.
data SharedFileSystemConfiguration = SharedFileSystemConfiguration'
  { -- | The endpoint of the shared file system that is accessed by the studio
    -- component resource.
    SharedFileSystemConfiguration -> Maybe (Sensitive Text)
endpoint :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The unique identifier for a file system.
    SharedFileSystemConfiguration -> Maybe Text
fileSystemId :: Prelude.Maybe Prelude.Text,
    -- | The mount location for a shared file system on a Linux virtual
    -- workstation.
    SharedFileSystemConfiguration -> Maybe (Sensitive Text)
linuxMountPoint :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The name of the file share.
    SharedFileSystemConfiguration -> Maybe (Sensitive Text)
shareName :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The mount location for a shared file system on a Windows virtual
    -- workstation.
    SharedFileSystemConfiguration -> Maybe Text
windowsMountDrive :: Prelude.Maybe Prelude.Text
  }
  deriving (SharedFileSystemConfiguration
-> SharedFileSystemConfiguration -> Bool
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, Int -> SharedFileSystemConfiguration -> ShowS
[SharedFileSystemConfiguration] -> ShowS
SharedFileSystemConfiguration -> String
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.
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)

-- |
-- Create a value of 'SharedFileSystemConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'endpoint', 'sharedFileSystemConfiguration_endpoint' - The endpoint of the shared file system that is accessed by the studio
-- component resource.
--
-- 'fileSystemId', 'sharedFileSystemConfiguration_fileSystemId' - The unique identifier for a file system.
--
-- 'linuxMountPoint', 'sharedFileSystemConfiguration_linuxMountPoint' - The mount location for a shared file system on a Linux virtual
-- workstation.
--
-- 'shareName', 'sharedFileSystemConfiguration_shareName' - The name of the file share.
--
-- 'windowsMountDrive', 'sharedFileSystemConfiguration_windowsMountDrive' - The mount location for a shared file system on a Windows virtual
-- workstation.
newSharedFileSystemConfiguration ::
  SharedFileSystemConfiguration
newSharedFileSystemConfiguration :: SharedFileSystemConfiguration
newSharedFileSystemConfiguration =
  SharedFileSystemConfiguration'
    { $sel:endpoint:SharedFileSystemConfiguration' :: Maybe (Sensitive Text)
endpoint =
        forall a. Maybe a
Prelude.Nothing,
      $sel:fileSystemId:SharedFileSystemConfiguration' :: Maybe Text
fileSystemId = forall a. Maybe a
Prelude.Nothing,
      $sel:linuxMountPoint:SharedFileSystemConfiguration' :: Maybe (Sensitive Text)
linuxMountPoint = forall a. Maybe a
Prelude.Nothing,
      $sel:shareName:SharedFileSystemConfiguration' :: Maybe (Sensitive Text)
shareName = forall a. Maybe a
Prelude.Nothing,
      $sel:windowsMountDrive:SharedFileSystemConfiguration' :: Maybe Text
windowsMountDrive = forall a. Maybe a
Prelude.Nothing
    }

-- | The endpoint of the shared file system that is accessed by the studio
-- component resource.
sharedFileSystemConfiguration_endpoint :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_endpoint :: Lens' SharedFileSystemConfiguration (Maybe Text)
sharedFileSystemConfiguration_endpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedFileSystemConfiguration' {Maybe (Sensitive Text)
endpoint :: Maybe (Sensitive Text)
$sel:endpoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
endpoint} -> Maybe (Sensitive Text)
endpoint) (\s :: SharedFileSystemConfiguration
s@SharedFileSystemConfiguration' {} Maybe (Sensitive Text)
a -> SharedFileSystemConfiguration
s {$sel:endpoint:SharedFileSystemConfiguration' :: Maybe (Sensitive Text)
endpoint = Maybe (Sensitive Text)
a} :: SharedFileSystemConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The unique identifier for a file system.
sharedFileSystemConfiguration_fileSystemId :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_fileSystemId :: Lens' SharedFileSystemConfiguration (Maybe Text)
sharedFileSystemConfiguration_fileSystemId = 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)

-- | The mount location for a shared file system on a Linux virtual
-- workstation.
sharedFileSystemConfiguration_linuxMountPoint :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_linuxMountPoint :: Lens' SharedFileSystemConfiguration (Maybe Text)
sharedFileSystemConfiguration_linuxMountPoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedFileSystemConfiguration' {Maybe (Sensitive Text)
linuxMountPoint :: Maybe (Sensitive Text)
$sel:linuxMountPoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
linuxMountPoint} -> Maybe (Sensitive Text)
linuxMountPoint) (\s :: SharedFileSystemConfiguration
s@SharedFileSystemConfiguration' {} Maybe (Sensitive Text)
a -> SharedFileSystemConfiguration
s {$sel:linuxMountPoint:SharedFileSystemConfiguration' :: Maybe (Sensitive Text)
linuxMountPoint = Maybe (Sensitive Text)
a} :: SharedFileSystemConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The name of the file share.
sharedFileSystemConfiguration_shareName :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_shareName :: Lens' SharedFileSystemConfiguration (Maybe Text)
sharedFileSystemConfiguration_shareName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SharedFileSystemConfiguration' {Maybe (Sensitive Text)
shareName :: Maybe (Sensitive Text)
$sel:shareName:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
shareName} -> Maybe (Sensitive Text)
shareName) (\s :: SharedFileSystemConfiguration
s@SharedFileSystemConfiguration' {} Maybe (Sensitive Text)
a -> SharedFileSystemConfiguration
s {$sel:shareName:SharedFileSystemConfiguration' :: Maybe (Sensitive Text)
shareName = Maybe (Sensitive Text)
a} :: SharedFileSystemConfiguration) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The mount location for a shared file system on a Windows virtual
-- workstation.
sharedFileSystemConfiguration_windowsMountDrive :: Lens.Lens' SharedFileSystemConfiguration (Prelude.Maybe Prelude.Text)
sharedFileSystemConfiguration_windowsMountDrive :: Lens' SharedFileSystemConfiguration (Maybe Text)
sharedFileSystemConfiguration_windowsMountDrive = 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)

instance Data.FromJSON SharedFileSystemConfiguration where
  parseJSON :: Value -> Parser SharedFileSystemConfiguration
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"SharedFileSystemConfiguration"
      ( \Object
x ->
          Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> SharedFileSystemConfiguration
SharedFileSystemConfiguration'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"endpoint")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fileSystemId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"linuxMountPoint")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"shareName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"windowsMountDrive")
      )

instance
  Prelude.Hashable
    SharedFileSystemConfiguration
  where
  hashWithSalt :: Int -> SharedFileSystemConfiguration -> Int
hashWithSalt Int
_salt SharedFileSystemConfiguration' {Maybe Text
Maybe (Sensitive Text)
windowsMountDrive :: Maybe Text
shareName :: Maybe (Sensitive Text)
linuxMountPoint :: Maybe (Sensitive Text)
fileSystemId :: Maybe Text
endpoint :: Maybe (Sensitive Text)
$sel:windowsMountDrive:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:shareName:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
$sel:linuxMountPoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
$sel:fileSystemId:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:endpoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
endpoint
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fileSystemId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
linuxMountPoint
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
shareName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
windowsMountDrive

instance Prelude.NFData SharedFileSystemConfiguration where
  rnf :: SharedFileSystemConfiguration -> ()
rnf SharedFileSystemConfiguration' {Maybe Text
Maybe (Sensitive Text)
windowsMountDrive :: Maybe Text
shareName :: Maybe (Sensitive Text)
linuxMountPoint :: Maybe (Sensitive Text)
fileSystemId :: Maybe Text
endpoint :: Maybe (Sensitive Text)
$sel:windowsMountDrive:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:shareName:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
$sel:linuxMountPoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
$sel:fileSystemId:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:endpoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
endpoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fileSystemId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
linuxMountPoint
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
shareName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
windowsMountDrive

instance Data.ToJSON SharedFileSystemConfiguration where
  toJSON :: SharedFileSystemConfiguration -> Value
toJSON SharedFileSystemConfiguration' {Maybe Text
Maybe (Sensitive Text)
windowsMountDrive :: Maybe Text
shareName :: Maybe (Sensitive Text)
linuxMountPoint :: Maybe (Sensitive Text)
fileSystemId :: Maybe Text
endpoint :: Maybe (Sensitive Text)
$sel:windowsMountDrive:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:shareName:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
$sel:linuxMountPoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
$sel:fileSystemId:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe Text
$sel:endpoint:SharedFileSystemConfiguration' :: SharedFileSystemConfiguration -> Maybe (Sensitive Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"endpoint" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
endpoint,
            (Key
"fileSystemId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
fileSystemId,
            (Key
"linuxMountPoint" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
linuxMountPoint,
            (Key
"shareName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
shareName,
            (Key
"windowsMountDrive" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
windowsMountDrive
          ]
      )