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

com.cloudsnorkel.cdk.github.runners.RunnerAmi 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 AMI 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.RunnerAmi")
@software.amazon.jsii.Jsii.Proxy(RunnerAmi.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface RunnerAmi 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) Launch template pointing to the latest AMI.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.ec2.ILaunchTemplate getLaunchTemplate();

    /**
     * (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 RunnerAmi} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link RunnerAmi} */ @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.ec2.ILaunchTemplate launchTemplate; 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 RunnerAmi#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 RunnerAmi#getLaunchTemplate} * @param launchTemplate Launch template pointing to the latest AMI. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder launchTemplate(software.amazon.awscdk.services.ec2.ILaunchTemplate launchTemplate) { this.launchTemplate = launchTemplate; return this; } /** * Sets the value of {@link RunnerAmi#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 RunnerAmi#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 RunnerAmi#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 RunnerAmi} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public RunnerAmi build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link RunnerAmi} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements RunnerAmi { private final com.cloudsnorkel.cdk.github.runners.Architecture architecture; private final software.amazon.awscdk.services.ec2.ILaunchTemplate launchTemplate; 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.launchTemplate = software.amazon.jsii.Kernel.get(this, "launchTemplate", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ILaunchTemplate.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.launchTemplate = java.util.Objects.requireNonNull(builder.launchTemplate, "launchTemplate 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.ec2.ILaunchTemplate getLaunchTemplate() { return this.launchTemplate; } @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("launchTemplate", om.valueToTree(this.getLaunchTemplate())); 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.RunnerAmi")); 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; RunnerAmi.Jsii$Proxy that = (RunnerAmi.Jsii$Proxy) o; if (!architecture.equals(that.architecture)) return false; if (!launchTemplate.equals(that.launchTemplate)) 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.launchTemplate.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