diff --git a/docs/RenameInputBody.md b/docs/RenameInputBody.md index 7c16cff..a0b4358 100644 --- a/docs/RenameInputBody.md +++ b/docs/RenameInputBody.md @@ -9,6 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**newMangledName** | **String** | New mangled function name | [optional] | |**newName** | **String** | New function name | | +|**preserveAiDecompilation** | **Boolean** | Keep the cached AI decompilation, summary and inline comments. Set when the new name comes from the model's own prediction (e.g. Transfer Name) so existing AI output is not discarded and regenerated. | [optional] | diff --git a/src/main/java/ai/reveng/model/RenameInputBody.java b/src/main/java/ai/reveng/model/RenameInputBody.java index dd7ca40..228fb62 100644 --- a/src/main/java/ai/reveng/model/RenameInputBody.java +++ b/src/main/java/ai/reveng/model/RenameInputBody.java @@ -59,6 +59,11 @@ public class RenameInputBody { @javax.annotation.Nonnull private String newName; + public static final String SERIALIZED_NAME_PRESERVE_AI_DECOMPILATION = "preserve_ai_decompilation"; + @SerializedName(SERIALIZED_NAME_PRESERVE_AI_DECOMPILATION) + @javax.annotation.Nullable + private Boolean preserveAiDecompilation; + public RenameInputBody() { } @@ -100,6 +105,25 @@ public void setNewName(@javax.annotation.Nonnull String newName) { } + public RenameInputBody preserveAiDecompilation(@javax.annotation.Nullable Boolean preserveAiDecompilation) { + this.preserveAiDecompilation = preserveAiDecompilation; + return this; + } + + /** + * Keep the cached AI decompilation, summary and inline comments. Set when the new name comes from the model's own prediction (e.g. Transfer Name) so existing AI output is not discarded and regenerated. + * @return preserveAiDecompilation + */ + @javax.annotation.Nullable + public Boolean getPreserveAiDecompilation() { + return preserveAiDecompilation; + } + + public void setPreserveAiDecompilation(@javax.annotation.Nullable Boolean preserveAiDecompilation) { + this.preserveAiDecompilation = preserveAiDecompilation; + } + + @Override public boolean equals(Object o) { @@ -111,12 +135,13 @@ public boolean equals(Object o) { } RenameInputBody renameInputBody = (RenameInputBody) o; return Objects.equals(this.newMangledName, renameInputBody.newMangledName) && - Objects.equals(this.newName, renameInputBody.newName); + Objects.equals(this.newName, renameInputBody.newName) && + Objects.equals(this.preserveAiDecompilation, renameInputBody.preserveAiDecompilation); } @Override public int hashCode() { - return Objects.hash(newMangledName, newName); + return Objects.hash(newMangledName, newName, preserveAiDecompilation); } @Override @@ -125,6 +150,7 @@ public String toString() { sb.append("class RenameInputBody {\n"); sb.append(" newMangledName: ").append(toIndentedString(newMangledName)).append("\n"); sb.append(" newName: ").append(toIndentedString(newName)).append("\n"); + sb.append(" preserveAiDecompilation: ").append(toIndentedString(preserveAiDecompilation)).append("\n"); sb.append("}"); return sb.toString(); } @@ -143,7 +169,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("new_mangled_name", "new_name")); + openapiFields = new HashSet(Arrays.asList("new_mangled_name", "new_name", "preserve_ai_decompilation")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("new_name"));