com.cloudsnorkel.cdk.github.runners.RunnerImageComponentCustomProps 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.537Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.RunnerImageComponentCustomProps")
@software.amazon.jsii.Jsii.Proxy(RunnerImageComponentCustomProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface RunnerImageComponentCustomProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) Assets to copy into 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) Commands to run in the built image.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getCommands() {
return null;
}
/**
* (experimental) Docker commands to run in the built image.
*
* For example: ['ENV foo=bar', 'RUN echo $foo']
*
* These commands are ignored when building AMIs.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getDockerCommands() {
return null;
}
/**
* (experimental) Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }.
*
* Name must only contain alphanumeric characters and dashes.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getName() {
return null;
}
/**
* @return a {@link Builder} of {@link RunnerImageComponentCustomProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link RunnerImageComponentCustomProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List assets;
java.util.List commands;
java.util.List dockerCommands;
java.lang.String name;
/**
* Sets the value of {@link RunnerImageComponentCustomProps#getAssets}
* @param assets Assets to copy into the built image.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder assets(java.util.List extends com.cloudsnorkel.cdk.github.runners.RunnerImageAsset> assets) {
this.assets = (java.util.List)assets;
return this;
}
/**
* Sets the value of {@link RunnerImageComponentCustomProps#getCommands}
* @param commands Commands to run in the built image.
* @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 RunnerImageComponentCustomProps#getDockerCommands}
* @param dockerCommands Docker commands to run in the built image.
* For example: ['ENV foo=bar', 'RUN echo $foo']
*
* These commands are ignored when building AMIs.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder dockerCommands(java.util.List dockerCommands) {
this.dockerCommands = dockerCommands;
return this;
}
/**
* Sets the value of {@link RunnerImageComponentCustomProps#getName}
* @param name Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }.
* Name must only contain alphanumeric characters and dashes.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder name(java.lang.String name) {
this.name = name;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link RunnerImageComponentCustomProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public RunnerImageComponentCustomProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link RunnerImageComponentCustomProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RunnerImageComponentCustomProps {
private final java.util.List assets;
private final java.util.List commands;
private final java.util.List dockerCommands;
private final java.lang.String name;
/**
* 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.assets = software.amazon.jsii.Kernel.get(this, "assets", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerImageAsset.class)));
this.commands = software.amazon.jsii.Kernel.get(this, "commands", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.dockerCommands = software.amazon.jsii.Kernel.get(this, "dockerCommands", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.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.assets = (java.util.List)builder.assets;
this.commands = builder.commands;
this.dockerCommands = builder.dockerCommands;
this.name = builder.name;
}
@Override
public final java.util.List getAssets() {
return this.assets;
}
@Override
public final java.util.List getCommands() {
return this.commands;
}
@Override
public final java.util.List getDockerCommands() {
return this.dockerCommands;
}
@Override
public final java.lang.String getName() {
return this.name;
}
@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.getAssets() != null) {
data.set("assets", om.valueToTree(this.getAssets()));
}
if (this.getCommands() != null) {
data.set("commands", om.valueToTree(this.getCommands()));
}
if (this.getDockerCommands() != null) {
data.set("dockerCommands", om.valueToTree(this.getDockerCommands()));
}
if (this.getName() != null) {
data.set("name", om.valueToTree(this.getName()));
}
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.RunnerImageComponentCustomProps"));
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;
RunnerImageComponentCustomProps.Jsii$Proxy that = (RunnerImageComponentCustomProps.Jsii$Proxy) o;
if (this.assets != null ? !this.assets.equals(that.assets) : that.assets != null) return false;
if (this.commands != null ? !this.commands.equals(that.commands) : that.commands != null) return false;
if (this.dockerCommands != null ? !this.dockerCommands.equals(that.dockerCommands) : that.dockerCommands != null) return false;
return this.name != null ? this.name.equals(that.name) : that.name == null;
}
@Override
public final int hashCode() {
int result = this.assets != null ? this.assets.hashCode() : 0;
result = 31 * result + (this.commands != null ? this.commands.hashCode() : 0);
result = 31 * result + (this.dockerCommands != null ? this.dockerCommands.hashCode() : 0);
result = 31 * result + (this.name != null ? this.name.hashCode() : 0);
return result;
}
}
}