Package org.cdk8s.plus25.k8s
Class NodeSelectorRequirement.Builder
- java.lang.Object
-
- org.cdk8s.plus25.k8s.NodeSelectorRequirement.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<NodeSelectorRequirement>
- Enclosing interface:
- NodeSelectorRequirement
@Stability(Stable) public static final class NodeSelectorRequirement.Builder extends Object implements software.amazon.jsii.Builder<NodeSelectorRequirement>
A builder forNodeSelectorRequirement
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeSelectorRequirementbuild()Builds the configured instance.NodeSelectorRequirement.Builderkey(String key)Sets the value ofNodeSelectorRequirement.getKey()NodeSelectorRequirement.Builderoperator(String operator)Sets the value ofNodeSelectorRequirement.getOperator()NodeSelectorRequirement.Buildervalues(List<String> values)Sets the value ofNodeSelectorRequirement.getValues()
-
-
-
Method Detail
-
key
@Stability(Stable) public NodeSelectorRequirement.Builder key(String key)
Sets the value ofNodeSelectorRequirement.getKey()- Parameters:
key- The label key that the selector applies to. This parameter is required.- Returns:
this
-
operator
@Stability(Stable) public NodeSelectorRequirement.Builder operator(String operator)
Sets the value ofNodeSelectorRequirement.getOperator()- Parameters:
operator- Represents a key's relationship to a set of values. This parameter is required. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.- Returns:
this
-
values
@Stability(Stable) public NodeSelectorRequirement.Builder values(List<String> values)
Sets the value ofNodeSelectorRequirement.getValues()- Parameters:
values- An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.- Returns:
this
-
build
@Stability(Stable) public NodeSelectorRequirement build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<NodeSelectorRequirement>- Returns:
- a new instance of
NodeSelectorRequirement - Throws:
NullPointerException- if any required attribute was not provided
-
-