Class V1beta2CounterSet

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-05-20T20:47:13.890592Z[Etc/UTC]", comments="Generator version: 7.13.0") public class V1beta2CounterSet extends Object
CounterSet defines a named set of counters that are available to be used by devices defined in the ResourceSlice. The counters are not allocatable by themselves, but can be referenced by devices. When a device is allocated, the portion of counters it uses will no longer be available for use by other devices.
  • Field Details

  • Constructor Details

    • V1beta2CounterSet

      public V1beta2CounterSet()
  • Method Details

    • counters

      public V1beta2CounterSet counters(@Nonnull Map<String,V1beta2Counter> counters)
    • putCountersItem

      public V1beta2CounterSet putCountersItem(String key, V1beta2Counter countersItem)
    • getCounters

      @Nonnull public Map<String,V1beta2Counter> getCounters()
      Counters defines the set of counters for this CounterSet The name of each counter must be unique in that set and must be a DNS label. The maximum number of counters in all sets is 32.
      Returns:
      counters
    • setCounters

      public void setCounters(@Nonnull Map<String,V1beta2Counter> counters)
    • name

      public V1beta2CounterSet name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Name defines the name of the counter set. It must be a DNS label.
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • 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 V1beta2CounterSet
    • fromJson

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

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