{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data ProjectFileSystemLocation = ProjectFileSystemLocation'
{
ProjectFileSystemLocation -> Maybe Text
identifier :: Prelude.Maybe Prelude.Text,
ProjectFileSystemLocation -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
ProjectFileSystemLocation -> Maybe Text
mountOptions :: Prelude.Maybe Prelude.Text,
ProjectFileSystemLocation -> Maybe Text
mountPoint :: Prelude.Maybe Prelude.Text,
ProjectFileSystemLocation -> Maybe FileSystemType
type' :: Prelude.Maybe FileSystemType
}
deriving (ProjectFileSystemLocation -> ProjectFileSystemLocation -> Bool
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]
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
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.
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'
{ $sel:identifier:ProjectFileSystemLocation' :: Maybe Text
identifier =
forall a. Maybe a
Prelude.Nothing,
$sel:location:ProjectFileSystemLocation' :: Maybe Text
location = forall a. Maybe a
Prelude.Nothing,
$sel:mountOptions:ProjectFileSystemLocation' :: Maybe Text
mountOptions = forall a. Maybe a
Prelude.Nothing,
$sel:mountPoint:ProjectFileSystemLocation' :: Maybe Text
mountPoint = forall a. Maybe a
Prelude.Nothing,
$sel:type':ProjectFileSystemLocation' :: Maybe FileSystemType
type' = forall a. Maybe a
Prelude.Nothing
}
projectFileSystemLocation_identifier :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe Prelude.Text)
projectFileSystemLocation_identifier :: Lens' ProjectFileSystemLocation (Maybe Text)
projectFileSystemLocation_identifier = 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_location :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe Prelude.Text)
projectFileSystemLocation_location :: Lens' ProjectFileSystemLocation (Maybe Text)
projectFileSystemLocation_location = 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_mountOptions :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe Prelude.Text)
projectFileSystemLocation_mountOptions :: Lens' ProjectFileSystemLocation (Maybe Text)
projectFileSystemLocation_mountOptions = 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_mountPoint :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe Prelude.Text)
projectFileSystemLocation_mountPoint :: Lens' ProjectFileSystemLocation (Maybe Text)
projectFileSystemLocation_mountPoint = 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)
projectFileSystemLocation_type :: Lens.Lens' ProjectFileSystemLocation (Prelude.Maybe FileSystemType)
projectFileSystemLocation_type :: Lens' ProjectFileSystemLocation (Maybe FileSystemType)
projectFileSystemLocation_type = 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)
instance Data.FromJSON ProjectFileSystemLocation where
parseJSON :: Value -> Parser ProjectFileSystemLocation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProjectFileSystemLocation"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe FileSystemType
-> ProjectFileSystemLocation
ProjectFileSystemLocation'
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
"identifier")
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
"location")
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
"mountOptions")
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
"mountPoint")
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
"type")
)
instance Prelude.Hashable ProjectFileSystemLocation where
hashWithSalt :: Int -> ProjectFileSystemLocation -> Int
hashWithSalt Int
_salt ProjectFileSystemLocation' {Maybe Text
Maybe FileSystemType
type' :: Maybe FileSystemType
mountPoint :: Maybe Text
mountOptions :: Maybe Text
location :: Maybe Text
identifier :: Maybe Text
$sel:type':ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe FileSystemType
$sel:mountPoint:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:mountOptions:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:location:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:identifier:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
identifier
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
mountOptions
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
mountPoint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe FileSystemType
type'
instance Prelude.NFData ProjectFileSystemLocation where
rnf :: ProjectFileSystemLocation -> ()
rnf ProjectFileSystemLocation' {Maybe Text
Maybe FileSystemType
type' :: Maybe FileSystemType
mountPoint :: Maybe Text
mountOptions :: Maybe Text
location :: Maybe Text
identifier :: Maybe Text
$sel:type':ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe FileSystemType
$sel:mountPoint:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:mountOptions:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:location:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:identifier:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
identifier
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
location
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mountOptions
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
mountPoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe FileSystemType
type'
instance Data.ToJSON ProjectFileSystemLocation where
toJSON :: ProjectFileSystemLocation -> Value
toJSON ProjectFileSystemLocation' {Maybe Text
Maybe FileSystemType
type' :: Maybe FileSystemType
mountPoint :: Maybe Text
mountOptions :: Maybe Text
location :: Maybe Text
identifier :: Maybe Text
$sel:type':ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe FileSystemType
$sel:mountPoint:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:mountOptions:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:location:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
$sel:identifier:ProjectFileSystemLocation' :: ProjectFileSystemLocation -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"identifier" 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
identifier,
(Key
"location" 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
location,
(Key
"mountOptions" 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
mountOptions,
(Key
"mountPoint" 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
mountPoint,
(Key
"type" 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 FileSystemType
type'
]
)