Class V1StorageClass

java.lang.Object
io.kubernetes.client.openapi.models.V1StorageClass
All Implemented Interfaces:
KubernetesObject, KubernetesType

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-05-20T20:47:13.890592Z[Etc/UTC]", comments="Generator version: 7.13.0") public class V1StorageClass extends Object implements KubernetesObject
StorageClass describes the parameters for a class of storage for which PersistentVolumes can be dynamically provisioned. StorageClasses are non-namespaced; the name of the storage class according to etcd is in ObjectMeta.Name.
  • Field Details

  • Constructor Details

    • V1StorageClass

      public V1StorageClass()
  • Method Details

    • allowVolumeExpansion

      public V1StorageClass allowVolumeExpansion(@Nullable Boolean allowVolumeExpansion)
    • getAllowVolumeExpansion

      @Nullable public Boolean getAllowVolumeExpansion()
      allowVolumeExpansion shows whether the storage class allow volume expand.
      Returns:
      allowVolumeExpansion
    • setAllowVolumeExpansion

      public void setAllowVolumeExpansion(@Nullable Boolean allowVolumeExpansion)
    • allowedTopologies

      public V1StorageClass allowedTopologies(@Nullable List<V1TopologySelectorTerm> allowedTopologies)
    • addAllowedTopologiesItem

      public V1StorageClass addAllowedTopologiesItem(V1TopologySelectorTerm allowedTopologiesItem)
    • getAllowedTopologies

      @Nullable public List<V1TopologySelectorTerm> getAllowedTopologies()
      allowedTopologies restrict the node topologies where volumes can be dynamically provisioned. Each volume plugin defines its own supported topology specifications. An empty TopologySelectorTerm list means there is no topology restriction. This field is only honored by servers that enable the VolumeScheduling feature.
      Returns:
      allowedTopologies
    • setAllowedTopologies

      public void setAllowedTopologies(@Nullable List<V1TopologySelectorTerm> allowedTopologies)
    • apiVersion

      public V1StorageClass apiVersion(@Nullable String apiVersion)
    • getApiVersion

      @Nullable public String getApiVersion()
      APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
      Specified by:
      getApiVersion in interface KubernetesType
      Returns:
      apiVersion
    • setApiVersion

      public void setApiVersion(@Nullable String apiVersion)
    • kind

      public V1StorageClass kind(@Nullable String kind)
    • getKind

      @Nullable public String getKind()
      Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
      Specified by:
      getKind in interface KubernetesType
      Returns:
      kind
    • setKind

      public void setKind(@Nullable String kind)
    • metadata

      public V1StorageClass metadata(@Nullable V1ObjectMeta metadata)
    • getMetadata

      @Nullable public V1ObjectMeta getMetadata()
      Get metadata
      Specified by:
      getMetadata in interface KubernetesObject
      Returns:
      metadata
    • setMetadata

      public void setMetadata(@Nullable V1ObjectMeta metadata)
    • mountOptions

      public V1StorageClass mountOptions(@Nullable List<String> mountOptions)
    • addMountOptionsItem

      public V1StorageClass addMountOptionsItem(String mountOptionsItem)
    • getMountOptions

      @Nullable public List<String> getMountOptions()
      mountOptions controls the mountOptions for dynamically provisioned PersistentVolumes of this storage class. e.g. [\"ro\", \"soft\"]. Not validated - mount of the PVs will simply fail if one is invalid.
      Returns:
      mountOptions
    • setMountOptions

      public void setMountOptions(@Nullable List<String> mountOptions)
    • parameters

      public V1StorageClass parameters(@Nullable Map<String,String> parameters)
    • putParametersItem

      public V1StorageClass putParametersItem(String key, String parametersItem)
    • getParameters

      @Nullable public Map<String,String> getParameters()
      parameters holds the parameters for the provisioner that should create volumes of this storage class.
      Returns:
      parameters
    • setParameters

      public void setParameters(@Nullable Map<String,String> parameters)
    • provisioner

      public V1StorageClass provisioner(@Nonnull String provisioner)
    • getProvisioner

      @Nonnull public String getProvisioner()
      provisioner indicates the type of the provisioner.
      Returns:
      provisioner
    • setProvisioner

      public void setProvisioner(@Nonnull String provisioner)
    • reclaimPolicy

      public V1StorageClass reclaimPolicy(@Nullable String reclaimPolicy)
    • getReclaimPolicy

      @Nullable public String getReclaimPolicy()
      reclaimPolicy controls the reclaimPolicy for dynamically provisioned PersistentVolumes of this storage class. Defaults to Delete.
      Returns:
      reclaimPolicy
    • setReclaimPolicy

      public void setReclaimPolicy(@Nullable String reclaimPolicy)
    • volumeBindingMode

      public V1StorageClass volumeBindingMode(@Nullable String volumeBindingMode)
    • getVolumeBindingMode

      @Nullable public String getVolumeBindingMode()
      volumeBindingMode indicates how PersistentVolumeClaims should be provisioned and bound. When unset, VolumeBindingImmediate is used. This field is only honored by servers that enable the VolumeScheduling feature.
      Returns:
      volumeBindingMode
    • setVolumeBindingMode

      public void setVolumeBindingMode(@Nullable String volumeBindingMode)
    • 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 V1StorageClass
    • fromJson

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

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