Class CodeCommitSourceProps.Builder
java.lang.Object
software.amazon.awscdk.services.codebuild.CodeCommitSourceProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CodeCommitSourceProps>
- Enclosing interface:
CodeCommitSourceProps
@Stability(Stable)
public static final class CodeCommitSourceProps.Builder
extends Object
implements software.amazon.jsii.Builder<CodeCommitSourceProps>
A builder for
CodeCommitSourceProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbranchOrRef
(String branchOrRef) Sets the value ofCodeCommitSourceProps.getBranchOrRef()
build()
Builds the configured instance.cloneDepth
(Number cloneDepth) Sets the value ofCodeCommitSourceProps.getCloneDepth()
fetchSubmodules
(Boolean fetchSubmodules) Sets the value ofCodeCommitSourceProps.getFetchSubmodules()
identifier
(String identifier) Sets the value ofSourceProps.getIdentifier()
repository
(IRepository repository) Sets the value ofCodeCommitSourceProps.getRepository()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
repository
Sets the value ofCodeCommitSourceProps.getRepository()
- Parameters:
repository
- the value to be set. This parameter is required.- Returns:
this
-
branchOrRef
Sets the value ofCodeCommitSourceProps.getBranchOrRef()
- Parameters:
branchOrRef
- The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build.- Returns:
this
-
cloneDepth
Sets the value ofCodeCommitSourceProps.getCloneDepth()
- Parameters:
cloneDepth
- The depth of history to download. Minimum value is 0. If this value is 0, greater than 25, or not provided, then the full history is downloaded with each build of the project.- Returns:
this
-
fetchSubmodules
Sets the value ofCodeCommitSourceProps.getFetchSubmodules()
- Parameters:
fetchSubmodules
- Whether to fetch submodules while cloning git repo.- Returns:
this
-
identifier
Sets the value ofSourceProps.getIdentifier()
- Parameters:
identifier
- The source identifier. This property is required on secondary sources.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CodeCommitSourceProps>
- Returns:
- a new instance of
CodeCommitSourceProps
- Throws:
NullPointerException
- if any required attribute was not provided
-