All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cloudsnorkel.cdk.github.runners.ImageBuilderComponentProperties Maven / Gradle / Ivy

Go to download

CDK construct to create GitHub Actions self-hosted runners. A webhook listens to events and creates ephemeral runners on the fly.

There is a newer version: 0.14.6
Show newest version
package com.cloudsnorkel.cdk.github.runners;

/**
 * (experimental) Properties for ImageBuilderComponent construct.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.519Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.ImageBuilderComponentProperties")
@software.amazon.jsii.Jsii.Proxy(ImageBuilderComponentProperties.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ImageBuilderComponentProperties extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Shell commands to run when adding this component to the image.
     * 

* On Linux, these are bash commands. On Windows, there are PowerShell commands. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.util.List getCommands(); /** * (experimental) Component description. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getDescription(); /** * (experimental) Component display name. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getDisplayName(); /** * (experimental) Component platform. *

* Must match the builder platform. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull java.lang.String getPlatform(); /** * (experimental) Optional assets to add to the built image. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getAssets() { return null; } /** * (experimental) Require a reboot after installing this component. *

* Default: false */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getReboot() { return null; } /** * @return a {@link Builder} of {@link ImageBuilderComponentProperties} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link ImageBuilderComponentProperties} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.util.List commands; java.lang.String description; java.lang.String displayName; java.lang.String platform; java.util.List assets; java.lang.Boolean reboot; /** * Sets the value of {@link ImageBuilderComponentProperties#getCommands} * @param commands Shell commands to run when adding this component to the image. This parameter is required. * On Linux, these are bash commands. On Windows, there are PowerShell commands. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder commands(java.util.List commands) { this.commands = commands; return this; } /** * Sets the value of {@link ImageBuilderComponentProperties#getDescription} * @param description Component description. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder description(java.lang.String description) { this.description = description; return this; } /** * Sets the value of {@link ImageBuilderComponentProperties#getDisplayName} * @param displayName Component display name. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder displayName(java.lang.String displayName) { this.displayName = displayName; return this; } /** * Sets the value of {@link ImageBuilderComponentProperties#getPlatform} * @param platform Component platform. This parameter is required. * Must match the builder platform. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder platform(java.lang.String platform) { this.platform = platform; return this; } /** * Sets the value of {@link ImageBuilderComponentProperties#getAssets} * @param assets Optional assets to add to the built image. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder assets(java.util.List assets) { this.assets = (java.util.List)assets; return this; } /** * Sets the value of {@link ImageBuilderComponentProperties#getReboot} * @param reboot Require a reboot after installing this component. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder reboot(java.lang.Boolean reboot) { this.reboot = reboot; return this; } /** * Builds the configured instance. * @return a new instance of {@link ImageBuilderComponentProperties} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public ImageBuilderComponentProperties build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link ImageBuilderComponentProperties} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ImageBuilderComponentProperties { private final java.util.List commands; private final java.lang.String description; private final java.lang.String displayName; private final java.lang.String platform; private final java.util.List assets; private final java.lang.Boolean reboot; /** * 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.commands = software.amazon.jsii.Kernel.get(this, "commands", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.displayName = software.amazon.jsii.Kernel.get(this, "displayName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.platform = software.amazon.jsii.Kernel.get(this, "platform", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.assets = software.amazon.jsii.Kernel.get(this, "assets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.ImageBuilderAsset.class))); this.reboot = software.amazon.jsii.Kernel.get(this, "reboot", 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.commands = java.util.Objects.requireNonNull(builder.commands, "commands is required"); this.description = java.util.Objects.requireNonNull(builder.description, "description is required"); this.displayName = java.util.Objects.requireNonNull(builder.displayName, "displayName is required"); this.platform = java.util.Objects.requireNonNull(builder.platform, "platform is required"); this.assets = (java.util.List)builder.assets; this.reboot = builder.reboot; } @Override public final java.util.List getCommands() { return this.commands; } @Override public final java.lang.String getDescription() { return this.description; } @Override public final java.lang.String getDisplayName() { return this.displayName; } @Override public final java.lang.String getPlatform() { return this.platform; } @Override public final java.util.List getAssets() { return this.assets; } @Override public final java.lang.Boolean getReboot() { return this.reboot; } @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(); data.set("commands", om.valueToTree(this.getCommands())); data.set("description", om.valueToTree(this.getDescription())); data.set("displayName", om.valueToTree(this.getDisplayName())); data.set("platform", om.valueToTree(this.getPlatform())); if (this.getAssets() != null) { data.set("assets", om.valueToTree(this.getAssets())); } if (this.getReboot() != null) { data.set("reboot", om.valueToTree(this.getReboot())); } 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.ImageBuilderComponentProperties")); 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; ImageBuilderComponentProperties.Jsii$Proxy that = (ImageBuilderComponentProperties.Jsii$Proxy) o; if (!commands.equals(that.commands)) return false; if (!description.equals(that.description)) return false; if (!displayName.equals(that.displayName)) return false; if (!platform.equals(that.platform)) return false; if (this.assets != null ? !this.assets.equals(that.assets) : that.assets != null) return false; return this.reboot != null ? this.reboot.equals(that.reboot) : that.reboot == null; } @Override public final int hashCode() { int result = this.commands.hashCode(); result = 31 * result + (this.description.hashCode()); result = 31 * result + (this.displayName.hashCode()); result = 31 * result + (this.platform.hashCode()); result = 31 * result + (this.assets != null ? this.assets.hashCode() : 0); result = 31 * result + (this.reboot != null ? this.reboot.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy