Class V1WorkloadReference

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-01-21T21:30:13.305152Z[Etc/UTC]", comments="Generator version: 7.18.0") public class V1WorkloadReference extends Object
WorkloadReference identifies the Workload object and PodGroup membership that a Pod belongs to. The scheduler uses this information to apply workload-aware scheduling semantics.
  • Field Details

  • Constructor Details

    • V1WorkloadReference

      public V1WorkloadReference()
  • Method Details

    • name

      public V1WorkloadReference name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Name defines the name of the Workload object this Pod belongs to. Workload must be in the same namespace as the Pod. If it doesn't match any existing Workload, the Pod will remain unschedulable until a Workload object is created and observed by the kube-scheduler. It must be a DNS subdomain.
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • podGroup

      public V1WorkloadReference podGroup(@Nonnull String podGroup)
    • getPodGroup

      @Nonnull public String getPodGroup()
      PodGroup is the name of the PodGroup within the Workload that this Pod belongs to. If it doesn't match any existing PodGroup within the Workload, the Pod will remain unschedulable until the Workload object is recreated and observed by the kube-scheduler. It must be a DNS label.
      Returns:
      podGroup
    • setPodGroup

      public void setPodGroup(@Nonnull String podGroup)
    • podGroupReplicaKey

      public V1WorkloadReference podGroupReplicaKey(@Nullable String podGroupReplicaKey)
    • getPodGroupReplicaKey

      @Nullable public String getPodGroupReplicaKey()
      PodGroupReplicaKey specifies the replica key of the PodGroup to which this Pod belongs. It is used to distinguish pods belonging to different replicas of the same pod group. The pod group policy is applied separately to each replica. When set, it must be a DNS label.
      Returns:
      podGroupReplicaKey
    • setPodGroupReplicaKey

      public void setPodGroupReplicaKey(@Nullable String podGroupReplicaKey)
    • 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
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to V1WorkloadReference
    • fromJson

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

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