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

org.cdk8s.plus22.HttpGetProbeOptions Maven / Gradle / Ivy

There is a newer version: 2.0.0-rc.158
Show newest version
package org.cdk8s.plus22;

/**
 * Options for `Probe.fromHttpGet()`.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.47.0 (build 86d2c33)", date = "2021-12-08T00:16:55.094Z")
@software.amazon.jsii.Jsii(module = org.cdk8s.plus22.$Module.class, fqn = "cdk8s-plus-22.HttpGetProbeOptions")
@software.amazon.jsii.Jsii.Proxy(HttpGetProbeOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface HttpGetProbeOptions extends software.amazon.jsii.JsiiSerializable, org.cdk8s.plus22.ProbeOptions {

    /**
     * The TCP port to use when sending the GET request.
     * 

* Default: - defaults to `container.port`. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Number getPort() { return null; } /** * @return a {@link Builder} of {@link HttpGetProbeOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link HttpGetProbeOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { java.lang.Number port; java.lang.Number failureThreshold; org.cdk8s.Duration initialDelaySeconds; org.cdk8s.Duration periodSeconds; java.lang.Number successThreshold; org.cdk8s.Duration timeoutSeconds; /** * Sets the value of {@link HttpGetProbeOptions#getPort} * @param port The TCP port to use when sending the GET request. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder port(java.lang.Number port) { this.port = port; return this; } /** * Sets the value of {@link HttpGetProbeOptions#getFailureThreshold} * @param failureThreshold Minimum consecutive failures for the probe to be considered failed after having succeeded. * Defaults to 3. Minimum value is 1. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder failureThreshold(java.lang.Number failureThreshold) { this.failureThreshold = failureThreshold; return this; } /** * Sets the value of {@link HttpGetProbeOptions#getInitialDelaySeconds} * @param initialDelaySeconds Number of seconds after the container has started before liveness probes are initiated. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder initialDelaySeconds(org.cdk8s.Duration initialDelaySeconds) { this.initialDelaySeconds = initialDelaySeconds; return this; } /** * Sets the value of {@link HttpGetProbeOptions#getPeriodSeconds} * @param periodSeconds How often (in seconds) to perform the probe. * Default to 10 seconds. Minimum value is 1. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder periodSeconds(org.cdk8s.Duration periodSeconds) { this.periodSeconds = periodSeconds; return this; } /** * Sets the value of {@link HttpGetProbeOptions#getSuccessThreshold} * @param successThreshold Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. * Must be 1 for liveness and startup. Minimum value is 1. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder successThreshold(java.lang.Number successThreshold) { this.successThreshold = successThreshold; return this; } /** * Sets the value of {@link HttpGetProbeOptions#getTimeoutSeconds} * @param timeoutSeconds Number of seconds after which the probe times out. * Defaults to 1 second. Minimum value is 1. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder timeoutSeconds(org.cdk8s.Duration timeoutSeconds) { this.timeoutSeconds = timeoutSeconds; return this; } /** * Builds the configured instance. * @return a new instance of {@link HttpGetProbeOptions} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public HttpGetProbeOptions build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link HttpGetProbeOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements HttpGetProbeOptions { private final java.lang.Number port; private final java.lang.Number failureThreshold; private final org.cdk8s.Duration initialDelaySeconds; private final org.cdk8s.Duration periodSeconds; private final java.lang.Number successThreshold; private final org.cdk8s.Duration timeoutSeconds; /** * 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.port = software.amazon.jsii.Kernel.get(this, "port", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.failureThreshold = software.amazon.jsii.Kernel.get(this, "failureThreshold", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.initialDelaySeconds = software.amazon.jsii.Kernel.get(this, "initialDelaySeconds", software.amazon.jsii.NativeType.forClass(org.cdk8s.Duration.class)); this.periodSeconds = software.amazon.jsii.Kernel.get(this, "periodSeconds", software.amazon.jsii.NativeType.forClass(org.cdk8s.Duration.class)); this.successThreshold = software.amazon.jsii.Kernel.get(this, "successThreshold", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.timeoutSeconds = software.amazon.jsii.Kernel.get(this, "timeoutSeconds", software.amazon.jsii.NativeType.forClass(org.cdk8s.Duration.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.port = builder.port; this.failureThreshold = builder.failureThreshold; this.initialDelaySeconds = builder.initialDelaySeconds; this.periodSeconds = builder.periodSeconds; this.successThreshold = builder.successThreshold; this.timeoutSeconds = builder.timeoutSeconds; } @Override public final java.lang.Number getPort() { return this.port; } @Override public final java.lang.Number getFailureThreshold() { return this.failureThreshold; } @Override public final org.cdk8s.Duration getInitialDelaySeconds() { return this.initialDelaySeconds; } @Override public final org.cdk8s.Duration getPeriodSeconds() { return this.periodSeconds; } @Override public final java.lang.Number getSuccessThreshold() { return this.successThreshold; } @Override public final org.cdk8s.Duration getTimeoutSeconds() { return this.timeoutSeconds; } @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.getPort() != null) { data.set("port", om.valueToTree(this.getPort())); } if (this.getFailureThreshold() != null) { data.set("failureThreshold", om.valueToTree(this.getFailureThreshold())); } if (this.getInitialDelaySeconds() != null) { data.set("initialDelaySeconds", om.valueToTree(this.getInitialDelaySeconds())); } if (this.getPeriodSeconds() != null) { data.set("periodSeconds", om.valueToTree(this.getPeriodSeconds())); } if (this.getSuccessThreshold() != null) { data.set("successThreshold", om.valueToTree(this.getSuccessThreshold())); } if (this.getTimeoutSeconds() != null) { data.set("timeoutSeconds", om.valueToTree(this.getTimeoutSeconds())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk8s-plus-22.HttpGetProbeOptions")); 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; HttpGetProbeOptions.Jsii$Proxy that = (HttpGetProbeOptions.Jsii$Proxy) o; if (this.port != null ? !this.port.equals(that.port) : that.port != null) return false; if (this.failureThreshold != null ? !this.failureThreshold.equals(that.failureThreshold) : that.failureThreshold != null) return false; if (this.initialDelaySeconds != null ? !this.initialDelaySeconds.equals(that.initialDelaySeconds) : that.initialDelaySeconds != null) return false; if (this.periodSeconds != null ? !this.periodSeconds.equals(that.periodSeconds) : that.periodSeconds != null) return false; if (this.successThreshold != null ? !this.successThreshold.equals(that.successThreshold) : that.successThreshold != null) return false; return this.timeoutSeconds != null ? this.timeoutSeconds.equals(that.timeoutSeconds) : that.timeoutSeconds == null; } @Override public final int hashCode() { int result = this.port != null ? this.port.hashCode() : 0; result = 31 * result + (this.failureThreshold != null ? this.failureThreshold.hashCode() : 0); result = 31 * result + (this.initialDelaySeconds != null ? this.initialDelaySeconds.hashCode() : 0); result = 31 * result + (this.periodSeconds != null ? this.periodSeconds.hashCode() : 0); result = 31 * result + (this.successThreshold != null ? this.successThreshold.hashCode() : 0); result = 31 * result + (this.timeoutSeconds != null ? this.timeoutSeconds.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy