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

io.kubernetes.client.models.V1CSIPersistentVolumeSource Maven / Gradle / Ivy

/*
 * Kubernetes
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v1.11.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */


package io.kubernetes.client.models;

import java.util.Objects;
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.models.V1SecretReference;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Represents storage that is managed by an external CSI volume driver (Beta feature)
 */
@ApiModel(description = "Represents storage that is managed by an external CSI volume driver (Beta feature)")

public class V1CSIPersistentVolumeSource {
  @SerializedName("controllerPublishSecretRef")
  private V1SecretReference controllerPublishSecretRef = null;

  @SerializedName("driver")
  private String driver = null;

  @SerializedName("fsType")
  private String fsType = null;

  @SerializedName("nodePublishSecretRef")
  private V1SecretReference nodePublishSecretRef = null;

  @SerializedName("nodeStageSecretRef")
  private V1SecretReference nodeStageSecretRef = null;

  @SerializedName("readOnly")
  private Boolean readOnly = null;

  @SerializedName("volumeAttributes")
  private Map volumeAttributes = null;

  @SerializedName("volumeHandle")
  private String volumeHandle = null;

  public V1CSIPersistentVolumeSource controllerPublishSecretRef(V1SecretReference controllerPublishSecretRef) {
    this.controllerPublishSecretRef = controllerPublishSecretRef;
    return this;
  }

   /**
   * ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and  may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.
   * @return controllerPublishSecretRef
  **/
  @ApiModelProperty(value = "ControllerPublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI ControllerPublishVolume and ControllerUnpublishVolume calls. This field is optional, and  may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.")
  public V1SecretReference getControllerPublishSecretRef() {
    return controllerPublishSecretRef;
  }

  public void setControllerPublishSecretRef(V1SecretReference controllerPublishSecretRef) {
    this.controllerPublishSecretRef = controllerPublishSecretRef;
  }

  public V1CSIPersistentVolumeSource driver(String driver) {
    this.driver = driver;
    return this;
  }

   /**
   * Driver is the name of the driver to use for this volume. Required.
   * @return driver
  **/
  @ApiModelProperty(required = true, value = "Driver is the name of the driver to use for this volume. Required.")
  public String getDriver() {
    return driver;
  }

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

  public V1CSIPersistentVolumeSource fsType(String fsType) {
    this.fsType = fsType;
    return this;
  }

   /**
   * Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".
   * @return fsType
  **/
  @ApiModelProperty(value = "Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\".")
  public String getFsType() {
    return fsType;
  }

  public void setFsType(String fsType) {
    this.fsType = fsType;
  }

  public V1CSIPersistentVolumeSource nodePublishSecretRef(V1SecretReference nodePublishSecretRef) {
    this.nodePublishSecretRef = nodePublishSecretRef;
    return this;
  }

   /**
   * NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and  may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.
   * @return nodePublishSecretRef
  **/
  @ApiModelProperty(value = "NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and  may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.")
  public V1SecretReference getNodePublishSecretRef() {
    return nodePublishSecretRef;
  }

  public void setNodePublishSecretRef(V1SecretReference nodePublishSecretRef) {
    this.nodePublishSecretRef = nodePublishSecretRef;
  }

  public V1CSIPersistentVolumeSource nodeStageSecretRef(V1SecretReference nodeStageSecretRef) {
    this.nodeStageSecretRef = nodeStageSecretRef;
    return this;
  }

   /**
   * NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and  may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.
   * @return nodeStageSecretRef
  **/
  @ApiModelProperty(value = "NodeStageSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeStageVolume and NodeStageVolume and NodeUnstageVolume calls. This field is optional, and  may be empty if no secret is required. If the secret object contains more than one secret, all secrets are passed.")
  public V1SecretReference getNodeStageSecretRef() {
    return nodeStageSecretRef;
  }

  public void setNodeStageSecretRef(V1SecretReference nodeStageSecretRef) {
    this.nodeStageSecretRef = nodeStageSecretRef;
  }

