All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.kubernetes.client.openapi.models.V1beta1DeviceRequestAllocationResult Maven / Gradle / Ivy

There is a newer version: 4.0.0-beta1
Show newest version
/*
Copyright 2025 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package io.kubernetes.client.openapi.models;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.kubernetes.client.openapi.models.V1beta1DeviceToleration;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

/**
 * DeviceRequestAllocationResult contains the allocation result for one request.
 */
@ApiModel(description = "DeviceRequestAllocationResult contains the allocation result for one request.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-22T21:20:49.874193Z[Etc/UTC]")
public class V1beta1DeviceRequestAllocationResult {
  public static final String SERIALIZED_NAME_ADMIN_ACCESS = "adminAccess";
  @SerializedName(SERIALIZED_NAME_ADMIN_ACCESS)
  private Boolean adminAccess;

  public static final String SERIALIZED_NAME_DEVICE = "device";
  @SerializedName(SERIALIZED_NAME_DEVICE)
  private String device;

  public static final String SERIALIZED_NAME_DRIVER = "driver";
  @SerializedName(SERIALIZED_NAME_DRIVER)
  private String driver;

  public static final String SERIALIZED_NAME_POOL = "pool";
  @SerializedName(SERIALIZED_NAME_POOL)
  private String pool;

  public static final String SERIALIZED_NAME_REQUEST = "request";
  @SerializedName(SERIALIZED_NAME_REQUEST)
  private String request;

  public static final String SERIALIZED_NAME_TOLERATIONS = "tolerations";
  @SerializedName(SERIALIZED_NAME_TOLERATIONS)
  private List tolerations = null;


  public V1beta1DeviceRequestAllocationResult adminAccess(Boolean adminAccess) {

    this.adminAccess = adminAccess;
    return this;
  }

   /**
   * AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.  This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.
   * @return adminAccess
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "AdminAccess indicates that this device was allocated for administrative access. See the corresponding request field for a definition of mode.  This is an alpha field and requires enabling the DRAAdminAccess feature gate. Admin access is disabled if this field is unset or set to false, otherwise it is enabled.")

  public Boolean getAdminAccess() {
    return adminAccess;
  }


  public void setAdminAccess(Boolean adminAccess) {
    this.adminAccess = adminAccess;
  }


  public V1beta1DeviceRequestAllocationResult device(String device) {

    this.device = device;
    return this;
  }

   /**
   * Device references one device instance via its name in the driver's resource pool. It must be a DNS label.
   * @return device
  **/
  @ApiModelProperty(required = true, value = "Device references one device instance via its name in the driver's resource pool. It must be a DNS label.")

  public String getDevice() {
    return device;
  }


  public void setDevice(String device) {
    this.device = device;
  }


  public V1beta1DeviceRequestAllocationResult driver(String driver) {

    this.driver = driver;
    return this;
  }

   /**
   * Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
   * @return driver
  **/
  @ApiModelProperty(required = true, value = "Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.  Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.")

  public String getDriver() {
    return driver;
  }


  public void setDriver(String driver) {
    this.driver = driver;
  }


  public V1beta1DeviceRequestAllocationResult pool(String pool) {

    this.pool = pool;
    return this;
  }

   /**
   * This name together with the driver name and the device name field identify which device was allocated (`<driver name>/<pool name>/<device name>`).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
   * @return pool
  **/
  @ApiModelProperty(required = true, value = "This name together with the driver name and the device name field identify which device was allocated (`//`).  Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.")

  public String getPool() {
    return pool;
  }


  public void setPool(String pool) {
    this.pool = pool;
  }


  public V1beta1DeviceRequestAllocationResult request(String request) {

    this.request = request;
    return this;
  }

   /**
   * Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format <main request>/<subrequest>.  Multiple devices may have been allocated per request.
   * @return request
  **/
  @ApiModelProperty(required = true, value = "Request is the name of the request in the claim which caused this device to be allocated. If it references a subrequest in the firstAvailable list on a DeviceRequest, this field must include both the name of the main request and the subrequest using the format 
/. Multiple devices may have been allocated per request.") public String getRequest() { return request; } public void setRequest(String request) { this.request = request; } public V1beta1DeviceRequestAllocationResult tolerations(List tolerations) { this.tolerations = tolerations; return this; } public V1beta1DeviceRequestAllocationResult addTolerationsItem(V1beta1DeviceToleration tolerationsItem) { if (this.tolerations == null) { this.tolerations = new ArrayList<>(); } this.tolerations.add(tolerationsItem); return this; } /** * A copy of all tolerations specified in the request at the time when the device got allocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate. * @return tolerations **/ @javax.annotation.Nullable @ApiModelProperty(value = "A copy of all tolerations specified in the request at the time when the device got allocated. The maximum number of tolerations is 16. This is an alpha field and requires enabling the DRADeviceTaints feature gate.") public List getTolerations() { return tolerations; } public void setTolerations(List tolerations) { this.tolerations = tolerations; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } V1beta1DeviceRequestAllocationResult v1beta1DeviceRequestAllocationResult = (V1beta1DeviceRequestAllocationResult) o; return Objects.equals(this.adminAccess, v1beta1DeviceRequestAllocationResult.adminAccess) && Objects.equals(this.device, v1beta1DeviceRequestAllocationResult.device) && Objects.equals(this.driver, v1beta1DeviceRequestAllocationResult.driver) && Objects.equals(this.pool, v1beta1DeviceRequestAllocationResult.pool) && Objects.equals(this.request, v1beta1DeviceRequestAllocationResult.request) && Objects.equals(this.tolerations, v1beta1DeviceRequestAllocationResult.tolerations); } @Override public int hashCode() { return Objects.hash(adminAccess, device, driver, pool, request, tolerations); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V1beta1DeviceRequestAllocationResult {\n"); sb.append(" adminAccess: ").append(toIndentedString(adminAccess)).append("\n"); sb.append(" device: ").append(toIndentedString(device)).append("\n"); sb.append(" driver: ").append(toIndentedString(driver)).append("\n"); sb.append(" pool: ").append(toIndentedString(pool)).append("\n"); sb.append(" request: ").append(toIndentedString(request)).append("\n"); sb.append(" tolerations: ").append(toIndentedString(tolerations)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy