com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerImageBuilderProps Maven / Gradle / Ivy
Show all versions of cdk.github.runners Show documentation
package com.cloudsnorkel.cdk.github.runners;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.393Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.CodeBuildRunnerImageBuilderProps")
@software.amazon.jsii.Jsii.Proxy(CodeBuildRunnerImageBuilderProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface CodeBuildRunnerImageBuilderProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) Build image to use in CodeBuild.
*
* This is the image that's going to run the code that builds the runner image.
*
* The only action taken in CodeBuild is running docker build
. You would therefore not need to change this setting often.
*
* Default: Amazon Linux 2023
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codebuild.IBuildImage getBuildImage() {
return null;
}
/**
* (experimental) The type of compute to use for this build.
*
* See the {@link ComputeType} enum for the possible values.
*
* Default: {@link ComputeType#SMALL }
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.codebuild.ComputeType getComputeType() {
return null;
}
/**
* (experimental) The number of minutes after which AWS CodeBuild stops the build if it's not complete.
*
* For valid values, see the timeoutInMinutes field in the AWS
* CodeBuild User Guide.
*
* Default: Duration.hours(1)
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getTimeout() {
return null;
}
/**
* @return a {@link Builder} of {@link CodeBuildRunnerImageBuilderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CodeBuildRunnerImageBuilderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
software.amazon.awscdk.services.codebuild.IBuildImage buildImage;
software.amazon.awscdk.services.codebuild.ComputeType computeType;
software.amazon.awscdk.Duration timeout;
/**
* Sets the value of {@link CodeBuildRunnerImageBuilderProps#getBuildImage}
* @param buildImage Build image to use in CodeBuild.
* This is the image that's going to run the code that builds the runner image.
*
* The only action taken in CodeBuild is running docker build
. You would therefore not need to change this setting often.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder buildImage(software.amazon.awscdk.services.codebuild.IBuildImage buildImage) {
this.buildImage = buildImage;
return this;
}
/**
* Sets the value of {@link CodeBuildRunnerImageBuilderProps#getComputeType}
* @param computeType The type of compute to use for this build.
* See the {@link ComputeType} enum for the possible values.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder computeType(software.amazon.awscdk.services.codebuild.ComputeType computeType) {
this.computeType = computeType;
return this;
}
/**
* Sets the value of {@link CodeBuildRunnerImageBuilderProps#getTimeout}
* @param timeout The number of minutes after which AWS CodeBuild stops the build if it's not complete.
* For valid values, see the timeoutInMinutes field in the AWS
* CodeBuild User Guide.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder timeout(software.amazon.awscdk.Duration timeout) {
this.timeout = timeout;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CodeBuildRunnerImageBuilderProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public CodeBuildRunnerImageBuilderProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CodeBuildRunnerImageBuilderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CodeBuildRunnerImageBuilderProps {
private final software.amazon.awscdk.services.codebuild.IBuildImage buildImage;
private final software.amazon.awscdk.services.codebuild.ComputeType computeType;
private final software.amazon.awscdk.Duration timeout;
/**
* 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.buildImage = software.amazon.jsii.Kernel.get(this, "buildImage", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codebuild.IBuildImage.class));
this.computeType = software.amazon.jsii.Kernel.get(this, "computeType", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.codebuild.ComputeType.class));
this.timeout = software.amazon.jsii.Kernel.get(this, "timeout", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.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.buildImage = builder.buildImage;
this.computeType = builder.computeType;
this.timeout = builder.timeout;
}
@Override
public final software.amazon.awscdk.services.codebuild.IBuildImage getBuildImage() {
return this.buildImage;
}
@Override
public final software.amazon.awscdk.services.codebuild.ComputeType getComputeType() {
return this.computeType;
}
@Override
public final software.amazon.awscdk.Duration getTimeout() {
return this.timeout;
}
@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.getBuildImage() != null) {
data.set("buildImage", om.valueToTree(this.getBuildImage()));
}
if (this.getComputeType() != null) {
data.set("computeType", om.valueToTree(this.getComputeType()));
}
if (this.getTimeout() != null) {
data.set("timeout", om.valueToTree(this.getTimeout()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cloudsnorkel/cdk-github-runners.CodeBuildRunnerImageBuilderProps"));
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;
CodeBuildRunnerImageBuilderProps.Jsii$Proxy that = (CodeBuildRunnerImageBuilderProps.Jsii$Proxy) o;
if (this.buildImage != null ? !this.buildImage.equals(that.buildImage) : that.buildImage != null) return false;
if (this.computeType != null ? !this.computeType.equals(that.computeType) : that.computeType != null) return false;
return this.timeout != null ? this.timeout.equals(that.timeout) : that.timeout == null;
}
@Override
public final int hashCode() {
int result = this.buildImage != null ? this.buildImage.hashCode() : 0;
result = 31 * result + (this.computeType != null ? this.computeType.hashCode() : 0);
result = 31 * result + (this.timeout != null ? this.timeout.hashCode() : 0);
return result;
}
}
}