java.lang.Object
io.github.alersrt.pod4j.openapi.model.Secret

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-11-29T01:29:49.168634544+07:00[Asia/Barnaul]", comments="Generator version: 7.7.0") public class Secret extends Object
Secret represents a Swarm Secret value that must be passed to the CSI storage plugin when operating on this Volume. It represents one key-value pair of possibly many.
  • Field Details

  • Constructor Details

    • Secret

      public Secret()
  • Method Details

    • 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 Secret
    • fromJson

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

      public Secret key(String key)
    • getKey

      @Nullable public String getKey()
      Key is the name of the key of the key-value pair passed to the plugin.
      Returns:
      key
    • setKey

      public void setKey(String key)
    • secret

      public Secret secret(String secret)
    • getSecret

      @Nullable public String getSecret()
      Secret is the swarm Secret object from which to read data. This can be a Secret name or ID. The Secret data is retrieved by Swarm and used as the value of the key-value pair passed to the plugin.
      Returns:
      secret
    • setSecret

      public void setSecret(String secret)
    • 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
    • toJson

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