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

org.cdk8s.plus31.k8s.PriorityLevelConfigurationSpecV1Beta3 Maven / Gradle / Ivy

package org.cdk8s.plus31.k8s;

/**
 * PriorityLevelConfigurationSpec specifies the configuration of a priority level.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.105.0 (build 0a2adcb)", date = "2024-11-15T12:15:25.141Z")
@software.amazon.jsii.Jsii(module = org.cdk8s.plus31.$Module.class, fqn = "cdk8s-plus-31.k8s.PriorityLevelConfigurationSpecV1Beta3")
@software.amazon.jsii.Jsii.Proxy(PriorityLevelConfigurationSpecV1Beta3.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface PriorityLevelConfigurationSpecV1Beta3 extends software.amazon.jsii.JsiiSerializable {

    /**
     * type indicates whether this priority level is subject to limitation on request execution.
     * 

* A value of "Exempt" means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of "Limited" means that (a) requests of this priority level are subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @org.jetbrains.annotations.NotNull java.lang.String getType(); /** * exempt specifies how requests are handled for an exempt priority level. *

* This field MUST be empty if type is "Limited". This field MAY be non-empty if type is "Exempt". If empty and type is "Exempt" then the default values for ExemptPriorityLevelConfiguration apply. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.ExemptPriorityLevelConfigurationV1Beta3 getExempt() { return null; } /** * limited specifies how requests are handled for a Limited priority level. *

* This field must be non-empty if and only if type is "Limited". */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable org.cdk8s.plus31.k8s.LimitedPriorityLevelConfigurationV1Beta3 getLimited() { return null; } /** * @return a {@link Builder} of {@link PriorityLevelConfigurationSpecV1Beta3} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link PriorityLevelConfigurationSpecV1Beta3} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String type; org.cdk8s.plus31.k8s.ExemptPriorityLevelConfigurationV1Beta3 exempt; org.cdk8s.plus31.k8s.LimitedPriorityLevelConfigurationV1Beta3 limited; /** * Sets the value of {@link PriorityLevelConfigurationSpecV1Beta3#getType} * @param type type indicates whether this priority level is subject to limitation on request execution. This parameter is required. * A value of "Exempt" means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of "Limited" means that (a) requests of this priority level are subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder type(java.lang.String type) { this.type = type; return this; } /** * Sets the value of {@link PriorityLevelConfigurationSpecV1Beta3#getExempt} * @param exempt exempt specifies how requests are handled for an exempt priority level. * This field MUST be empty if type is "Limited". This field MAY be non-empty if type is "Exempt". If empty and type is "Exempt" then the default values for ExemptPriorityLevelConfiguration apply. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder exempt(org.cdk8s.plus31.k8s.ExemptPriorityLevelConfigurationV1Beta3 exempt) { this.exempt = exempt; return this; } /** * Sets the value of {@link PriorityLevelConfigurationSpecV1Beta3#getLimited} * @param limited limited specifies how requests are handled for a Limited priority level. * This field must be non-empty if and only if type is "Limited". * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder limited(org.cdk8s.plus31.k8s.LimitedPriorityLevelConfigurationV1Beta3 limited) { this.limited = limited; return this; } /** * Builds the configured instance. * @return a new instance of {@link PriorityLevelConfigurationSpecV1Beta3} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public PriorityLevelConfigurationSpecV1Beta3 build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link PriorityLevelConfigurationSpecV1Beta3} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements PriorityLevelConfigurationSpecV1Beta3 { private final java.lang.String type; private final org.cdk8s.plus31.k8s.ExemptPriorityLevelConfigurationV1Beta3 exempt; private final org.cdk8s.plus31.k8s.LimitedPriorityLevelConfigurationV1Beta3 limited; /** * 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.type = software.amazon.jsii.Kernel.get(this, "type", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.exempt = software.amazon.jsii.Kernel.get(this, "exempt", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.k8s.ExemptPriorityLevelConfigurationV1Beta3.class)); this.limited = software.amazon.jsii.Kernel.get(this, "limited", software.amazon.jsii.NativeType.forClass(org.cdk8s.plus31.k8s.LimitedPriorityLevelConfigurationV1Beta3.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.type = java.util.Objects.requireNonNull(builder.type, "type is required"); this.exempt = builder.exempt; this.limited = builder.limited; } @Override public final java.lang.String getType() { return this.type; } @Override public final org.cdk8s.plus31.k8s.ExemptPriorityLevelConfigurationV1Beta3 getExempt() { return this.exempt; } @Override public final org.cdk8s.plus31.k8s.LimitedPriorityLevelConfigurationV1Beta3 getLimited() { return this.limited; } @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("type", om.valueToTree(this.getType())); if (this.getExempt() != null) { data.set("exempt", om.valueToTree(this.getExempt())); } if (this.getLimited() != null) { data.set("limited", om.valueToTree(this.getLimited())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk8s-plus-31.k8s.PriorityLevelConfigurationSpecV1Beta3")); 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; PriorityLevelConfigurationSpecV1Beta3.Jsii$Proxy that = (PriorityLevelConfigurationSpecV1Beta3.Jsii$Proxy) o; if (!type.equals(that.type)) return false; if (this.exempt != null ? !this.exempt.equals(that.exempt) : that.exempt != null) return false; return this.limited != null ? this.limited.equals(that.limited) : that.limited == null; } @Override public final int hashCode() { int result = this.type.hashCode(); result = 31 * result + (this.exempt != null ? this.exempt.hashCode() : 0); result = 31 * result + (this.limited != null ? this.limited.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy