io.github.cdklabs.cdk.cicd.wrapper.CodeCommitRepositorySourceOptions 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.280Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdk.cicd.wrapper.$Module.class, fqn = "@cdklabs/cdk-cicd-wrapper.CodeCommitRepositorySourceOptions")
@software.amazon.jsii.Jsii.Proxy(CodeCommitRepositorySourceOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface CodeCommitRepositorySourceOptions extends software.amazon.jsii.JsiiSerializable, io.github.cdklabs.cdk.cicd.wrapper.RepositorySourceOptions {
/**
* Enable CodeGuru Reviewer.
*
* Default: - false
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getEnableCodeGuruReviewer() {
return null;
}
/**
* Enable pull request checks.
*
* Default: - true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getEnablePullRequestChecks() {
return null;
}
/**
* @return a {@link Builder} of {@link CodeCommitRepositorySourceOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CodeCommitRepositorySourceOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Boolean enableCodeGuruReviewer;
java.lang.Boolean enablePullRequestChecks;
java.lang.String branch;
java.lang.Boolean codeBuildCloneOutput;
java.lang.String description;
java.lang.String repositoryName;
/**
* Sets the value of {@link CodeCommitRepositorySourceOptions#getEnableCodeGuruReviewer}
* @param enableCodeGuruReviewer Enable CodeGuru Reviewer.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enableCodeGuruReviewer(java.lang.Boolean enableCodeGuruReviewer) {
this.enableCodeGuruReviewer = enableCodeGuruReviewer;
return this;
}
/**
* Sets the value of {@link CodeCommitRepositorySourceOptions#getEnablePullRequestChecks}
* @param enablePullRequestChecks Enable pull request checks.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder enablePullRequestChecks(java.lang.Boolean enablePullRequestChecks) {
this.enablePullRequestChecks = enablePullRequestChecks;
return this;
}
/**
* Sets the value of {@link CodeCommitRepositorySourceOptions#getBranch}
* @param branch The branch of the repository.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder branch(java.lang.String branch) {
this.branch = branch;
return this;
}
/**
* Sets the value of {@link CodeCommitRepositorySourceOptions#getCodeBuildCloneOutput}
* @param codeBuildCloneOutput Enforce full clone for the repository.
* Tools like semgrep and pre-commit hooks require a full clone.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder codeBuildCloneOutput(java.lang.Boolean codeBuildCloneOutput) {
this.codeBuildCloneOutput = codeBuildCloneOutput;
return this;
}
/**
* Sets the value of {@link CodeCommitRepositorySourceOptions#getDescription}
* @param description The description of the repository.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link CodeCommitRepositorySourceOptions#getRepositoryName}
* @param repositoryName The name of the repository.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder repositoryName(java.lang.String repositoryName) {
this.repositoryName = repositoryName;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CodeCommitRepositorySourceOptions}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public CodeCommitRepositorySourceOptions build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CodeCommitRepositorySourceOptions}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CodeCommitRepositorySourceOptions {
private final java.lang.Boolean enableCodeGuruReviewer;
private final java.lang.Boolean enablePullRequestChecks;
private final java.lang.String branch;
private final java.lang.Boolean codeBuildCloneOutput;
private final java.lang.String description;
private final java.lang.String repositoryName;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.enableCodeGuruReviewer = software.amazon.jsii.Kernel.get(this, "enableCodeGuruReviewer", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.enablePullRequestChecks = software.amazon.jsii.Kernel.get(this, "enablePullRequestChecks", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.branch = software.amazon.jsii.Kernel.get(this, "branch", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.codeBuildCloneOutput = software.amazon.jsii.Kernel.get(this, "codeBuildCloneOutput", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.repositoryName = software.amazon.jsii.Kernel.get(this, "repositoryName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.enableCodeGuruReviewer = builder.enableCodeGuruReviewer;
this.enablePullRequestChecks = builder.enablePullRequestChecks;
this.branch = builder.branch;
this.codeBuildCloneOutput = builder.codeBuildCloneOutput;
this.description = builder.description;
this.repositoryName = builder.repositoryName;
}
@Override
public final java.lang.Boolean getEnableCodeGuruReviewer() {
return this.enableCodeGuruReviewer;
}
@Override
public final java.lang.Boolean getEnablePullRequestChecks() {
return this.enablePullRequestChecks;
}
@Override
public final java.lang.String getBranch() {
return this.branch;
}
@Override
public final java.lang.Boolean getCodeBuildCloneOutput() {
return this.codeBuildCloneOutput;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@Override
public final java.lang.String getRepositoryName() {
return this.repositoryName;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
if (this.getEnableCodeGuruReviewer() != null) {
data.set("enableCodeGuruReviewer", om.valueToTree(this.getEnableCodeGuruReviewer()));
}
if (this.getEnablePullRequestChecks() != null) {
data.set("enablePullRequestChecks", om.valueToTree(this.getEnablePullRequestChecks()));
}
if (this.getBranch() != null) {
data.set("branch", om.valueToTree(this.getBranch()));
}
if (this.getCodeBuildCloneOutput() != null) {
data.set("codeBuildCloneOutput", om.valueToTree(this.getCodeBuildCloneOutput()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getRepositoryName() != null) {
data.set("repositoryName", om.valueToTree(this.getRepositoryName()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/cdk-cicd-wrapper.CodeCommitRepositorySourceOptions"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CodeCommitRepositorySourceOptions.Jsii$Proxy that = (CodeCommitRepositorySourceOptions.Jsii$Proxy) o;
if (this.enableCodeGuruReviewer != null ? !this.enableCodeGuruReviewer.equals(that.enableCodeGuruReviewer) : that.enableCodeGuruReviewer != null) return false;
if (this.enablePullRequestChecks != null ? !this.enablePullRequestChecks.equals(that.enablePullRequestChecks) : that.enablePullRequestChecks != null) return false;
if (this.branch != null ? !this.branch.equals(that.branch) : that.branch != null) return false;
if (this.codeBuildCloneOutput != null ? !this.codeBuildCloneOutput.equals(that.codeBuildCloneOutput) : that.codeBuildCloneOutput != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
return this.repositoryName != null ? this.repositoryName.equals(that.repositoryName) : that.repositoryName == null;
}
@Override
public final int hashCode() {
int result = this.enableCodeGuruReviewer != null ? this.enableCodeGuruReviewer.hashCode() : 0;
result = 31 * result + (this.enablePullRequestChecks != null ? this.enablePullRequestChecks.hashCode() : 0);
result = 31 * result + (this.branch != null ? this.branch.hashCode() : 0);
result = 31 * result + (this.codeBuildCloneOutput != null ? this.codeBuildCloneOutput.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.repositoryName != null ? this.repositoryName.hashCode() : 0);
return result;
}
}
}