Class CreateKeyOption

java.lang.Object
build.cursed.genapi.forgejo.model.CreateKeyOption

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-09-28T10:48:29.723777+02:00[Europe/Stockholm]", comments="Generator version: 7.21.0") public class CreateKeyOption extends Object
CreateKeyOption options when creating a key
  • Field Details

  • Constructor Details

    • CreateKeyOption

      public CreateKeyOption()
  • Method Details

    • key

      public CreateKeyOption key(@Nonnull String key)
    • getKey

      @Nonnull public String getKey()
      An armored SSH key to add
      Returns:
      key
    • setKey

      public void setKey(@Nonnull String key)
    • readOnly

      public CreateKeyOption readOnly(@Nullable Boolean readOnly)
    • getReadOnly

      @Nullable public Boolean getReadOnly()
      Describe if the key has only read access or read/write
      Returns:
      readOnly
    • setReadOnly

      public void setReadOnly(@Nullable Boolean readOnly)
    • title

      public CreateKeyOption title(@Nonnull String title)
    • getTitle

      @Nonnull public String getTitle()
      Title of the key to add
      Returns:
      title
    • setTitle

      public void setTitle(@Nonnull String title)
    • 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 CreateKeyOption
    • fromJson

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

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