{-# 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.CodeBuild.Types.ProjectFileSystemLocation where
import Amazonka.CodeBuild.Types.FileSystemType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProjectFileSystemLocation = ProjectFileSystemLocation'
{
ProjectFileSystemLocation -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
ProjectFileSystemLocation -> Maybe Text
identifier :: Prelude.Maybe Prelude.Text,
ProjectFileSystemLocation -> Maybe Text
mountOptions :: Prelude.Maybe Prelude.Text,
ProjectFileSystemLocation -> Maybe FileSystemType
type' :: Prelude.Maybe FileSystemType,
ProjectFileSystemLocation -> Maybe Text
mountPoint :: Prelude.Maybe Prelude.Text
}
deriving (ProjectFileSystemLocation -> ProjectFileSystemLocation -> Bool
(ProjectFileSystemLocation -> ProjectFileSystemLocation -> Bool)
-> (ProjectFileSystemLocation -> ProjectFileSystemLocation -> Bool)
-> Eq ProjectFileSystemLocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectFileSystemLocation -> ProjectFileSystemLocation -> Bool
$c/= :: ProjectFileSystemLocation -> ProjectFileSystemLocation -> Bool
== :: ProjectFileSystemLocation -> ProjectFileSystemLocation -> Bool
$c== :: ProjectFileSystemLocation -> ProjectFileSystemLocation -> Bool
Prelude.Eq, ReadPrec [ProjectFileSystemLocation]
ReadPrec ProjectFileSystemLocation
Int -> ReadS ProjectFileSystemLocation
ReadS [ProjectFileSystemLocation]
(Int -> ReadS ProjectFileSystemLocation)
-> ReadS [ProjectFileSystemLocation]
-> ReadPrec ProjectFileSystemLocation
-> ReadPrec [ProjectFileSystemLocation]
-> Read ProjectFileSystemLocation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProjectFileSystemLocation]
$creadListPrec :: ReadPrec [ProjectFileSystemLocation]
readPrec :: ReadPrec ProjectFileSystemLocation
$creadPrec :: ReadPrec ProjectFileSystemLocation
readList :: ReadS [ProjectFileSystemLocation]
$creadList :: ReadS [ProjectFileSystemLocation]
readsPrec :: Int -> ReadS ProjectFileSystemLocation
$creadsPrec :: Int -> ReadS ProjectFileSystemLocation
Prelude.Read, Int -> ProjectFileSystemLocation -> ShowS
[ProjectFileSystemLocation] -> ShowS
ProjectFileSystemLocation -> String
(Int -> ProjectFileSystemLocation -> ShowS)
-> (ProjectFileSystemLocation -> String)
-> ([ProjectFileSystemLocation] -> ShowS)
-> Show ProjectFileSystemLocation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectFileSystemLocation] -> ShowS
$cshowList :: [ProjectFileSystemLocation] -> ShowS
show :: ProjectFileSystemLocation -> String
$cshow :: ProjectFileSystemLocation -> String
showsPrec :: Int -> ProjectFileSystemLocation -> ShowS
$cshowsPrec :: Int -> ProjectFileSystemLocation -> ShowS
Prelude.Show, (forall x.
ProjectFileSystemLocation -> Rep ProjectFileSystemLocation x)
-> (forall x.
Rep ProjectFileSystemLocation x -> ProjectFileSystemLocation)
-> Generic ProjectFileSystemLocation
forall x.
Rep ProjectFileSystemLocation x -> ProjectFileSystemLocation
forall x.
ProjectFileSystemLocation -> Rep ProjectFileSystemLocation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ProjectFileSystemLocation x -> ProjectFileSystemLocation
$cfrom :: forall x.
ProjectFileSystemLocation -> Rep ProjectFileSystemLocation x
Prelude.Generic)
newProjectFileSystemLocation ::
ProjectFileSystemLocation
newProjectFileSystemLocation :: ProjectFileSystemLocation
newProjectFileSystemLocation =
ProjectFileSystemLocation' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FileSystemType
-> Maybe Text
-> ProjectFileSystemLocation
ProjectFileSystemLocation'
{ $sel:location:ProjectFileSystemLocation' :: Maybe Text
location =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identifier:ProjectFileSystemLocation' :: Maybe Text
identifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:mountOptions:ProjectFileSystemLocation' :: Maybe Text
mountOptions = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':ProjectFileSystemLocation' :: Maybe FileSystemType
type' = Maybe FileSystemType
forall a. Maybe a
Prelude.Nothing,
$sel:mountPoint:ProjectFileSystemLocation' :: Maybe Text
mountPoint = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
projectFileSystemLocation_location :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe Prelude.Text)
projectFileSystemLocation_location :: (Maybe Text -> f (Maybe Text))
-> ProjectFileSystemLocation -> f ProjectFileSystemLocation
projectFileSystemLocation_location = (ProjectFileSystemLocation -> Maybe Text)
-> (ProjectFileSystemLocation
-> Maybe Text -> ProjectFileSystemLocation)
-> Lens
ProjectFileSystemLocation
ProjectFileSystemLocation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectFileSystemLocation' {Maybe Text
location :: Maybe Text
$sel:location:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
location} -> Maybe Text
location) (\s :: ProjectFileSystemLocation
s@ProjectFileSystemLocation' {} Maybe Text
a -> ProjectFileSystemLocation
s {$sel:location:ProjectFileSystemLocation' :: Maybe Text
location = Maybe Text
a} :: ProjectFileSystemLocation)
projectFileSystemLocation_identifier :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe Prelude.Text)
projectFileSystemLocation_identifier :: (Maybe Text -> f (Maybe Text))
-> ProjectFileSystemLocation -> f ProjectFileSystemLocation
projectFileSystemLocation_identifier = (ProjectFileSystemLocation -> Maybe Text)
-> (ProjectFileSystemLocation
-> Maybe Text -> ProjectFileSystemLocation)
-> Lens
ProjectFileSystemLocation
ProjectFileSystemLocation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectFileSystemLocation' {Maybe Text
identifier :: Maybe Text
$sel:identifier:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
identifier} -> Maybe Text
identifier) (\s :: ProjectFileSystemLocation
s@ProjectFileSystemLocation' {} Maybe Text
a -> ProjectFileSystemLocation
s {$sel:identifier:ProjectFileSystemLocation' :: Maybe Text
identifier = Maybe Text
a} :: ProjectFileSystemLocation)
projectFileSystemLocation_mountOptions :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe Prelude.Text)
projectFileSystemLocation_mountOptions :: (Maybe Text -> f (Maybe Text))
-> ProjectFileSystemLocation -> f ProjectFileSystemLocation
projectFileSystemLocation_mountOptions = (ProjectFileSystemLocation -> Maybe Text)
-> (ProjectFileSystemLocation
-> Maybe Text -> ProjectFileSystemLocation)
-> Lens
ProjectFileSystemLocation
ProjectFileSystemLocation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectFileSystemLocation' {Maybe Text
mountOptions :: Maybe Text
$sel:mountOptions:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
mountOptions} -> Maybe Text
mountOptions) (\s :: ProjectFileSystemLocation
s@ProjectFileSystemLocation' {} Maybe Text
a -> ProjectFileSystemLocation
s {$sel:mountOptions:ProjectFileSystemLocation' :: Maybe Text
mountOptions = Maybe Text
a} :: ProjectFileSystemLocation)
projectFileSystemLocation_type :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe FileSystemType)
projectFileSystemLocation_type :: (Maybe FileSystemType -> f (Maybe FileSystemType))
-> ProjectFileSystemLocation -> f ProjectFileSystemLocation
projectFileSystemLocation_type = (ProjectFileSystemLocation -> Maybe FileSystemType)
-> (ProjectFileSystemLocation
-> Maybe FileSystemType -> ProjectFileSystemLocation)
-> Lens
ProjectFileSystemLocation
ProjectFileSystemLocation
(Maybe FileSystemType)
(Maybe FileSystemType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectFileSystemLocation' {Maybe FileSystemType
type' :: Maybe FileSystemType
$sel:type':ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe FileSystemType
type'} -> Maybe FileSystemType
type') (\s :: ProjectFileSystemLocation
s@ProjectFileSystemLocation' {} Maybe FileSystemType
a -> ProjectFileSystemLocation
s {$sel:type':ProjectFileSystemLocation' :: Maybe FileSystemType
type' = Maybe FileSystemType
a} :: ProjectFileSystemLocation)
projectFileSystemLocation_mountPoint :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe Prelude.Text)
projectFileSystemLocation_mountPoint :: (Maybe Text -> f (Maybe Text))
-> ProjectFileSystemLocation -> f ProjectFileSystemLocation
projectFileSystemLocation_mountPoint = (ProjectFileSystemLocation -> Maybe Text)
-> (ProjectFileSystemLocation
-> Maybe Text -> ProjectFileSystemLocation)
-> Lens
ProjectFileSystemLocation
ProjectFileSystemLocation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectFileSystemLocation' {Maybe Text
mountPoint :: Maybe Text
$sel:mountPoint:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
mountPoint} -> Maybe Text
mountPoint) (\s :: ProjectFileSystemLocation
s@ProjectFileSystemLocation' {} Maybe Text
a -> ProjectFileSystemLocation
s {$sel:mountPoint:ProjectFileSystemLocation' :: Maybe Text
mountPoint = Maybe Text
a} :: ProjectFileSystemLocation)
instance Core.FromJSON ProjectFileSystemLocation where
parseJSON :: Value -> Parser ProjectFileSystemLocation
parseJSON =
String
-> (Object -> Parser ProjectFileSystemLocation)
-> Value
-> Parser ProjectFileSystemLocation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProjectFileSystemLocation"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FileSystemType
-> Maybe Text
-> ProjectFileSystemLocation
ProjectFileSystemLocation'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FileSystemType
-> Maybe Text
-> ProjectFileSystemLocation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe FileSystemType
-> Maybe Text
-> ProjectFileSystemLocation)
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
"location")
Parser
(Maybe Text
-> Maybe Text
-> Maybe FileSystemType
-> Maybe Text
-> ProjectFileSystemLocation)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe FileSystemType -> Maybe Text -> ProjectFileSystemLocation)
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
"identifier")
Parser
(Maybe Text
-> Maybe FileSystemType -> Maybe Text -> ProjectFileSystemLocation)
-> Parser (Maybe Text)
-> Parser
(Maybe FileSystemType -> Maybe Text -> ProjectFileSystemLocation)
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
"mountOptions")
Parser
(Maybe FileSystemType -> Maybe Text -> ProjectFileSystemLocation)
-> Parser (Maybe FileSystemType)
-> Parser (Maybe Text -> ProjectFileSystemLocation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FileSystemType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"type")
Parser (Maybe Text -> ProjectFileSystemLocation)
-> Parser (Maybe Text) -> Parser ProjectFileSystemLocation
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
"mountPoint")
)
instance Prelude.Hashable ProjectFileSystemLocation
instance Prelude.NFData ProjectFileSystemLocation
instance Core.ToJSON ProjectFileSystemLocation where
toJSON :: ProjectFileSystemLocation -> Value
toJSON ProjectFileSystemLocation' {Maybe Text
Maybe FileSystemType
mountPoint :: Maybe Text
type' :: Maybe FileSystemType
mountOptions :: Maybe Text
identifier :: Maybe Text
location :: Maybe Text
$sel:mountPoint:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:type':ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe FileSystemType
$sel:mountOptions:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:identifier:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:location:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"location" 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
location,
(Text
"identifier" 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
identifier,
(Text
"mountOptions" 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
mountOptions,
(Text
"type" Text -> FileSystemType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (FileSystemType -> Pair) -> Maybe FileSystemType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe FileSystemType
type',
(Text
"mountPoint" 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
mountPoint
]
)