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

org.cdk8s.plus23.NodeTaintQueryOptions Maven / Gradle / Ivy

package org.cdk8s.plus23;

/**
 * Options for `NodeTaintQuery`.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.75.0 (build 63bb957)", date = "2023-02-21T09:46:03.648Z")
@software.amazon.jsii.Jsii(module = org.cdk8s.plus23.$Module.class, fqn = "cdk8s-plus-23.NodeTaintQueryOptions")
@software.amazon.jsii.Jsii.Proxy(NodeTaintQueryOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface NodeTaintQueryOptions extends software.amazon.jsii.JsiiSerializable {

    /**
     * The taint effect to match.
     * 

* Default: - all effects are matched. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.cdk8s.plus23.TaintEffect getEffect() { return null; } /** * How much time should a pod that tolerates the `NO_EXECUTE` effect be bound to the node. *

* Only applies for the NO_EXECUTE effect. *

* Default: - bound forever. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.cdk8s.Duration getEvictAfter() { return null; } /** * @return a {@link Builder} of {@link NodeTaintQueryOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link NodeTaintQueryOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { org.cdk8s.plus23.TaintEffect effect; org.cdk8s.Duration evictAfter; /** * Sets the value of {@link NodeTaintQueryOptions#getEffect} * @param effect The taint effect to match. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder effect(org.cdk8s.plus23.TaintEffect effect) { this.effect = effect; return this; } /** * Sets the value of {@link NodeTaintQueryOptions#getEvictAfter} * @param evictAfter How much time should a pod that tolerates the `NO_EXECUTE` effect be bound to the node. * Only applies for the NO_EXECUTE effect. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder evictAfter(org.cdk8s.Duration evictAfter) { this.evictAfter = evictAfter; return this; } /** * Builds the configured instance. * @return a new instance of {@link NodeTaintQueryOptions} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public NodeTaintQueryOptions build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link NodeTaintQueryOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements NodeTaintQueryOptions { private final org.cdk8s.plus23.TaintEffect effect; private final org.cdk8s.Duration evictAfter; /** * 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.effect = software.amazon.jsii.Kernel.get(this, "effect", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus23.TaintEffect.class)); this.evictAfter = software.amazon.jsii.Kernel.get(this, "evictAfter", 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.effect = builder.effect; this.evictAfter = builder.evictAfter; } @Override public final org.cdk8s.plus23.TaintEffect getEffect() { return this.effect; } @Override public final org.cdk8s.Duration getEvictAfter() { return this.evictAfter; } @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.getEffect() != null) { data.set("effect", om.valueToTree(this.getEffect())); } if (this.getEvictAfter() != null) { data.set("evictAfter", om.valueToTree(this.getEvictAfter())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk8s-plus-23.NodeTaintQueryOptions")); 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; NodeTaintQueryOptions.Jsii$Proxy that = (NodeTaintQueryOptions.Jsii$Proxy) o; if (this.effect != null ? !this.effect.equals(that.effect) : that.effect != null) return false; return this.evictAfter != null ? this.evictAfter.equals(that.evictAfter) : that.evictAfter == null; } @Override public final int hashCode() { int result = this.effect != null ? this.effect.hashCode() : 0; result = 31 * result + (this.evictAfter != null ? this.evictAfter.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy