Class V1beta2ResourceSliceSpec

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-05-20T20:47:13.890592Z[Etc/UTC]", comments="Generator version: 7.13.0") public class V1beta2ResourceSliceSpec extends Object
ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
  • Field Details

  • Constructor Details

    • V1beta2ResourceSliceSpec

      public V1beta2ResourceSliceSpec()
  • Method Details

    • allNodes

      public V1beta2ResourceSliceSpec allNodes(@Nullable Boolean allNodes)
    • getAllNodes

      @Nullable public Boolean getAllNodes()
      AllNodes indicates that all nodes have access to the resources in the pool. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
      Returns:
      allNodes
    • setAllNodes

      public void setAllNodes(@Nullable Boolean allNodes)
    • devices

      public V1beta2ResourceSliceSpec devices(@Nullable List<V1beta2Device> devices)
    • addDevicesItem

      public V1beta2ResourceSliceSpec addDevicesItem(V1beta2Device devicesItem)
    • getDevices

      @Nullable public List<V1beta2Device> getDevices()
      Devices lists some or all of the devices in this pool. Must not have more than 128 entries.
      Returns:
      devices
    • setDevices

      public void setDevices(@Nullable List<V1beta2Device> devices)
    • driver

      public V1beta2ResourceSliceSpec driver(@Nonnull String driver)
    • getDriver

      @Nonnull public String getDriver()
      Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name. Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
      Returns:
      driver
    • setDriver

      public void setDriver(@Nonnull String driver)
    • nodeName

      public V1beta2ResourceSliceSpec nodeName(@Nullable String nodeName)
    • getNodeName

      @Nullable public String getNodeName()
      NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node. This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set. This field is immutable.
      Returns:
      nodeName
    • setNodeName

      public void setNodeName(@Nullable String nodeName)
    • nodeSelector

      public V1beta2ResourceSliceSpec nodeSelector(@Nullable V1NodeSelector nodeSelector)
    • getNodeSelector

      @Nullable public V1NodeSelector getNodeSelector()
      Get nodeSelector
      Returns:
      nodeSelector
    • setNodeSelector

      public void setNodeSelector(@Nullable V1NodeSelector nodeSelector)
    • perDeviceNodeSelection

      public V1beta2ResourceSliceSpec perDeviceNodeSelection(@Nullable Boolean perDeviceNodeSelection)
    • getPerDeviceNodeSelection

      @Nullable public Boolean getPerDeviceNodeSelection()
      PerDeviceNodeSelection defines whether the access from nodes to resources in the pool is set on the ResourceSlice level or on each device. If it is set to true, every device defined the ResourceSlice must specify this individually. Exactly one of NodeName, NodeSelector, AllNodes, and PerDeviceNodeSelection must be set.
      Returns:
      perDeviceNodeSelection
    • setPerDeviceNodeSelection

      public void setPerDeviceNodeSelection(@Nullable Boolean perDeviceNodeSelection)
    • pool

      public V1beta2ResourceSliceSpec pool(@Nonnull V1beta2ResourcePool pool)
    • getPool

      @Nonnull public V1beta2ResourcePool getPool()
      Get pool
      Returns:
      pool
    • setPool

      public void setPool(@Nonnull V1beta2ResourcePool pool)
    • sharedCounters

      public V1beta2ResourceSliceSpec sharedCounters(@Nullable List<V1beta2CounterSet> sharedCounters)
    • addSharedCountersItem

      public V1beta2ResourceSliceSpec addSharedCountersItem(V1beta2CounterSet sharedCountersItem)
    • getSharedCounters

      @Nullable public List<V1beta2CounterSet> getSharedCounters()
      SharedCounters defines a list of counter sets, each of which has a name and a list of counters available. The names of the SharedCounters must be unique in the ResourceSlice. The maximum number of counters in all sets is 32.
      Returns:
      sharedCounters
    • setSharedCounters

      public void setSharedCounters(@Nullable List<V1beta2CounterSet> sharedCounters)
    • 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 V1beta2ResourceSliceSpec
    • fromJson

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

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