{-# 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.CodeCommit.Types.SymbolicLink where
import Amazonka.CodeCommit.Types.FileModeTypeEnum
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SymbolicLink = SymbolicLink'
{
SymbolicLink -> Maybe Text
absolutePath :: Prelude.Maybe Prelude.Text,
SymbolicLink -> Maybe FileModeTypeEnum
fileMode :: Prelude.Maybe FileModeTypeEnum,
SymbolicLink -> Maybe Text
blobId :: Prelude.Maybe Prelude.Text,
SymbolicLink -> Maybe Text
relativePath :: Prelude.Maybe Prelude.Text
}
deriving (SymbolicLink -> SymbolicLink -> Bool
(SymbolicLink -> SymbolicLink -> Bool)
-> (SymbolicLink -> SymbolicLink -> Bool) -> Eq SymbolicLink
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SymbolicLink -> SymbolicLink -> Bool
$c/= :: SymbolicLink -> SymbolicLink -> Bool
== :: SymbolicLink -> SymbolicLink -> Bool
$c== :: SymbolicLink -> SymbolicLink -> Bool
Prelude.Eq, ReadPrec [SymbolicLink]
ReadPrec SymbolicLink
Int -> ReadS SymbolicLink
ReadS [SymbolicLink]
(Int -> ReadS SymbolicLink)
-> ReadS [SymbolicLink]
-> ReadPrec SymbolicLink
-> ReadPrec [SymbolicLink]
-> Read SymbolicLink
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SymbolicLink]
$creadListPrec :: ReadPrec [SymbolicLink]
readPrec :: ReadPrec SymbolicLink
$creadPrec :: ReadPrec SymbolicLink
readList :: ReadS [SymbolicLink]
$creadList :: ReadS [SymbolicLink]
readsPrec :: Int -> ReadS SymbolicLink
$creadsPrec :: Int -> ReadS SymbolicLink
Prelude.Read, Int -> SymbolicLink -> ShowS
[SymbolicLink] -> ShowS
SymbolicLink -> String
(Int -> SymbolicLink -> ShowS)
-> (SymbolicLink -> String)
-> ([SymbolicLink] -> ShowS)
-> Show SymbolicLink
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SymbolicLink] -> ShowS
$cshowList :: [SymbolicLink] -> ShowS
show :: SymbolicLink -> String
$cshow :: SymbolicLink -> String
showsPrec :: Int -> SymbolicLink -> ShowS
$cshowsPrec :: Int -> SymbolicLink -> ShowS
Prelude.Show, (forall x. SymbolicLink -> Rep SymbolicLink x)
-> (forall x. Rep SymbolicLink x -> SymbolicLink)
-> Generic SymbolicLink
forall x. Rep SymbolicLink x -> SymbolicLink
forall x. SymbolicLink -> Rep SymbolicLink x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SymbolicLink x -> SymbolicLink
$cfrom :: forall x. SymbolicLink -> Rep SymbolicLink x
Prelude.Generic)
newSymbolicLink ::
SymbolicLink
newSymbolicLink :: SymbolicLink
newSymbolicLink =
SymbolicLink' :: Maybe Text
-> Maybe FileModeTypeEnum
-> Maybe Text
-> Maybe Text
-> SymbolicLink
SymbolicLink'
{ $sel:absolutePath:SymbolicLink' :: Maybe Text
absolutePath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:fileMode:SymbolicLink' :: Maybe FileModeTypeEnum
fileMode = Maybe FileModeTypeEnum
forall a. Maybe a
Prelude.Nothing,
$sel:blobId:SymbolicLink' :: Maybe Text
blobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:relativePath:SymbolicLink' :: Maybe Text
relativePath = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
symbolicLink_absolutePath :: Lens.Lens' SymbolicLink (Prelude.Maybe Prelude.Text)
symbolicLink_absolutePath :: (Maybe Text -> f (Maybe Text)) -> SymbolicLink -> f SymbolicLink
symbolicLink_absolutePath = (SymbolicLink -> Maybe Text)
-> (SymbolicLink -> Maybe Text -> SymbolicLink)
-> Lens SymbolicLink SymbolicLink (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SymbolicLink' {Maybe Text
absolutePath :: Maybe Text
$sel:absolutePath:SymbolicLink' :: SymbolicLink -> Maybe Text
absolutePath} -> Maybe Text
absolutePath) (\s :: SymbolicLink
s@SymbolicLink' {} Maybe Text
a -> SymbolicLink
s {$sel:absolutePath:SymbolicLink' :: Maybe Text
absolutePath = Maybe Text
a} :: SymbolicLink)
symbolicLink_fileMode :: Lens.Lens' SymbolicLink (Prelude.Maybe FileModeTypeEnum)
symbolicLink_fileMode :: (Maybe FileModeTypeEnum -> f (Maybe FileModeTypeEnum))
-> SymbolicLink -> f SymbolicLink
symbolicLink_fileMode = (SymbolicLink -> Maybe FileModeTypeEnum)
-> (SymbolicLink -> Maybe FileModeTypeEnum -> SymbolicLink)
-> Lens
SymbolicLink
SymbolicLink
(Maybe FileModeTypeEnum)
(Maybe FileModeTypeEnum)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SymbolicLink' {Maybe FileModeTypeEnum
fileMode :: Maybe FileModeTypeEnum
$sel:fileMode:SymbolicLink' :: SymbolicLink -> Maybe FileModeTypeEnum
fileMode} -> Maybe FileModeTypeEnum
fileMode) (\s :: SymbolicLink
s@SymbolicLink' {} Maybe FileModeTypeEnum
a -> SymbolicLink
s {$sel:fileMode:SymbolicLink' :: Maybe FileModeTypeEnum
fileMode = Maybe FileModeTypeEnum
a} :: SymbolicLink)
symbolicLink_blobId :: Lens.Lens' SymbolicLink (Prelude.Maybe Prelude.Text)
symbolicLink_blobId :: (Maybe Text -> f (Maybe Text)) -> SymbolicLink -> f SymbolicLink
symbolicLink_blobId = (SymbolicLink -> Maybe Text)
-> (SymbolicLink -> Maybe Text -> SymbolicLink)
-> Lens SymbolicLink SymbolicLink (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SymbolicLink' {Maybe Text
blobId :: Maybe Text
$sel:blobId:SymbolicLink' :: SymbolicLink -> Maybe Text
blobId} -> Maybe Text
blobId) (\s :: SymbolicLink
s@SymbolicLink' {} Maybe Text
a -> SymbolicLink
s {$sel:blobId:SymbolicLink' :: Maybe Text
blobId = Maybe Text
a} :: SymbolicLink)
symbolicLink_relativePath :: Lens.Lens' SymbolicLink (Prelude.Maybe Prelude.Text)
symbolicLink_relativePath :: (Maybe Text -> f (Maybe Text)) -> SymbolicLink -> f SymbolicLink
symbolicLink_relativePath = (SymbolicLink -> Maybe Text)
-> (SymbolicLink -> Maybe Text -> SymbolicLink)
-> Lens SymbolicLink SymbolicLink (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SymbolicLink' {Maybe Text
relativePath :: Maybe Text
$sel:relativePath:SymbolicLink' :: SymbolicLink -> Maybe Text
relativePath} -> Maybe Text
relativePath) (\s :: SymbolicLink
s@SymbolicLink' {} Maybe Text
a -> SymbolicLink
s {$sel:relativePath:SymbolicLink' :: Maybe Text
relativePath = Maybe Text
a} :: SymbolicLink)
instance Core.FromJSON SymbolicLink where
parseJSON :: Value -> Parser SymbolicLink
parseJSON =
String
-> (Object -> Parser SymbolicLink) -> Value -> Parser SymbolicLink
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SymbolicLink"
( \Object
x ->
Maybe Text
-> Maybe FileModeTypeEnum
-> Maybe Text
-> Maybe Text
-> SymbolicLink
SymbolicLink'
(Maybe Text
-> Maybe FileModeTypeEnum
-> Maybe Text
-> Maybe Text
-> SymbolicLink)
-> Parser (Maybe Text)
-> Parser
(Maybe FileModeTypeEnum
-> Maybe Text -> Maybe Text -> SymbolicLink)
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
"absolutePath")
Parser
(Maybe FileModeTypeEnum
-> Maybe Text -> Maybe Text -> SymbolicLink)
-> Parser (Maybe FileModeTypeEnum)
-> Parser (Maybe Text -> Maybe Text -> SymbolicLink)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe FileModeTypeEnum)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"fileMode")
Parser (Maybe Text -> Maybe Text -> SymbolicLink)
-> Parser (Maybe Text) -> Parser (Maybe Text -> SymbolicLink)
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
"blobId")
Parser (Maybe Text -> SymbolicLink)
-> Parser (Maybe Text) -> Parser SymbolicLink
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
"relativePath")
)
instance Prelude.Hashable SymbolicLink
instance Prelude.NFData SymbolicLink