Class V1SecretProjection

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-02-02T17:56:12.287571Z[Etc/UTC]") public class V1SecretProjection extends Object
Adapts a secret into a projected volume. The contents of the target Secret's Data field will be presented in a projected volume as files using the keys in the Data field as the file names. Note that this is identical to a secret volume source without the default mode.
  • Field Details

  • Constructor Details

    • V1SecretProjection

      public V1SecretProjection()
  • Method Details

    • items

      public V1SecretProjection items(List<V1KeyToPath> items)
    • addItemsItem

      public V1SecretProjection addItemsItem(V1KeyToPath itemsItem)
    • getItems

      @Nullable public List<V1KeyToPath> getItems()
      items if unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the '..' path or start with '..'.
      Returns:
      items
    • setItems

      public void setItems(List<V1KeyToPath> items)
    • name

      public V1SecretProjection name(String name)
    • getName

      @Nullable public String getName()
      Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
      Returns:
      name
    • setName

      public void setName(String name)
    • optional

      public V1SecretProjection optional(Boolean optional)
    • getOptional

      @Nullable public Boolean getOptional()
      optional field specify whether the Secret or its key must be defined
      Returns:
      optional
    • setOptional

      public void setOptional(Boolean optional)
    • 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
    • validateJsonObject

      public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOException
      Validates the JSON Object and throws an exception if issues found
      Parameters:
      jsonObj - JSON Object
      Throws:
      IOException - if the JSON Object is invalid with respect to V1SecretProjection
    • fromJson

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

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