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

com.pepperize.cdk.autoscaling_gitlab_runner.AutoscalingConfiguration Maven / Gradle / Ivy

There is a newer version: 0.2.627
Show newest version
package com.pepperize.cdk.autoscaling_gitlab_runner;

/**
 * @see https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachineautoscaling-sections
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.98.0 (build 00b106d)", date = "2024-05-01T02:44:42.294Z")
@software.amazon.jsii.Jsii(module = com.pepperize.cdk.autoscaling_gitlab_runner.$Module.class, fqn = "@pepperize/cdk-autoscaling-gitlab-runner.AutoscalingConfiguration")
@software.amazon.jsii.Jsii.Proxy(AutoscalingConfiguration.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface AutoscalingConfiguration extends software.amazon.jsii.JsiiSerializable {

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    default @org.jetbrains.annotations.Nullable java.lang.Number getIdleCount() {
        return null;
    }

    /**
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    default @org.jetbrains.annotations.Nullable java.lang.Number getIdleTime() {
        return null;
    }

    /**
     * The Periods setting contains an array of string patterns of time periods represented in a cron-style format. https://github.com/gorhill/cronexpr#implementation.
     * 

* [second] [minute] [hour] [day of month] [month] [day of week] [year] *

* Example: *

*

     * // "* * 7-22 * * mon-fri *"
     * 
*/ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.List getPeriods() { return null; } /** */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getTimezone() { return null; } /** * @return a {@link Builder} of {@link AutoscalingConfiguration} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link AutoscalingConfiguration} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { java.lang.Number idleCount; java.lang.Number idleTime; java.util.List periods; java.lang.String timezone; /** * Sets the value of {@link AutoscalingConfiguration#getIdleCount} * @param idleCount the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder idleCount(java.lang.Number idleCount) { this.idleCount = idleCount; return this; } /** * Sets the value of {@link AutoscalingConfiguration#getIdleTime} * @param idleTime the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder idleTime(java.lang.Number idleTime) { this.idleTime = idleTime; return this; } /** * Sets the value of {@link AutoscalingConfiguration#getPeriods} * @param periods The Periods setting contains an array of string patterns of time periods represented in a cron-style format. https://github.com/gorhill/cronexpr#implementation. * [second] [minute] [hour] [day of month] [month] [day of week] [year] * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder periods(java.util.List periods) { this.periods = periods; return this; } /** * Sets the value of {@link AutoscalingConfiguration#getTimezone} * @param timezone the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder timezone(java.lang.String timezone) { this.timezone = timezone; return this; } /** * Builds the configured instance. * @return a new instance of {@link AutoscalingConfiguration} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public AutoscalingConfiguration build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link AutoscalingConfiguration} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AutoscalingConfiguration { private final java.lang.Number idleCount; private final java.lang.Number idleTime; private final java.util.List periods; private final java.lang.String timezone; /** * 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.idleCount = software.amazon.jsii.Kernel.get(this, "idleCount", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.idleTime = software.amazon.jsii.Kernel.get(this, "idleTime", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.periods = software.amazon.jsii.Kernel.get(this, "periods", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.timezone = software.amazon.jsii.Kernel.get(this, "timezone", software.amazon.jsii.NativeType.forClass(java.lang.String.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.idleCount = builder.idleCount; this.idleTime = builder.idleTime; this.periods = builder.periods; this.timezone = builder.timezone; } @Override public final java.lang.Number getIdleCount() { return this.idleCount; } @Override public final java.lang.Number getIdleTime() { return this.idleTime; } @Override public final java.util.List getPeriods() { return this.periods; } @Override public final java.lang.String getTimezone() { return this.timezone; } @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.getIdleCount() != null) { data.set("idleCount", om.valueToTree(this.getIdleCount())); } if (this.getIdleTime() != null) { data.set("idleTime", om.valueToTree(this.getIdleTime())); } if (this.getPeriods() != null) { data.set("periods", om.valueToTree(this.getPeriods())); } if (this.getTimezone() != null) { data.set("timezone", om.valueToTree(this.getTimezone())); } 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.AutoscalingConfiguration")); 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; AutoscalingConfiguration.Jsii$Proxy that = (AutoscalingConfiguration.Jsii$Proxy) o; if (this.idleCount != null ? !this.idleCount.equals(that.idleCount) : that.idleCount != null) return false; if (this.idleTime != null ? !this.idleTime.equals(that.idleTime) : that.idleTime != null) return false; if (this.periods != null ? !this.periods.equals(that.periods) : that.periods != null) return false; return this.timezone != null ? this.timezone.equals(that.timezone) : that.timezone == null; } @Override public final int hashCode() { int result = this.idleCount != null ? this.idleCount.hashCode() : 0; result = 31 * result + (this.idleTime != null ? this.idleTime.hashCode() : 0); result = 31 * result + (this.periods != null ? this.periods.hashCode() : 0); result = 31 * result + (this.timezone != null ? this.timezone.hashCode() : 0); return result; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy