Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 3 additions & 2 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ jobs:
env:
OPENAPI_VERSION: ${{ steps.version_check.outputs.openapi_version }}
run: |
# Move generated files to the correct locations and clean up
# Move generated files to the correct locations and clean up.
# Tests are intentionally not regenerated (apiTests/modelTests are disabled);
# the manual tests under test/ are preserved across SDK updates.
rm -Rf docs && mv python-client/docs .
rm -Rf revengai && mv python-client/revengai .
rm -Rf test && mv python-client/test .
rm -Rf README.md && mv python-client/README.md .
rm -Rf python-client

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,6 @@ target/
.ipynb_checkpoints

.idea
.openapi-generator
.openapi-generator
# Templates
out
3 changes: 2 additions & 1 deletion config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
packageName: revengai
packageUrl: https://github.com/RevEngAI/sdk-python
generateSourceCodeOnly: false
generateSourceCodeOnly: false
enumUnknownDefaultCase: true
6 changes: 6 additions & 0 deletions revengai/models/ai_decompilation_rating.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ class AiDecompilationRating(str, Enum):
POSITIVE = 'POSITIVE'
NEGATIVE = 'NEGATIVE'
NEUTRAL = 'NEUTRAL'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AiDecompilationRating from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/ai_decompilation_task_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ class AiDecompilationTaskStatus(str, Enum):
ERROR = 'error'
PENDING = 'pending'
SUCCESS = 'success'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AiDecompilationTaskStatus from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/analysis_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ class AnalysisScope(str, Enum):
"""
PRIVATE = 'PRIVATE'
PUBLIC = 'PUBLIC'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AnalysisScope from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/app_api_rest_v2_analyses_enums_order_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ class AppApiRestV2AnalysesEnumsOrderBy(str, Enum):
CREATED = 'created'
NAME = 'name'
SIZE = 'size'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AppApiRestV2AnalysesEnumsOrderBy from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ class AppApiRestV2CollectionsEnumsOrderBy(str, Enum):
OWNER = 'owner'
COLLECTION_SIZE = 'collection_size'
UPDATED = 'updated'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of AppApiRestV2CollectionsEnumsOrderBy from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/binaries_task_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ class BinariesTaskStatus(str, Enum):
RUNNING = 'RUNNING'
COMPLETED = 'COMPLETED'
FAILED = 'FAILED'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of BinariesTaskStatus from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/binary_task_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ class BinaryTaskStatus(str, Enum):
RUNNING = 'RUNNING'
COMPLETED = 'COMPLETED'
FAILED = 'FAILED'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of BinaryTaskStatus from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/collection_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ class CollectionScope(str, Enum):
PUBLIC = 'PUBLIC'
PROTECTED = 'PROTECTED'
TEAM = 'TEAM'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of CollectionScope from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/dynamic_execution_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ class DynamicExecutionStatus(str, Enum):
ERROR = 'ERROR'
SUCCESS = 'SUCCESS'
ALL = 'ALL'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of DynamicExecutionStatus from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/file_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ class FileFormat(str, Enum):
PE = 'pe'
ELF = 'elf'
BLOB = 'blob'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of FileFormat from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ class Filters(str, Enum):
TEAM_ONLY = 'team_only'
PUBLIC_ONLY = 'public_only'
HIDE_EMPTY = 'hide_empty'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of Filters from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/function_source_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ class FunctionSourceType(str, Enum):
EXTERNAL = 'EXTERNAL'
AUTO_UNSTRIP = 'AUTO_UNSTRIP'
AI_UNSTRIP = 'AI_UNSTRIP'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of FunctionSourceType from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/function_task_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,16 @@ class FunctionTaskStatus(str, Enum):
RUNNING = 'RUNNING'
COMPLETED = 'COMPLETED'
FAILED = 'FAILED'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of FunctionTaskStatus from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/isa.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ class ISA(str, Enum):
X86 = 'x86'
X86_64 = 'x86_64'
ARM = 'arm'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of ISA from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/model_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ class ModelName(str, Enum):
BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_64_MINUS_ANDROID = 'binnet-0.7-x86-64-android'
BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_32_MINUS_ANDROID = 'binnet-0.7-x86-32-android'
BINNET_MINUS_0_DOT_7_MINUS_ARM_MINUS_64_MINUS_ANDROID = 'binnet-0.7-arm-64-android'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of ModelName from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ class Order(str, Enum):
"""
ASC = 'ASC'
DESC = 'DESC'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of Order from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,16 @@ class Platform(str, Enum):
LINUX = 'linux'
WINDOWS = 'windows'
ANDROID = 'android'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of Platform from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/regenerate_target.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ class RegenerateTarget(str, Enum):
"""
SUMMARY = 'summary'
COMMENTS = 'comments'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of RegenerateTarget from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/sandbox_start_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,16 @@ class SandboxStartMethod(str, Enum):
"""
STANDARD_USER_PROCESS = 'standard_user_process'
ADMINISTRATOR_PROCESS = 'administrator_process'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of SandboxStartMethod from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/sandbox_timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,16 @@ class SandboxTimeout(int, Enum):
NUMBER_180 = 180
NUMBER_300 = 300
NUMBER_600 = 600
NUMBER_11184809 = 11184809

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of SandboxTimeout from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


6 changes: 6 additions & 0 deletions revengai/models/status_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,16 @@ class StatusInput(str, Enum):
ERROR = 'Error'
PROCESSING = 'Processing'
ALL = 'All'
UNKNOWN_DEFAULT_OPEN_API = 'unknown_default_open_api'

@classmethod
def from_json(cls, json_str: str) -> Self:
"""Create an instance of StatusInput from a JSON string"""
return cls(json.loads(json_str))

@classmethod
def _missing_(cls, value):
"""Fall back to the unknown default for values not defined in the SDK."""
return cls.__members__.get("UNKNOWN_DEFAULT_OPEN_API")


Loading