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

com.cloudsnorkel.cdk.github.runners.RunnerImage 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) Description of a Docker image built by {@link RunnerImageBuilder }.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T02:42:19.530Z")
@software.amazon.jsii.Jsii(module = com.cloudsnorkel.cdk.github.runners.$Module.class, fqn = "@cloudsnorkel/cdk-github-runners.RunnerImage")
@software.amazon.jsii.Jsii.Proxy(RunnerImage.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface RunnerImage extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Architecture of the image.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Architecture getArchitecture();

    /**
     * (experimental) ECR repository containing the image.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ecr.IRepository getImageRepository();

    /**
     * (experimental) Static image tag where the image will be pushed.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getImageTag();

    /**
     * (experimental) OS type of the image.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.Os getOs();

    /**
     * (deprecated) Installed runner version.
     * 

* @deprecated open a ticket if you need this */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated @org.jetbrains.annotations.NotNull com.cloudsnorkel.cdk.github.runners.RunnerVersion getRunnerVersion(); /** * (experimental) Log group where image builds are logged. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.logs.LogGroup getLogGroup() { return null; } /** * @return a {@link Builder} of {@link RunnerImage} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link RunnerImage} */ @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; software.amazon.awscdk.services.ecr.IRepository imageRepository; java.lang.String imageTag; com.cloudsnorkel.cdk.github.runners.Os os; com.cloudsnorkel.cdk.github.runners.RunnerVersion runnerVersion; software.amazon.awscdk.services.logs.LogGroup logGroup; /** * Sets the value of {@link RunnerImage#getArchitecture} * @param architecture Architecture of the image. This parameter is required. * @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 RunnerImage#getImageRepository} * @param imageRepository ECR repository containing the image. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder imageRepository(software.amazon.awscdk.services.ecr.IRepository imageRepository) { this.imageRepository = imageRepository; return this; } /** * Sets the value of {@link RunnerImage#getImageTag} * @param imageTag Static image tag where the image will be pushed. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder imageTag(java.lang.String imageTag) { this.imageTag = imageTag; return this; } /** * Sets the value of {@link RunnerImage#getOs} * @param os OS type of the image. This parameter is required. * @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 RunnerImage#getRunnerVersion} * @param runnerVersion Installed runner version. This parameter is required. * @return {@code this} * @deprecated open a ticket if you need this */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public Builder runnerVersion(com.cloudsnorkel.cdk.github.runners.RunnerVersion runnerVersion) { this.runnerVersion = runnerVersion; return this; } /** * Sets the value of {@link RunnerImage#getLogGroup} * @param logGroup Log group where image builds are logged. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder logGroup(software.amazon.awscdk.services.logs.LogGroup logGroup) { this.logGroup = logGroup; return this; } /** * Builds the configured instance. * @return a new instance of {@link RunnerImage} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public RunnerImage build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link RunnerImage} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RunnerImage { private final com.cloudsnorkel.cdk.github.runners.Architecture architecture; private final software.amazon.awscdk.services.ecr.IRepository imageRepository; private final java.lang.String imageTag; private final com.cloudsnorkel.cdk.github.runners.Os os; private final com.cloudsnorkel.cdk.github.runners.RunnerVersion runnerVersion; private final software.amazon.awscdk.services.logs.LogGroup logGroup; /** * 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.imageRepository = software.amazon.jsii.Kernel.get(this, "imageRepository", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ecr.IRepository.class)); this.imageTag = software.amazon.jsii.Kernel.get(this, "imageTag", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.os = software.amazon.jsii.Kernel.get(this, "os", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.Os.class)); this.runnerVersion = software.amazon.jsii.Kernel.get(this, "runnerVersion", software.amazon.jsii.NativeType.forClass(com.cloudsnorkel.cdk.github.runners.RunnerVersion.class)); this.logGroup = software.amazon.jsii.Kernel.get(this, "logGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.logs.LogGroup.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.architecture = java.util.Objects.requireNonNull(builder.architecture, "architecture is required"); this.imageRepository = java.util.Objects.requireNonNull(builder.imageRepository, "imageRepository is required"); this.imageTag = java.util.Objects.requireNonNull(builder.imageTag, "imageTag is required"); this.os = java.util.Objects.requireNonNull(builder.os, "os is required"); this.runnerVersion = java.util.Objects.requireNonNull(builder.runnerVersion, "runnerVersion is required"); this.logGroup = builder.logGroup; } @Override public final com.cloudsnorkel.cdk.github.runners.Architecture getArchitecture() { return this.architecture; } @Override public final software.amazon.awscdk.services.ecr.IRepository getImageRepository() { return this.imageRepository; } @Override public final java.lang.String getImageTag() { return this.imageTag; } @Override public final com.cloudsnorkel.cdk.github.runners.Os getOs() { return this.os; } @Override public final com.cloudsnorkel.cdk.github.runners.RunnerVersion getRunnerVersion() { return this.runnerVersion; } @Override public final software.amazon.awscdk.services.logs.LogGroup getLogGroup() { return this.logGroup; } @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("architecture", om.valueToTree(this.getArchitecture())); data.set("imageRepository", om.valueToTree(this.getImageRepository())); data.set("imageTag", om.valueToTree(this.getImageTag())); data.set("os", om.valueToTree(this.getOs())); data.set("runnerVersion", om.valueToTree(this.getRunnerVersion())); if (this.getLogGroup() != null) { data.set("logGroup", om.valueToTree(this.getLogGroup())); } 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.RunnerImage")); 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; RunnerImage.Jsii$Proxy that = (RunnerImage.Jsii$Proxy) o; if (!architecture.equals(that.architecture)) return false; if (!imageRepository.equals(that.imageRepository)) return false; if (!imageTag.equals(that.imageTag)) return false; if (!os.equals(that.os)) return false; if (!runnerVersion.equals(that.runnerVersion)) return false; return this.logGroup != null ? this.logGroup.equals(that.logGroup) : that.logGroup == null; } @Override public final int hashCode() { int result = this.architecture.hashCode(); result = 31 * result + (this.imageRepository.hashCode()); result = 31 * result + (this.imageTag.hashCode()); result = 31 * result + (this.os.hashCode()); result = 31 * result + (this.runnerVersion.hashCode()); result = 31 * result + (this.logGroup != null ? this.logGroup.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy