io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectionRepositorySource Maven / Gradle / Ivy
Show all versions of cdk-cicd-wrapper Show documentation
package io.github.cdklabs.cdk.cicd.wrapper;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-03T16:35:59.293Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.cicd.wrapper.$Module.class, fqn = "@cdklabs/cdk-cicd-wrapper.CodeStarConnectionRepositorySource")
public class CodeStarConnectionRepositorySource extends io.github.cdklabs.cdk.cicd.wrapper.RepositorySource {
protected CodeStarConnectionRepositorySource(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CodeStarConnectionRepositorySource(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param options
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CodeStarConnectionRepositorySource(final @org.jetbrains.annotations.Nullable io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectionRepositorySourceOptions options) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { options });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CodeStarConnectionRepositorySource() {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this);
}
/**
* @param context This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.cicd.wrapper.IRepositoryStack produceSourceConfig(final @org.jetbrains.annotations.NotNull io.github.cdklabs.cdk.cicd.wrapper.ResourceContext context) {
return software.amazon.jsii.Kernel.call(this, "produceSourceConfig", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdk.cicd.wrapper.IRepositoryStack.class), new Object[] { java.util.Objects.requireNonNull(context, "context is required") });
}
/**
* A fluent builder for {@link io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectionRepositorySource}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create() {
return new Builder();
}
private io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectionRepositorySourceOptions.Builder options;
private Builder() {
}
/**
* The branch of the repository.
*
* Default: - 'main'
*
* @return {@code this}
* @param branch The branch of the repository. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder branch(final java.lang.String branch) {
this.options().branch(branch);
return this;
}
/**
* Enforce full clone for the repository.
*
* Tools like semgrep and pre-commit hooks require a full clone.
*
* Default: - false
*
* @return {@code this}
* @param codeBuildCloneOutput Enforce full clone for the repository. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder codeBuildCloneOutput(final java.lang.Boolean codeBuildCloneOutput) {
this.options().codeBuildCloneOutput(codeBuildCloneOutput);
return this;
}
/**
* The description of the repository.
*
* Default: - No description.
*
* @return {@code this}
* @param description The description of the repository. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder description(final java.lang.String description) {
this.options().description(description);
return this;
}
/**
* The name of the repository.
*
* Default: - The name of the application.
* other options to configure:
* in package.json file
* "config": {
* "repositoryName": "my-repo",
* }
*
* @return {@code this}
* @param repositoryName The name of the repository. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder repositoryName(final java.lang.String repositoryName) {
this.options().repositoryName(repositoryName);
return this;
}
/**
* The ARN of the CodeStar connection.
*
* Default: - The value of the CODESTAR_CONNECTION_ARN environment variable.
*
* @return {@code this}
* @param codeStarConnectionArn The ARN of the CodeStar connection. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder codeStarConnectionArn(final java.lang.String codeStarConnectionArn) {
this.options().codeStarConnectionArn(codeStarConnectionArn);
return this;
}
/**
* @return a newly built instance of {@link io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectionRepositorySource}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectionRepositorySource build() {
return new io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectionRepositorySource(
this.options != null ? this.options.build() : null
);
}
private io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectionRepositorySourceOptions.Builder options() {
if (this.options == null) {
this.options = new io.github.cdklabs.cdk.cicd.wrapper.CodeStarConnectionRepositorySourceOptions.Builder();
}
return this.options;
}
}
}