com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingProps Maven / Gradle / Ivy
Show all versions of cdk-autoscaling-gitlab-runner Show documentation
package com.pepperize.cdk.autoscaling_gitlab_runner;
/**
* Properties of the Gitlab Runner.
*
* You have to provide at least the GitLab's Runner's authentication token.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.98.0 (build 00b106d)", date = "2024-05-01T02:44:42.322Z")
@software.amazon.jsii.Jsii(module = com.pepperize.cdk.autoscaling_gitlab_runner.$Module.class, fqn = "@pepperize/cdk-autoscaling-gitlab-runner.GitlabRunnerAutoscalingProps")
@software.amazon.jsii.Jsii.Proxy(GitlabRunnerAutoscalingProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface GitlabRunnerAutoscalingProps extends software.amazon.jsii.JsiiSerializable, com.pepperize.cdk.autoscaling_gitlab_runner.GlobalConfiguration {
/**
* The runner EC2 instances settings.
*
* At least one runner should be set up.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@org.jetbrains.annotations.NotNull java.util.List getRunners();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingCacheProps getCache() {
return null;
}
/**
* The manager EC2 instance configuration.
*
* If not set, the defaults will be used.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerBaseProps getManager() {
return null;
}
/**
* The network configuration for the Runner.
*
* If not set, the defaults will be used.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
default @org.jetbrains.annotations.Nullable com.pepperize.cdk.autoscaling_gitlab_runner.NetworkProps getNetwork() {
return null;
}
/**
* @return a {@link Builder} of {@link GitlabRunnerAutoscalingProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link GitlabRunnerAutoscalingProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List runners;
com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingCacheProps cache;
com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerBaseProps manager;
com.pepperize.cdk.autoscaling_gitlab_runner.NetworkProps network;
java.lang.Number checkInterval;
java.lang.Number concurrent;
java.lang.String logFormat;
java.lang.String logLevel;
/**
* Sets the value of {@link GitlabRunnerAutoscalingProps#getRunners}
* @param runners The runner EC2 instances settings. This parameter is required.
* At least one runner should be set up.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@SuppressWarnings("unchecked")
public Builder runners(java.util.List extends com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunnerProps> runners) {
this.runners = (java.util.List)runners;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingProps#getCache}
* @param cache the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder cache(com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingCacheProps cache) {
this.cache = cache;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingProps#getManager}
* @param manager The manager EC2 instance configuration.
* If not set, the defaults will be used.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder manager(com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerBaseProps manager) {
this.manager = manager;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingProps#getNetwork}
* @param network The network configuration for the Runner.
* If not set, the defaults will be used.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder network(com.pepperize.cdk.autoscaling_gitlab_runner.NetworkProps network) {
this.network = network;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingProps#getCheckInterval}
* @param checkInterval The check_interval option defines how often the runner should check GitLab for new jobs| in seconds.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder checkInterval(java.lang.Number checkInterval) {
this.checkInterval = checkInterval;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingProps#getConcurrent}
* @param concurrent The limit of the jobs that can be run concurrently across all runners (concurrent).
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder concurrent(java.lang.Number concurrent) {
this.concurrent = concurrent;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingProps#getLogFormat}
* @param logFormat The log format.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder logFormat(java.lang.String logFormat) {
this.logFormat = logFormat;
return this;
}
/**
* Sets the value of {@link GitlabRunnerAutoscalingProps#getLogLevel}
* @param logLevel The log_level.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder logLevel(java.lang.String logLevel) {
this.logLevel = logLevel;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link GitlabRunnerAutoscalingProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public GitlabRunnerAutoscalingProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link GitlabRunnerAutoscalingProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements GitlabRunnerAutoscalingProps {
private final java.util.List runners;
private final com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingCacheProps cache;
private final com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerBaseProps manager;
private final com.pepperize.cdk.autoscaling_gitlab_runner.NetworkProps network;
private final java.lang.Number checkInterval;
private final java.lang.Number concurrent;
private final java.lang.String logFormat;
private final java.lang.String logLevel;
/**
* 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.runners = software.amazon.jsii.Kernel.get(this, "runners", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingJobRunnerProps.class)));
this.cache = software.amazon.jsii.Kernel.get(this, "cache", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingCacheProps.class));
this.manager = software.amazon.jsii.Kernel.get(this, "manager", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerBaseProps.class));
this.network = software.amazon.jsii.Kernel.get(this, "network", software.amazon.jsii.NativeType.forClass(com.pepperize.cdk.autoscaling_gitlab_runner.NetworkProps.class));
this.checkInterval = software.amazon.jsii.Kernel.get(this, "checkInterval", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.concurrent = software.amazon.jsii.Kernel.get(this, "concurrent", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.logFormat = software.amazon.jsii.Kernel.get(this, "logFormat", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.logLevel = software.amazon.jsii.Kernel.get(this, "logLevel", 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.runners = (java.util.List)java.util.Objects.requireNonNull(builder.runners, "runners is required");
this.cache = builder.cache;
this.manager = builder.manager;
this.network = builder.network;
this.checkInterval = builder.checkInterval;
this.concurrent = builder.concurrent;
this.logFormat = builder.logFormat;
this.logLevel = builder.logLevel;
}
@Override
public final java.util.List getRunners() {
return this.runners;
}
@Override
public final com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingCacheProps getCache() {
return this.cache;
}
@Override
public final com.pepperize.cdk.autoscaling_gitlab_runner.GitlabRunnerAutoscalingManagerBaseProps getManager() {
return this.manager;
}
@Override
public final com.pepperize.cdk.autoscaling_gitlab_runner.NetworkProps getNetwork() {
return this.network;
}
@Override
public final java.lang.Number getCheckInterval() {
return this.checkInterval;
}
@Override
public final java.lang.Number getConcurrent() {
return this.concurrent;
}
@Override
public final java.lang.String getLogFormat() {
return this.logFormat;
}
@Override
public final java.lang.String getLogLevel() {
return this.logLevel;
}
@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("runners", om.valueToTree(this.getRunners()));
if (this.getCache() != null) {
data.set("cache", om.valueToTree(this.getCache()));
}
if (this.getManager() != null) {
data.set("manager", om.valueToTree(this.getManager()));
}
if (this.getNetwork() != null) {
data.set("network", om.valueToTree(this.getNetwork()));
}
if (this.getCheckInterval() != null) {
data.set("checkInterval", om.valueToTree(this.getCheckInterval()));
}
if (this.getConcurrent() != null) {
data.set("concurrent", om.valueToTree(this.getConcurrent()));
}
if (this.getLogFormat() != null) {
data.set("logFormat", om.valueToTree(this.getLogFormat()));
}
if (this.getLogLevel() != null) {
data.set("logLevel", om.valueToTree(this.getLogLevel()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@pepperize/cdk-autoscaling-gitlab-runner.GitlabRunnerAutoscalingProps"));
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;
GitlabRunnerAutoscalingProps.Jsii$Proxy that = (GitlabRunnerAutoscalingProps.Jsii$Proxy) o;
if (!runners.equals(that.runners)) return false;
if (this.cache != null ? !this.cache.equals(that.cache) : that.cache != null) return false;
if (this.manager != null ? !this.manager.equals(that.manager) : that.manager != null) return false;
if (this.network != null ? !this.network.equals(that.network) : that.network != null) return false;
if (this.checkInterval != null ? !this.checkInterval.equals(that.checkInterval) : that.checkInterval != null) return false;
if (this.concurrent != null ? !this.concurrent.equals(that.concurrent) : that.concurrent != null) return false;
if (this.logFormat != null ? !this.logFormat.equals(that.logFormat) : that.logFormat != null) return false;
return this.logLevel != null ? this.logLevel.equals(that.logLevel) : that.logLevel == null;
}
@Override
public final int hashCode() {
int result = this.runners.hashCode();
result = 31 * result + (this.cache != null ? this.cache.hashCode() : 0);
result = 31 * result + (this.manager != null ? this.manager.hashCode() : 0);
result = 31 * result + (this.network != null ? this.network.hashCode() : 0);
result = 31 * result + (this.checkInterval != null ? this.checkInterval.hashCode() : 0);
result = 31 * result + (this.concurrent != null ? this.concurrent.hashCode() : 0);
result = 31 * result + (this.logFormat != null ? this.logFormat.hashCode() : 0);
result = 31 * result + (this.logLevel != null ? this.logLevel.hashCode() : 0);
return result;
}
}
}