com.cloudsnorkel.cdk.github.runners.RunnerImageBuilderProps 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.532Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.RunnerImageBuilderProps")
@software.amazon.jsii.Jsii.Proxy(RunnerImageBuilderProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface RunnerImageBuilderProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) Image architecture.
*
* Default: Architecture.X86_64
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.Architecture getArchitecture() {
return null;
}
/**
* (experimental) Options specific to AWS Image Builder.
*
* Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.AwsImageBuilderRunnerImageBuilderProps getAwsImageBuilderOptions() {
return null;
}
/**
* (experimental) Base AMI from which runner AMIs will be built.
*
* This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x
would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace x.x.x
with that version.
*
* Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getBaseAmi() {
return null;
}
/**
* (experimental) Base image from which Docker runner images will be built.
*
* When using private images from a different account or not on ECR, you may need to include additional setup commands with {@link dockerSetupCommands}.
*
* Default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getBaseDockerImage() {
return null;
}
/**
* Default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.RunnerImageBuilderType getBuilderType() {
return null;
}
/**
* (experimental) Options specific to CodeBuild image builder.
*
* Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerImageBuilderProps getCodeBuildOptions() {
return null;
}
/**
* (experimental) Components to install on the image.
*
* Default: none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getComponents() {
return null;
}
/**
* (experimental) Additional commands to run on the build host before starting the Docker runner image build.
*
* Use this to execute commands such as docker login
or aws ecr get-login-password
to pull private base images.
*
* Default: []
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getDockerSetupCommands() {
return null;
}
/**
* (experimental) Removal policy for logs of image builds.
*
* If deployment fails on the custom resource, try setting this to RemovalPolicy.RETAIN
. This way the CodeBuild logs can still be viewed, and you can see why the build failed.
*
* We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
*
* Default: RemovalPolicy.DESTROY
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.RemovalPolicy getLogRemovalPolicy() {
return null;
}
/**
* (experimental) The number of days log events are kept in CloudWatch Logs.
*
* When updating
* this property, unsetting it doesn't remove the log retention policy. To
* remove the retention policy, set the value to INFINITE
.
*
* Default: logs.RetentionDays.ONE_MONTH
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.logs.RetentionDays getLogRetention() {
return null;
}
/**
* (experimental) Image OS.
*
* Default: OS.LINUX_UBUNTU
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.Os getOs() {
return null;
}
/**
* (experimental) Schedule the image to be rebuilt every given interval.
*
* Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates.
*
* Set to zero to disable.
*
* Default: Duration.days(7)
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.Duration getRebuildInterval() {
return null;
}
/**
* (experimental) Version of GitHub Runners to install.
*
* Default: latest version available
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable com.cloudsnorkel.cdk.github.runners.RunnerVersion getRunnerVersion() {
return null;
}
/**
* (experimental) Security Groups to assign to this instance.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getSecurityGroups() {
return null;
}
/**
* (experimental) Where to place the network interfaces within the VPC.
*
* Default: no subnet
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SubnetSelection getSubnetSelection() {
return null;
}
/**
* (experimental) VPC to build the image in.
*
* Default: no VPC
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getVpc() {
return null;
}
/**
* (experimental) Wait for image to finish building during deployment.
*
* It's usually best to leave this enabled to ensure everything is ready once deployment is done. However, it can be disabled to speed up deployment in case where you have a lot of image components that can take a long time to build.
*
* Disabling this option means a finished deployment is not ready to be used. You will have to wait for the image to finish building before the system can be used.
*
* Disabling this option may also mean any changes to settings or components can take up to a week (default rebuild interval) to take effect.
*
* Default: true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getWaitOnDeploy() {
return null;
}
/**
* @return a {@link Builder} of {@link RunnerImageBuilderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link RunnerImageBuilderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
com.cloudsnorkel.cdk.github.runners.Architecture architecture;
com.cloudsnorkel.cdk.github.runners.AwsImageBuilderRunnerImageBuilderProps awsImageBuilderOptions;
java.lang.String baseAmi;
java.lang.String baseDockerImage;
com.cloudsnorkel.cdk.github.runners.RunnerImageBuilderType builderType;
com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerImageBuilderProps codeBuildOptions;
java.util.List components;
java.util.List dockerSetupCommands;
software.amazon.awscdk.RemovalPolicy logRemovalPolicy;
software.amazon.awscdk.services.logs.RetentionDays logRetention;
com.cloudsnorkel.cdk.github.runners.Os os;
software.amazon.awscdk.Duration rebuildInterval;
com.cloudsnorkel.cdk.github.runners.RunnerVersion runnerVersion;
java.util.List securityGroups;
software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection;
software.amazon.awscdk.services.ec2.IVpc vpc;
java.lang.Boolean waitOnDeploy;
/**
* Sets the value of {@link RunnerImageBuilderProps#getArchitecture}
* @param architecture Image architecture.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder architecture(com.cloudsnorkel.cdk.github.runners.Architecture architecture) {
this.architecture = architecture;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getAwsImageBuilderOptions}
* @param awsImageBuilderOptions Options specific to AWS Image Builder.
* Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder awsImageBuilderOptions(com.cloudsnorkel.cdk.github.runners.AwsImageBuilderRunnerImageBuilderProps awsImageBuilderOptions) {
this.awsImageBuilderOptions = awsImageBuilderOptions;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getBaseAmi}
* @param baseAmi Base AMI from which runner AMIs will be built.
* This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x
would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace x.x.x
with that version.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder baseAmi(java.lang.String baseAmi) {
this.baseAmi = baseAmi;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getBaseDockerImage}
* @param baseDockerImage Base image from which Docker runner images will be built.
* When using private images from a different account or not on ECR, you may need to include additional setup commands with {@link dockerSetupCommands}.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder baseDockerImage(java.lang.String baseDockerImage) {
this.baseDockerImage = baseDockerImage;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getBuilderType}
* @param builderType the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder builderType(com.cloudsnorkel.cdk.github.runners.RunnerImageBuilderType builderType) {
this.builderType = builderType;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getCodeBuildOptions}
* @param codeBuildOptions Options specific to CodeBuild image builder.
* Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder codeBuildOptions(com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerImageBuilderProps codeBuildOptions) {
this.codeBuildOptions = codeBuildOptions;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getComponents}
* @param components Components to install on the image.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder components(java.util.List extends com.cloudsnorkel.cdk.github.runners.RunnerImageComponent> components) {
this.components = (java.util.List)components;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getDockerSetupCommands}
* @param dockerSetupCommands Additional commands to run on the build host before starting the Docker runner image build.
* Use this to execute commands such as docker login
or aws ecr get-login-password
to pull private base images.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder dockerSetupCommands(java.util.List dockerSetupCommands) {
this.dockerSetupCommands = dockerSetupCommands;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getLogRemovalPolicy}
* @param logRemovalPolicy Removal policy for logs of image builds.
* If deployment fails on the custom resource, try setting this to RemovalPolicy.RETAIN
. This way the CodeBuild logs can still be viewed, and you can see why the build failed.
*
* We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder logRemovalPolicy(software.amazon.awscdk.RemovalPolicy logRemovalPolicy) {
this.logRemovalPolicy = logRemovalPolicy;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getLogRetention}
* @param logRetention The number of days log events are kept in CloudWatch Logs.
* When updating
* this property, unsetting it doesn't remove the log retention policy. To
* remove the retention policy, set the value to INFINITE
.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder logRetention(software.amazon.awscdk.services.logs.RetentionDays logRetention) {
this.logRetention = logRetention;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getOs}
* @param os Image OS.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder os(com.cloudsnorkel.cdk.github.runners.Os os) {
this.os = os;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getRebuildInterval}
* @param rebuildInterval Schedule the image to be rebuilt every given interval.
* Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates.
*
* Set to zero to disable.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder rebuildInterval(software.amazon.awscdk.Duration rebuildInterval) {
this.rebuildInterval = rebuildInterval;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getRunnerVersion}
* @param runnerVersion Version of GitHub Runners to install.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder runnerVersion(com.cloudsnorkel.cdk.github.runners.RunnerVersion runnerVersion) {
this.runnerVersion = runnerVersion;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getSecurityGroups}
* @param securityGroups Security Groups to assign to this instance.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder securityGroups(java.util.List extends software.amazon.awscdk.services.ec2.ISecurityGroup> securityGroups) {
this.securityGroups = (java.util.List)securityGroups;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getSubnetSelection}
* @param subnetSelection Where to place the network interfaces within the VPC.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder subnetSelection(software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection) {
this.subnetSelection = subnetSelection;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getVpc}
* @param vpc VPC to build the image in.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder vpc(software.amazon.awscdk.services.ec2.IVpc vpc) {
this.vpc = vpc;
return this;
}
/**
* Sets the value of {@link RunnerImageBuilderProps#getWaitOnDeploy}
* @param waitOnDeploy Wait for image to finish building during deployment.
* It's usually best to leave this enabled to ensure everything is ready once deployment is done. However, it can be disabled to speed up deployment in case where you have a lot of image components that can take a long time to build.
*
* Disabling this option means a finished deployment is not ready to be used. You will have to wait for the image to finish building before the system can be used.
*
* Disabling this option may also mean any changes to settings or components can take up to a week (default rebuild interval) to take effect.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder waitOnDeploy(java.lang.Boolean waitOnDeploy) {
this.waitOnDeploy = waitOnDeploy;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link RunnerImageBuilderProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public RunnerImageBuilderProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link RunnerImageBuilderProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RunnerImageBuilderProps {
private final com.cloudsnorkel.cdk.github.runners.Architecture architecture;
private final com.cloudsnorkel.cdk.github.runners.AwsImageBuilderRunnerImageBuilderProps awsImageBuilderOptions;
private final java.lang.String baseAmi;
private final java.lang.String baseDockerImage;
private final com.cloudsnorkel.cdk.github.runners.RunnerImageBuilderType builderType;
private final com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerImageBuilderProps codeBuildOptions;
private final java.util.List components;
private final java.util.List dockerSetupCommands;
private final software.amazon.awscdk.RemovalPolicy logRemovalPolicy;
private final software.amazon.awscdk.services.logs.RetentionDays logRetention;
private final com.cloudsnorkel.cdk.github.runners.Os os;
private final software.amazon.awscdk.Duration rebuildInterval;
private final com.cloudsnorkel.cdk.github.runners.RunnerVersion runnerVersion;
private final java.util.List securityGroups;
private final software.amazon.awscdk.services.ec2.SubnetSelection subnetSelection;
private final software.amazon.awscdk.services.ec2.IVpc vpc;
private final java.lang.Boolean waitOnDeploy;
/**
* 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.architecture = software.amazon.jsii.Kernel.get(this, "architecture", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.Architecture.class));
this.awsImageBuilderOptions = software.amazon.jsii.Kernel.get(this, "awsImageBuilderOptions", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.AwsImageBuilderRunnerImageBuilderProps.class));
this.baseAmi = software.amazon.jsii.Kernel.get(this, "baseAmi", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.baseDockerImage = software.amazon.jsii.Kernel.get(this, "baseDockerImage", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.builderType = software.amazon.jsii.Kernel.get(this, "builderType", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageBuilderType.class));
this.codeBuildOptions = software.amazon.jsii.Kernel.get(this, "codeBuildOptions", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerImageBuilderProps.class));
this.components = software.amazon.jsii.Kernel.get(this, "components", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageComponent.class)));
this.dockerSetupCommands = software.amazon.jsii.Kernel.get(this, "dockerSetupCommands", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.logRemovalPolicy = software.amazon.jsii.Kernel.get(this, "logRemovalPolicy", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.RemovalPolicy.class));
this.logRetention = software.amazon.jsii.Kernel.get(this, "logRetention", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.RetentionDays.class));
this.os = software.amazon.jsii.Kernel.get(this, "os", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.Os.class));
this.rebuildInterval = software.amazon.jsii.Kernel.get(this, "rebuildInterval", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.Duration.class));
this.runnerVersion = software.amazon.jsii.Kernel.get(this, "runnerVersion", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerVersion.class));
this.securityGroups = software.amazon.jsii.Kernel.get(this, "securityGroups", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.class)));
this.subnetSelection = software.amazon.jsii.Kernel.get(this, "subnetSelection", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SubnetSelection.class));
this.vpc = software.amazon.jsii.Kernel.get(this, "vpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class));
this.waitOnDeploy = software.amazon.jsii.Kernel.get(this, "waitOnDeploy", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
@SuppressWarnings("unchecked")
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.architecture = builder.architecture;
this.awsImageBuilderOptions = builder.awsImageBuilderOptions;
this.baseAmi = builder.baseAmi;
this.baseDockerImage = builder.baseDockerImage;
this.builderType = builder.builderType;
this.codeBuildOptions = builder.codeBuildOptions;
this.components = (java.util.List)builder.components;
this.dockerSetupCommands = builder.dockerSetupCommands;
this.logRemovalPolicy = builder.logRemovalPolicy;
this.logRetention = builder.logRetention;
this.os = builder.os;
this.rebuildInterval = builder.rebuildInterval;
this.runnerVersion = builder.runnerVersion;
this.securityGroups = (java.util.List)builder.securityGroups;
this.subnetSelection = builder.subnetSelection;
this.vpc = builder.vpc;
this.waitOnDeploy = builder.waitOnDeploy;
}
@Override
public final com.cloudsnorkel.cdk.github.runners.Architecture getArchitecture() {
return this.architecture;
}
@Override
public final com.cloudsnorkel.cdk.github.runners.AwsImageBuilderRunnerImageBuilderProps getAwsImageBuilderOptions() {
return this.awsImageBuilderOptions;
}
@Override
public final java.lang.String getBaseAmi() {
return this.baseAmi;
}
@Override
public final java.lang.String getBaseDockerImage() {
return this.baseDockerImage;
}
@Override
public final com.cloudsnorkel.cdk.github.runners.RunnerImageBuilderType getBuilderType() {
return this.builderType;
}
@Override
public final com.cloudsnorkel.cdk.github.runners.CodeBuildRunnerImageBuilderProps getCodeBuildOptions() {
return this.codeBuildOptions;
}
@Override
public final java.util.List getComponents() {
return this.components;
}
@Override
public final java.util.List getDockerSetupCommands() {
return this.dockerSetupCommands;
}
@Override
public final software.amazon.awscdk.RemovalPolicy getLogRemovalPolicy() {
return this.logRemovalPolicy;
}
@Override
public final software.amazon.awscdk.services.logs.RetentionDays getLogRetention() {
return this.logRetention;
}
@Override
public final com.cloudsnorkel.cdk.github.runners.Os getOs() {
return this.os;
}
@Override
public final software.amazon.awscdk.Duration getRebuildInterval() {
return this.rebuildInterval;
}
@Override
public final com.cloudsnorkel.cdk.github.runners.RunnerVersion getRunnerVersion() {
return this.runnerVersion;
}
@Override
public final java.util.List getSecurityGroups() {
return this.securityGroups;
}
@Override
public final software.amazon.awscdk.services.ec2.SubnetSelection getSubnetSelection() {
return this.subnetSelection;
}
@Override
public final software.amazon.awscdk.services.ec2.IVpc getVpc() {
return this.vpc;
}
@Override
public final java.lang.Boolean getWaitOnDeploy() {
return this.waitOnDeploy;
}
@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.getArchitecture() != null) {
data.set("architecture", om.valueToTree(this.getArchitecture()));
}
if (this.getAwsImageBuilderOptions() != null) {
data.set("awsImageBuilderOptions", om.valueToTree(this.getAwsImageBuilderOptions()));
}
if (this.getBaseAmi() != null) {
data.set("baseAmi", om.valueToTree(this.getBaseAmi()));
}
if (this.getBaseDockerImage() != null) {
data.set("baseDockerImage", om.valueToTree(this.getBaseDockerImage()));
}
if (this.getBuilderType() != null) {
data.set("builderType", om.valueToTree(this.getBuilderType()));
}
if (this.getCodeBuildOptions() != null) {
data.set("codeBuildOptions", om.valueToTree(this.getCodeBuildOptions()));
}
if (this.getComponents() != null) {
data.set("components", om.valueToTree(this.getComponents()));
}
if (this.getDockerSetupCommands() != null) {
data.set("dockerSetupCommands", om.valueToTree(this.getDockerSetupCommands()));
}
if (this.getLogRemovalPolicy() != null) {
data.set("logRemovalPolicy", om.valueToTree(this.getLogRemovalPolicy()));
}
if (this.getLogRetention() != null) {
data.set("logRetention", om.valueToTree(this.getLogRetention()));
}
if (this.getOs() != null) {
data.set("os", om.valueToTree(this.getOs()));
}
if (this.getRebuildInterval() != null) {
data.set("rebuildInterval", om.valueToTree(this.getRebuildInterval()));
}
if (this.getRunnerVersion() != null) {
data.set("runnerVersion", om.valueToTree(this.getRunnerVersion()));
}
if (this.getSecurityGroups() != null) {
data.set("securityGroups", om.valueToTree(this.getSecurityGroups()));
}
if (this.getSubnetSelection() != null) {
data.set("subnetSelection", om.valueToTree(this.getSubnetSelection()));
}
if (this.getVpc() != null) {
data.set("vpc", om.valueToTree(this.getVpc()));
}
if (this.getWaitOnDeploy() != null) {
data.set("waitOnDeploy", om.valueToTree(this.getWaitOnDeploy()));
}
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.RunnerImageBuilderProps"));
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;
RunnerImageBuilderProps.Jsii$Proxy that = (RunnerImageBuilderProps.Jsii$Proxy) o;
if (this.architecture != null ? !this.architecture.equals(that.architecture) : that.architecture != null) return false;
if (this.awsImageBuilderOptions != null ? !this.awsImageBuilderOptions.equals(that.awsImageBuilderOptions) : that.awsImageBuilderOptions != null) return false;
if (this.baseAmi != null ? !this.baseAmi.equals(that.baseAmi) : that.baseAmi != null) return false;
if (this.baseDockerImage != null ? !this.baseDockerImage.equals(that.baseDockerImage) : that.baseDockerImage != null) return false;
if (this.builderType != null ? !this.builderType.equals(that.builderType) : that.builderType != null) return false;
if (this.codeBuildOptions != null ? !this.codeBuildOptions.equals(that.codeBuildOptions) : that.codeBuildOptions != null) return false;
if (this.components != null ? !this.components.equals(that.components) : that.components != null) return false;
if (this.dockerSetupCommands != null ? !this.dockerSetupCommands.equals(that.dockerSetupCommands) : that.dockerSetupCommands != null) return false;
if (this.logRemovalPolicy != null ? !this.logRemovalPolicy.equals(that.logRemovalPolicy) : that.logRemovalPolicy != null) return false;
if (this.logRetention != null ? !this.logRetention.equals(that.logRetention) : that.logRetention != null) return false;
if (this.os != null ? !this.os.equals(that.os) : that.os != null) return false;
if (this.rebuildInterval != null ? !this.rebuildInterval.equals(that.rebuildInterval) : that.rebuildInterval != null) return false;
if (this.runnerVersion != null ? !this.runnerVersion.equals(that.runnerVersion) : that.runnerVersion != null) return false;
if (this.securityGroups != null ? !this.securityGroups.equals(that.securityGroups) : that.securityGroups != null) return false;
if (this.subnetSelection != null ? !this.subnetSelection.equals(that.subnetSelection) : that.subnetSelection != null) return false;
if (this.vpc != null ? !this.vpc.equals(that.vpc) : that.vpc != null) return false;
return this.waitOnDeploy != null ? this.waitOnDeploy.equals(that.waitOnDeploy) : that.waitOnDeploy == null;
}
@Override
public final int hashCode() {
int result = this.architecture != null ? this.architecture.hashCode() : 0;
result = 31 * result + (this.awsImageBuilderOptions != null ? this.awsImageBuilderOptions.hashCode() : 0);
result = 31 * result + (this.baseAmi != null ? this.baseAmi.hashCode() : 0);
result = 31 * result + (this.baseDockerImage != null ? this.baseDockerImage.hashCode() : 0);
result = 31 * result + (this.builderType != null ? this.builderType.hashCode() : 0);
result = 31 * result + (this.codeBuildOptions != null ? this.codeBuildOptions.hashCode() : 0);
result = 31 * result + (this.components != null ? this.components.hashCode() : 0);
result = 31 * result + (this.dockerSetupCommands != null ? this.dockerSetupCommands.hashCode() : 0);
result = 31 * result + (this.logRemovalPolicy != null ? this.logRemovalPolicy.hashCode() : 0);
result = 31 * result + (this.logRetention != null ? this.logRetention.hashCode() : 0);
result = 31 * result + (this.os != null ? this.os.hashCode() : 0);
result = 31 * result + (this.rebuildInterval != null ? this.rebuildInterval.hashCode() : 0);
result = 31 * result + (this.runnerVersion != null ? this.runnerVersion.hashCode() : 0);
result = 31 * result + (this.securityGroups != null ? this.securityGroups.hashCode() : 0);
result = 31 * result + (this.subnetSelection != null ? this.subnetSelection.hashCode() : 0);
result = 31 * result + (this.vpc != null ? this.vpc.hashCode() : 0);
result = 31 * result + (this.waitOnDeploy != null ? this.waitOnDeploy.hashCode() : 0);
return result;
}
}
}