Class V1EnvVar

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2025-02-12T21:15:49.397498Z[Etc/UTC]", comments="Generator version: 7.6.0") public class V1EnvVar extends Object
EnvVar represents an environment variable present in a Container.
  • Field Details

  • Constructor Details

    • V1EnvVar

      public V1EnvVar()
  • Method Details

    • name

      public V1EnvVar name(String name)
    • getName

      @Nonnull public String getName()
      Name of the environment variable. Must be a C_IDENTIFIER.
      Returns:
      name
    • setName

      public void setName(String name)
    • value

      public V1EnvVar value(String value)
    • getValue

      @Nullable public String getValue()
      Variable references $(VAR_NAME) are expanded using the previously defined environment variables in the container and any service environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. Double $$ are reduced to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. \"$$(VAR_NAME)\" will produce the string literal \"$(VAR_NAME)\". Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".
      Returns:
      value
    • setValue

      public void setValue(String value)
    • valueFrom

      public V1EnvVar valueFrom(V1EnvVarSource valueFrom)
    • getValueFrom

      @Nullable public V1EnvVarSource getValueFrom()
      Get valueFrom
      Returns:
      valueFrom
    • setValueFrom

      public void setValueFrom(V1EnvVarSource valueFrom)
    • 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 V1EnvVar
    • fromJson

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

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