Class V1WeightedPodAffinityTerm

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-04-23T13:45:09.091597Z[Etc/UTC]") public class V1WeightedPodAffinityTerm extends Object
The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
  • Field Details

  • Constructor Details

    • V1WeightedPodAffinityTerm

      public V1WeightedPodAffinityTerm()
  • Method Details

    • podAffinityTerm

      public V1WeightedPodAffinityTerm podAffinityTerm(V1PodAffinityTerm podAffinityTerm)
    • getPodAffinityTerm

      @Nonnull public V1PodAffinityTerm getPodAffinityTerm()
      Get podAffinityTerm
      Returns:
      podAffinityTerm
    • setPodAffinityTerm

      public void setPodAffinityTerm(V1PodAffinityTerm podAffinityTerm)
    • weight

      public V1WeightedPodAffinityTerm weight(Integer weight)
    • getWeight

      @Nonnull public Integer getWeight()
      weight associated with matching the corresponding podAffinityTerm, 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 V1WeightedPodAffinityTerm
    • fromJson

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

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