Package org.cdk8s.plus24.k8s
Class PreferredSchedulingTerm.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.PreferredSchedulingTerm.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<PreferredSchedulingTerm>
- Enclosing interface:
- PreferredSchedulingTerm
@Stability(Stable) public static final class PreferredSchedulingTerm.Builder extends Object implements software.amazon.jsii.Builder<PreferredSchedulingTerm>
A builder forPreferredSchedulingTerm
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PreferredSchedulingTerm
build()
Builds the configured instance.PreferredSchedulingTerm.Builder
preference(NodeSelectorTerm preference)
Sets the value ofPreferredSchedulingTerm.getPreference()
PreferredSchedulingTerm.Builder
weight(Number weight)
Sets the value ofPreferredSchedulingTerm.getWeight()
-
-
-
Method Detail
-
preference
@Stability(Stable) public PreferredSchedulingTerm.Builder preference(NodeSelectorTerm preference)
Sets the value ofPreferredSchedulingTerm.getPreference()
- Parameters:
preference
- A node selector term, associated with the corresponding weight. This parameter is required.- Returns:
this
-
weight
@Stability(Stable) public PreferredSchedulingTerm.Builder weight(Number weight)
Sets the value ofPreferredSchedulingTerm.getWeight()
- Parameters:
weight
- Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100. This parameter is required.- Returns:
this
-
build
@Stability(Stable) public PreferredSchedulingTerm build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<PreferredSchedulingTerm>
- Returns:
- a new instance of
PreferredSchedulingTerm
- Throws:
NullPointerException
- if any required attribute was not provided
-
-