{-# 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.ProjectSource where
import Amazonka.CodeBuild.Types.BuildStatusConfig
import Amazonka.CodeBuild.Types.GitSubmodulesConfig
import Amazonka.CodeBuild.Types.SourceAuth
import Amazonka.CodeBuild.Types.SourceType
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ProjectSource = ProjectSource'
{
ProjectSource -> Maybe Bool
reportBuildStatus :: Prelude.Maybe Prelude.Bool,
ProjectSource -> Maybe Bool
insecureSsl :: Prelude.Maybe Prelude.Bool,
ProjectSource -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
ProjectSource -> Maybe SourceAuth
auth :: Prelude.Maybe SourceAuth,
ProjectSource -> Maybe Text
buildspec :: Prelude.Maybe Prelude.Text,
ProjectSource -> Maybe Text
sourceIdentifier :: Prelude.Maybe Prelude.Text,
ProjectSource -> Maybe Natural
gitCloneDepth :: Prelude.Maybe Prelude.Natural,
ProjectSource -> Maybe GitSubmodulesConfig
gitSubmodulesConfig :: Prelude.Maybe GitSubmodulesConfig,
ProjectSource -> Maybe BuildStatusConfig
buildStatusConfig :: Prelude.Maybe BuildStatusConfig,
ProjectSource -> SourceType
type' :: SourceType
}
deriving (ProjectSource -> ProjectSource -> Bool
(ProjectSource -> ProjectSource -> Bool)
-> (ProjectSource -> ProjectSource -> Bool) -> Eq ProjectSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProjectSource -> ProjectSource -> Bool
$c/= :: ProjectSource -> ProjectSource -> Bool
== :: ProjectSource -> ProjectSource -> Bool
$c== :: ProjectSource -> ProjectSource -> Bool
Prelude.Eq, ReadPrec [ProjectSource]
ReadPrec ProjectSource
Int -> ReadS ProjectSource
ReadS [ProjectSource]
(Int -> ReadS ProjectSource)
-> ReadS [ProjectSource]
-> ReadPrec ProjectSource
-> ReadPrec [ProjectSource]
-> Read ProjectSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProjectSource]
$creadListPrec :: ReadPrec [ProjectSource]
readPrec :: ReadPrec ProjectSource
$creadPrec :: ReadPrec ProjectSource
readList :: ReadS [ProjectSource]
$creadList :: ReadS [ProjectSource]
readsPrec :: Int -> ReadS ProjectSource
$creadsPrec :: Int -> ReadS ProjectSource
Prelude.Read, Int -> ProjectSource -> ShowS
[ProjectSource] -> ShowS
ProjectSource -> String
(Int -> ProjectSource -> ShowS)
-> (ProjectSource -> String)
-> ([ProjectSource] -> ShowS)
-> Show ProjectSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProjectSource] -> ShowS
$cshowList :: [ProjectSource] -> ShowS
show :: ProjectSource -> String
$cshow :: ProjectSource -> String
showsPrec :: Int -> ProjectSource -> ShowS
$cshowsPrec :: Int -> ProjectSource -> ShowS
Prelude.Show, (forall x. ProjectSource -> Rep ProjectSource x)
-> (forall x. Rep ProjectSource x -> ProjectSource)
-> Generic ProjectSource
forall x. Rep ProjectSource x -> ProjectSource
forall x. ProjectSource -> Rep ProjectSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProjectSource x -> ProjectSource
$cfrom :: forall x. ProjectSource -> Rep ProjectSource x
Prelude.Generic)
newProjectSource ::
SourceType ->
ProjectSource
newProjectSource :: SourceType -> ProjectSource
newProjectSource SourceType
pType_ =
ProjectSource' :: Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe SourceAuth
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource
ProjectSource'
{ $sel:reportBuildStatus:ProjectSource' :: Maybe Bool
reportBuildStatus = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:insecureSsl:ProjectSource' :: Maybe Bool
insecureSsl = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:location:ProjectSource' :: Maybe Text
location = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:auth:ProjectSource' :: Maybe SourceAuth
auth = Maybe SourceAuth
forall a. Maybe a
Prelude.Nothing,
$sel:buildspec:ProjectSource' :: Maybe Text
buildspec = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:sourceIdentifier:ProjectSource' :: Maybe Text
sourceIdentifier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gitCloneDepth:ProjectSource' :: Maybe Natural
gitCloneDepth = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:gitSubmodulesConfig:ProjectSource' :: Maybe GitSubmodulesConfig
gitSubmodulesConfig = Maybe GitSubmodulesConfig
forall a. Maybe a
Prelude.Nothing,
$sel:buildStatusConfig:ProjectSource' :: Maybe BuildStatusConfig
buildStatusConfig = Maybe BuildStatusConfig
forall a. Maybe a
Prelude.Nothing,
$sel:type':ProjectSource' :: SourceType
type' = SourceType
pType_
}
projectSource_reportBuildStatus :: Lens.Lens' ProjectSource (Prelude.Maybe Prelude.Bool)
projectSource_reportBuildStatus :: (Maybe Bool -> f (Maybe Bool)) -> ProjectSource -> f ProjectSource
projectSource_reportBuildStatus = (ProjectSource -> Maybe Bool)
-> (ProjectSource -> Maybe Bool -> ProjectSource)
-> Lens ProjectSource ProjectSource (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {Maybe Bool
reportBuildStatus :: Maybe Bool
$sel:reportBuildStatus:ProjectSource' :: ProjectSource -> Maybe Bool
reportBuildStatus} -> Maybe Bool
reportBuildStatus) (\s :: ProjectSource
s@ProjectSource' {} Maybe Bool
a -> ProjectSource
s {$sel:reportBuildStatus:ProjectSource' :: Maybe Bool
reportBuildStatus = Maybe Bool
a} :: ProjectSource)
projectSource_insecureSsl :: Lens.Lens' ProjectSource (Prelude.Maybe Prelude.Bool)
projectSource_insecureSsl :: (Maybe Bool -> f (Maybe Bool)) -> ProjectSource -> f ProjectSource
projectSource_insecureSsl = (ProjectSource -> Maybe Bool)
-> (ProjectSource -> Maybe Bool -> ProjectSource)
-> Lens ProjectSource ProjectSource (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {Maybe Bool
insecureSsl :: Maybe Bool
$sel:insecureSsl:ProjectSource' :: ProjectSource -> Maybe Bool
insecureSsl} -> Maybe Bool
insecureSsl) (\s :: ProjectSource
s@ProjectSource' {} Maybe Bool
a -> ProjectSource
s {$sel:insecureSsl:ProjectSource' :: Maybe Bool
insecureSsl = Maybe Bool
a} :: ProjectSource)
projectSource_location :: Lens.Lens' ProjectSource (Prelude.Maybe Prelude.Text)
projectSource_location :: (Maybe Text -> f (Maybe Text)) -> ProjectSource -> f ProjectSource
projectSource_location = (ProjectSource -> Maybe Text)
-> (ProjectSource -> Maybe Text -> ProjectSource)
-> Lens ProjectSource ProjectSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {Maybe Text
location :: Maybe Text
$sel:location:ProjectSource' :: ProjectSource -> Maybe Text
location} -> Maybe Text
location) (\s :: ProjectSource
s@ProjectSource' {} Maybe Text
a -> ProjectSource
s {$sel:location:ProjectSource' :: Maybe Text
location = Maybe Text
a} :: ProjectSource)
projectSource_auth :: Lens.Lens' ProjectSource (Prelude.Maybe SourceAuth)
projectSource_auth :: (Maybe SourceAuth -> f (Maybe SourceAuth))
-> ProjectSource -> f ProjectSource
projectSource_auth = (ProjectSource -> Maybe SourceAuth)
-> (ProjectSource -> Maybe SourceAuth -> ProjectSource)
-> Lens
ProjectSource ProjectSource (Maybe SourceAuth) (Maybe SourceAuth)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {Maybe SourceAuth
auth :: Maybe SourceAuth
$sel:auth:ProjectSource' :: ProjectSource -> Maybe SourceAuth
auth} -> Maybe SourceAuth
auth) (\s :: ProjectSource
s@ProjectSource' {} Maybe SourceAuth
a -> ProjectSource
s {$sel:auth:ProjectSource' :: Maybe SourceAuth
auth = Maybe SourceAuth
a} :: ProjectSource)
projectSource_buildspec :: Lens.Lens' ProjectSource (Prelude.Maybe Prelude.Text)
projectSource_buildspec :: (Maybe Text -> f (Maybe Text)) -> ProjectSource -> f ProjectSource
projectSource_buildspec = (ProjectSource -> Maybe Text)
-> (ProjectSource -> Maybe Text -> ProjectSource)
-> Lens ProjectSource ProjectSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {Maybe Text
buildspec :: Maybe Text
$sel:buildspec:ProjectSource' :: ProjectSource -> Maybe Text
buildspec} -> Maybe Text
buildspec) (\s :: ProjectSource
s@ProjectSource' {} Maybe Text
a -> ProjectSource
s {$sel:buildspec:ProjectSource' :: Maybe Text
buildspec = Maybe Text
a} :: ProjectSource)
projectSource_sourceIdentifier :: Lens.Lens' ProjectSource (Prelude.Maybe Prelude.Text)
projectSource_sourceIdentifier :: (Maybe Text -> f (Maybe Text)) -> ProjectSource -> f ProjectSource
projectSource_sourceIdentifier = (ProjectSource -> Maybe Text)
-> (ProjectSource -> Maybe Text -> ProjectSource)
-> Lens ProjectSource ProjectSource (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {Maybe Text
sourceIdentifier :: Maybe Text
$sel:sourceIdentifier:ProjectSource' :: ProjectSource -> Maybe Text
sourceIdentifier} -> Maybe Text
sourceIdentifier) (\s :: ProjectSource
s@ProjectSource' {} Maybe Text
a -> ProjectSource
s {$sel:sourceIdentifier:ProjectSource' :: Maybe Text
sourceIdentifier = Maybe Text
a} :: ProjectSource)
projectSource_gitCloneDepth :: Lens.Lens' ProjectSource (Prelude.Maybe Prelude.Natural)
projectSource_gitCloneDepth :: (Maybe Natural -> f (Maybe Natural))
-> ProjectSource -> f ProjectSource
projectSource_gitCloneDepth = (ProjectSource -> Maybe Natural)
-> (ProjectSource -> Maybe Natural -> ProjectSource)
-> Lens ProjectSource ProjectSource (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {Maybe Natural
gitCloneDepth :: Maybe Natural
$sel:gitCloneDepth:ProjectSource' :: ProjectSource -> Maybe Natural
gitCloneDepth} -> Maybe Natural
gitCloneDepth) (\s :: ProjectSource
s@ProjectSource' {} Maybe Natural
a -> ProjectSource
s {$sel:gitCloneDepth:ProjectSource' :: Maybe Natural
gitCloneDepth = Maybe Natural
a} :: ProjectSource)
projectSource_gitSubmodulesConfig :: Lens.Lens' ProjectSource (Prelude.Maybe GitSubmodulesConfig)
projectSource_gitSubmodulesConfig :: (Maybe GitSubmodulesConfig -> f (Maybe GitSubmodulesConfig))
-> ProjectSource -> f ProjectSource
projectSource_gitSubmodulesConfig = (ProjectSource -> Maybe GitSubmodulesConfig)
-> (ProjectSource -> Maybe GitSubmodulesConfig -> ProjectSource)
-> Lens
ProjectSource
ProjectSource
(Maybe GitSubmodulesConfig)
(Maybe GitSubmodulesConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {Maybe GitSubmodulesConfig
gitSubmodulesConfig :: Maybe GitSubmodulesConfig
$sel:gitSubmodulesConfig:ProjectSource' :: ProjectSource -> Maybe GitSubmodulesConfig
gitSubmodulesConfig} -> Maybe GitSubmodulesConfig
gitSubmodulesConfig) (\s :: ProjectSource
s@ProjectSource' {} Maybe GitSubmodulesConfig
a -> ProjectSource
s {$sel:gitSubmodulesConfig:ProjectSource' :: Maybe GitSubmodulesConfig
gitSubmodulesConfig = Maybe GitSubmodulesConfig
a} :: ProjectSource)
projectSource_buildStatusConfig :: Lens.Lens' ProjectSource (Prelude.Maybe BuildStatusConfig)
projectSource_buildStatusConfig :: (Maybe BuildStatusConfig -> f (Maybe BuildStatusConfig))
-> ProjectSource -> f ProjectSource
projectSource_buildStatusConfig = (ProjectSource -> Maybe BuildStatusConfig)
-> (ProjectSource -> Maybe BuildStatusConfig -> ProjectSource)
-> Lens
ProjectSource
ProjectSource
(Maybe BuildStatusConfig)
(Maybe BuildStatusConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {Maybe BuildStatusConfig
buildStatusConfig :: Maybe BuildStatusConfig
$sel:buildStatusConfig:ProjectSource' :: ProjectSource -> Maybe BuildStatusConfig
buildStatusConfig} -> Maybe BuildStatusConfig
buildStatusConfig) (\s :: ProjectSource
s@ProjectSource' {} Maybe BuildStatusConfig
a -> ProjectSource
s {$sel:buildStatusConfig:ProjectSource' :: Maybe BuildStatusConfig
buildStatusConfig = Maybe BuildStatusConfig
a} :: ProjectSource)
projectSource_type :: Lens.Lens' ProjectSource SourceType
projectSource_type :: (SourceType -> f SourceType) -> ProjectSource -> f ProjectSource
projectSource_type = (ProjectSource -> SourceType)
-> (ProjectSource -> SourceType -> ProjectSource)
-> Lens ProjectSource ProjectSource SourceType SourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProjectSource' {SourceType
type' :: SourceType
$sel:type':ProjectSource' :: ProjectSource -> SourceType
type'} -> SourceType
type') (\s :: ProjectSource
s@ProjectSource' {} SourceType
a -> ProjectSource
s {$sel:type':ProjectSource' :: SourceType
type' = SourceType
a} :: ProjectSource)
instance Core.FromJSON ProjectSource where
parseJSON :: Value -> Parser ProjectSource
parseJSON =
String
-> (Object -> Parser ProjectSource)
-> Value
-> Parser ProjectSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProjectSource"
( \Object
x ->
Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe SourceAuth
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource
ProjectSource'
(Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe SourceAuth
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
-> Parser (Maybe Bool)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe SourceAuth
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"reportBuildStatus")
Parser
(Maybe Bool
-> Maybe Text
-> Maybe SourceAuth
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe SourceAuth
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"insecureSsl")
Parser
(Maybe Text
-> Maybe SourceAuth
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
-> Parser (Maybe Text)
-> Parser
(Maybe SourceAuth
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
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
"location")
Parser
(Maybe SourceAuth
-> Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
-> Parser (Maybe SourceAuth)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe SourceAuth)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"auth")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
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
"buildspec")
Parser
(Maybe Text
-> Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
-> Parser (Maybe Text)
-> Parser
(Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
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
"sourceIdentifier")
Parser
(Maybe Natural
-> Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig
-> SourceType
-> ProjectSource)
-> Parser (Maybe Natural)
-> Parser
(Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig -> SourceType -> ProjectSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"gitCloneDepth")
Parser
(Maybe GitSubmodulesConfig
-> Maybe BuildStatusConfig -> SourceType -> ProjectSource)
-> Parser (Maybe GitSubmodulesConfig)
-> Parser (Maybe BuildStatusConfig -> SourceType -> ProjectSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe GitSubmodulesConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"gitSubmodulesConfig")
Parser (Maybe BuildStatusConfig -> SourceType -> ProjectSource)
-> Parser (Maybe BuildStatusConfig)
-> Parser (SourceType -> ProjectSource)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe BuildStatusConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"buildStatusConfig")
Parser (SourceType -> ProjectSource)
-> Parser SourceType -> Parser ProjectSource
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser SourceType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"type")
)
instance Prelude.Hashable ProjectSource
instance Prelude.NFData ProjectSource
instance Core.ToJSON ProjectSource where
toJSON :: ProjectSource -> Value
toJSON ProjectSource' {Maybe Bool
Maybe Natural
Maybe Text
Maybe BuildStatusConfig
Maybe GitSubmodulesConfig
Maybe SourceAuth
SourceType
type' :: SourceType
buildStatusConfig :: Maybe BuildStatusConfig
gitSubmodulesConfig :: Maybe GitSubmodulesConfig
gitCloneDepth :: Maybe Natural
sourceIdentifier :: Maybe Text
buildspec :: Maybe Text
auth :: Maybe SourceAuth
location :: Maybe Text
insecureSsl :: Maybe Bool
reportBuildStatus :: Maybe Bool
$sel:type':ProjectSource' :: ProjectSource -> SourceType
$sel:buildStatusConfig:ProjectSource' :: ProjectSource -> Maybe BuildStatusConfig
$sel:gitSubmodulesConfig:ProjectSource' :: ProjectSource -> Maybe GitSubmodulesConfig
$sel:gitCloneDepth:ProjectSource' :: ProjectSource -> Maybe Natural
$sel:sourceIdentifier:ProjectSource' :: ProjectSource -> Maybe Text
$sel:buildspec:ProjectSource' :: ProjectSource -> Maybe Text
$sel:auth:ProjectSource' :: ProjectSource -> Maybe SourceAuth
$sel:location:ProjectSource' :: ProjectSource -> Maybe Text
$sel:insecureSsl:ProjectSource' :: ProjectSource -> Maybe Bool
$sel:reportBuildStatus:ProjectSource' :: ProjectSource -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"reportBuildStatus" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
reportBuildStatus,
(Text
"insecureSsl" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
insecureSsl,
(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
"auth" Text -> SourceAuth -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SourceAuth -> Pair) -> Maybe SourceAuth -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceAuth
auth,
(Text
"buildspec" 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
buildspec,
(Text
"sourceIdentifier" 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
sourceIdentifier,
(Text
"gitCloneDepth" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
gitCloneDepth,
(Text
"gitSubmodulesConfig" Text -> GitSubmodulesConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(GitSubmodulesConfig -> Pair)
-> Maybe GitSubmodulesConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe GitSubmodulesConfig
gitSubmodulesConfig,
(Text
"buildStatusConfig" Text -> BuildStatusConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(BuildStatusConfig -> Pair)
-> Maybe BuildStatusConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe BuildStatusConfig
buildStatusConfig,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"type" Text -> SourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= SourceType
type')
]
)