Class V1PreferredSchedulingTerm

java.lang.Object
io.kubernetes.client.openapi.models.V1PreferredSchedulingTerm

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1PreferredSchedulingTerm extends Object
An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
  • Field Details

  • Constructor Details

    • V1PreferredSchedulingTerm

      public V1PreferredSchedulingTerm()
  • Method Details

    • preference

      public V1PreferredSchedulingTerm preference(V1NodeSelectorTerm preference)
    • getPreference

      @Nonnull public V1NodeSelectorTerm getPreference()
      Get preference
      Returns:
      preference
    • setPreference

      public void setPreference(V1NodeSelectorTerm preference)
    • weight

      public V1PreferredSchedulingTerm weight(Integer weight)
    • getWeight

      @Nonnull public Integer getWeight()
      Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
      Returns:
      weight
    • setWeight

      public void setWeight(Integer weight)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to V1PreferredSchedulingTerm
    • fromJson

      public static V1PreferredSchedulingTerm fromJson(String jsonString) throws IOException
      Create an instance of V1PreferredSchedulingTerm given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of V1PreferredSchedulingTerm
      Throws:
      IOException - if the JSON string is invalid with respect to V1PreferredSchedulingTerm
    • toJson

      public String toJson()
      Convert an instance of V1PreferredSchedulingTerm to an JSON string
      Returns:
      JSON string