  public V1CSIPersistentVolumeSource readOnly(Boolean readOnly) {
    this.readOnly = readOnly;
    return this;
  }

   /**
   * Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).
   * @return readOnly
  **/
  @ApiModelProperty(value = "Optional: The value to pass to ControllerPublishVolumeRequest. Defaults to false (read/write).")
  public Boolean isReadOnly() {
    return readOnly;
  }

  public void setReadOnly(Boolean readOnly) {
    this.readOnly = readOnly;
  }

  public V1CSIPersistentVolumeSource volumeAttributes(Map volumeAttributes) {
    this.volumeAttributes = volumeAttributes;
    return this;
  }

  public V1CSIPersistentVolumeSource putVolumeAttributesItem(String key, String volumeAttributesItem) {
    if (this.volumeAttributes == null) {
      this.volumeAttributes = new HashMap();
    }
    this.volumeAttributes.put(key, volumeAttributesItem);
    return this;
  }

   /**
   * Attributes of the volume to publish.
   * @return volumeAttributes
  **/
  @ApiModelProperty(value = "Attributes of the volume to publish.")
  public Map getVolumeAttributes() {
    return volumeAttributes;
  }

  public void setVolumeAttributes(Map volumeAttributes) {
    this.volumeAttributes = volumeAttributes;
  }

  public V1CSIPersistentVolumeSource volumeHandle(String volumeHandle) {
    this.volumeHandle = volumeHandle;
    return this;
  }

   /**
   * VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.
   * @return volumeHandle
  **/
  @ApiModelProperty(required = true, value = "VolumeHandle is the unique volume name returned by the CSI volume plugin’s CreateVolume to refer to the volume on all subsequent calls. Required.")
  public String getVolumeHandle() {
    return volumeHandle;
  }

  public void setVolumeHandle(String volumeHandle) {
    this.volumeHandle = volumeHandle;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1CSIPersistentVolumeSource v1CSIPersistentVolumeSource = (V1CSIPersistentVolumeSource) o;
    return Objects.equals(this.controllerPublishSecretRef, v1CSIPersistentVolumeSource.controllerPublishSecretRef) &&
        Objects.equals(this.driver, v1CSIPersistentVolumeSource.driver) &&
        Objects.equals(this.fsType, v1CSIPersistentVolumeSource.fsType) &&
        Objects.equals(this.nodePublishSecretRef, v1CSIPersistentVolumeSource.nodePublishSecretRef) &&
        Objects.equals(this.nodeStageSecretRef, v1CSIPersistentVolumeSource.nodeStageSecretRef) &&
        Objects.equals(this.readOnly, v1CSIPersistentVolumeSource.readOnly) &&
        Objects.equals(this.volumeAttributes, v1CSIPersistentVolumeSource.volumeAttributes) &&
        Objects.equals(this.volumeHandle, v1CSIPersistentVolumeSource.volumeHandle);
  }

  @Override
  public int hashCode() {
    return Objects.hash(controllerPublishSecretRef, driver, fsType, nodePublishSecretRef, nodeStageSecretRef, readOnly, volumeAttributes, volumeHandle);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1CSIPersistentVolumeSource {\n");
    
    sb.append("    controllerPublishSecretRef: ").append(toIndentedString(controllerPublishSecretRef)).append("\n");
    sb.append("    driver: ").append(toIndentedString(driver)).append("\n");
    sb.append("    fsType: ").append(toIndentedString(fsType)).append("\n");
    sb.append("    nodePublishSecretRef: ").append(toIndentedString(nodePublishSecretRef)).append("\n");
    sb.append("    nodeStageSecretRef: ").append(toIndentedString(nodeStageSecretRef)).append("\n");
    sb.append("    readOnly: ").append(toIndentedString(readOnly)).append("\n");
    sb.append("    volumeAttributes: ").append(toIndentedString(volumeAttributes)).append("\n");
    sb.append("    volumeHandle: ").append(toIndentedString(volumeHandle)).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